:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-alt: #f3f4f6;
  --surface-strong: #eef2ff;
  --border: #e5e7eb;
  --text: #111827;
  --text-muted: #475569;
  --text-secondary: #6b7280;
  --brand: #2563eb;
  --brand-strong: #1d4ed8;
  --brand-soft: #eff6ff;
  --brand-accent: #4f46e5;
  --success: #16a34a;
  --warning: #f59e0b;
  --danger: #ef4444;
  --shadow: 0 24px 80px rgba(15, 23, 42, 0.08);
  --radius: 24px;
  --radius-sm: 16px;
  --transition: 0.22s ease;
}

* {
  box-sizing: border-box;
}

html {
  margin: 0;
  min-height: 100%;
  max-width: 100%;
  overflow-x: clip;
}

body {
  margin: 0;
  min-height: 100%;
  max-width: 100%;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
  color: var(--text);
  font-family: "Outfit", sans-serif;
  overflow-x: clip;
}

body.dashboard-app {
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.topbar-brand img.navbar-logo,
.drawer-brand img.navbar-logo,
.auth-hero img.sidebar-logo {
  max-width: 3.5rem;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.dashboard-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  gap: 1.25rem;
  padding: 1rem 1.25rem 2rem;
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 2rem;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(229, 231, 235, 0.95);
  border-radius: 22px;
  box-shadow: var(--shadow);
  flex-wrap: nowrap;
  min-height: 80px;
}

.links-and-settings {
  display: flex;
  gap: 2rem;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.navbar-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
  flex-shrink: 0;
}

.sidebar-title {
  font-size: 1.1rem;
  font-weight: 700;
}

.sidebar-subtitle {
  display: block;
  margin-top: 0.25rem;
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.topbar-nav {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: nowrap;
  gap: 0.9rem;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  padding: 0.2rem 0;
  margin: 0;
}

.topbar-nav::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.topbar-link,
.drawer-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.65rem;
  border-radius: 0;
  color: var(--text);
  background: transparent;
  border: none;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.2;
  transition:
    color var(--transition),
    background var(--transition),
    transform var(--transition),
    border-color var(--transition);
}

.topbar-link:hover,
.drawer-link:hover {
  background: rgba(37, 99, 235, 0.08);
  color: var(--brand-strong);
}

.topbar-link,
.drawer-link {
  border-bottom: 2px solid transparent;
}

.topbar-link.active,
.drawer-link.active {
  color: var(--brand-strong);
  font-weight: 600;
  border-bottom-color: var(--brand);
}

.hamburger-toggle,
.drawer-close {
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  border: 1px solid rgba(229, 231, 235, 0.95);
  background: #fff;
  color: var(--text);
  padding: 0;
  line-height: 1;
  flex-shrink: 0;
  transition:
    background var(--transition),
    border-color var(--transition),
    transform var(--transition),
    box-shadow var(--transition);
}

.hamburger-toggle:hover,
.drawer-close:hover {
  background: var(--brand-soft);
  border-color: rgba(37, 99, 235, 0.2);
  transform: translateY(-1px);
}

.hamburger-toggle:focus-visible,
.drawer-close:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.hamburger-icon {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 18px;
  height: 14px;
  pointer-events: none;
}

.hamburger-icon span {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: var(--text);
  transition: background var(--transition);
}

.hamburger-toggle:hover .hamburger-icon span {
  background: var(--brand-strong);
}

.hamburger-toggle {
  display: none;
}

.drawer-close {
  display: inline-flex;
}

.drawer-close ion-icon {
  font-size: 1.35rem;
  color: var(--text-muted);
}

.drawer-close:hover ion-icon {
  color: var(--brand-strong);
}

.topbar-action--icon {
  width: 44px;
  height: 44px;
  padding: 0;
}

.sidebar-drawer {
  position: fixed;
  top: 0;
  left: -100%;
  width: min(320px, 90%);
  height: 100vh;
  background: #fff;
  box-shadow: 24px 0 80px rgba(15, 23, 42, 0.18);
  padding: 1.5rem;
  transition: left var(--transition);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sidebar-drawer.open {
  left: 0;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  opacity: 0;
  visibility: hidden;
  display: none;
  transition: opacity var(--transition);
  z-index: 900;
}

.drawer-backdrop.open {
  opacity: 1;
  visibility: visible;
  display: block;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.drawer-brand {
  gap: 0.75rem;
}

.drawer-nav {
  display: grid;
  gap: 0.65rem;
}

.drawer-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.95rem 1rem;
  border-radius: 14px;
  color: var(--text);
  background: rgba(248, 250, 252, 0.95);
  border: 1px solid transparent;
  border-bottom: none;
  font-size: 0.95rem;
  font-weight: 500;
}

.drawer-link.active {
  background: var(--brand-soft);
  border-color: rgba(37, 99, 235, 0.12);
  font-weight: 600;
}

.page-panel {
  width: min(1400px, 100%);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 0;
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(229, 231, 235, 0.95);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.sidebar-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(229, 231, 235, 0.85);
  background: #fff;
  color: var(--text);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.topbar-action {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  border: 1px solid rgba(229, 231, 235, 0.95);
  background: #fff;
  color: var(--text);
  transition:
    transform var(--transition),
    background var(--transition);
}

.topbar-action:hover {
  background: var(--brand-soft);
  transform: translateY(-1px);
}

.profile-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(229, 231, 235, 0.95);
  color: var(--text);
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.page-title {
  font-size: clamp(2rem, 2.6vw, 2.8rem);
  margin: 0;
  letter-spacing: -0.03em;
}

.page-subtitle {
  margin: 0.75rem 0 0;
  color: var(--text-muted);
  max-width: 58rem;
  line-height: 1.75;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.page-content {
  display: grid;
  gap: 1.75rem;
}

.panel-card {
  background: linear-gradient(165deg, #ffffff 0%, #f8fafc 55%, #f1f5f9 100%);
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: 22px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 12px 40px rgba(15, 23, 42, 0.06);
  padding: 1.75rem;
  overflow: hidden;
  transition:
    transform var(--transition),
    box-shadow var(--transition),
    border-color var(--transition);
}

.panel-card:hover {
  border-color: rgba(147, 197, 253, 0.4);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 18px 48px rgba(15, 23, 42, 0.08);
}

.panel-card.full-width {
  width: 100%;
}

.panel-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 2rem;
}

.panel-note,
.panel-description {
  margin: 0.75rem 0 0;
  color: var(--text-secondary);
  line-height: 1.7;
}

.stats-grid,
.overview-grid,
.monitor-grid,
.status-grid,
.metric-grid,
.chart-grid,
.asset-grid,
.exposure-grid,
.header-grid,
.detail-grid,
.split-grid,
.timeline-grid {
  display: grid;
  gap: 1.5rem;
}

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

.overview-grid,
.metric-grid,
.status-grid,
.chart-grid,
.asset-grid,
.split-grid,
.timeline-grid {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  margin-bottom: 2rem;
}

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

.status-card,
.metric-card,
.finding-card,
.health-card,
.timeline-card,
.module-card,
.check-card,
.exposure-card,
.summary-card,
.section-card,
.asset-card,
.timeline-item,
.alert-item {
  background: linear-gradient(165deg, #ffffff 0%, #f8fafc 55%, #f1f5f9 100%);
  border-radius: 22px;
  padding: 1.25rem;
  border: 1px solid rgba(229, 231, 235, 0.9);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 10px 32px rgba(15, 23, 42, 0.05);
  transition:
    transform var(--transition),
    box-shadow var(--transition),
    border-color var(--transition);
}

.chart-card:not(.chart-panel) {
  background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
  border-radius: 22px;
  border: 1px solid rgba(229, 231, 235, 0.95);
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.06);
  padding: 1.25rem;
}

.dashboard-app .check-card:hover,
.dashboard-app .asset-card:hover,
.dashboard-app .metric-card:hover,
.dashboard-app .status-card:hover,
.dashboard-app .alert-item:hover {
  transform: translateY(-2px);
  border-color: rgba(147, 197, 253, 0.4);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 16px 40px rgba(15, 23, 42, 0.08);
}

.metric-card {
  display: grid;
  gap: 1rem;
}

.check-summary-card {
  margin-bottom: 2rem;
}

.metric-card-top,
.status-card-top,
.summary-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.metric-label,
.status-label,
.card-label,
.section-label,
.summary-label {
  display: block;
  color: var(--text-secondary);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 0.45rem;
}

.metric-value,
.status-value,
.health-value,
.ring-value,
.chip-value,
.card-value {
  font-size: 2rem;
  line-height: 1;
  font-weight: 700;
  color: var(--text);
}

.metric-note,
.status-note,
.card-note,
.section-description,
.muted,
.timeline-note {
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 0.95rem;
}

.badge,
.status-pill,
.tag-badge,
.info-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.badge--healthy,
.status-pill.healthy,
.tag-badge.green {
  background: rgba(22, 163, 74, 0.12);
  color: var(--success);
}

.badge--warning,
.status-pill.warning,
.tag-badge.yellow {
  background: rgba(245, 158, 11, 0.12);
  color: var(--warning);
}

.badge--critical,
.status-pill.critical,
.tag-badge.red {
  background: rgba(239, 68, 68, 0.12);
  color: var(--danger);
}

.badge--neutral,
.badge--monitoring,
.status-pill.unknown,
.tag-badge.gray {
  background: rgba(146, 166, 210, 0.15);
  color: #475569;
}

.badge--monitoring {
  background: rgba(37, 99, 235, 0.12);
  color: var(--brand-strong);
}

.status-pill.green,
.tag-badge.green {
  background: rgba(22, 163, 74, 0.12);
  color: var(--success);
}

.status-pill.yellow,
.tag-badge.yellow,
.tag-badge.warning {
  background: rgba(245, 158, 11, 0.12);
  color: var(--warning);
}

.status-pill.red,
.tag-badge.red {
  background: rgba(239, 68, 68, 0.12);
  color: var(--danger);
}

.stats-ring {
  width: min(320px, 100%);
  height: min(320px, 100%);
  display: grid;
  place-items: center;
}

.stats-ring-label {
  text-align: center;
}

.stats-ring-label span {
  display: block;
}

.stats-ring-title {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.stats-ring-score {
  font-size: 3rem;
  margin-top: 0.35rem;
  color: var(--brand-strong);
}

.chart-card {
  position: relative;
}

.chart-card--trend {
  min-height: 0;
}

.chart-card canvas {
  display: block;
  max-width: 100%;
}

/* --- Premium SOC overview --- */
.overview-command-center {
  display: grid;
  grid-template-columns: minmax(300px, 1.75fr) repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(168px, 1fr));
  gap: 1rem;
  margin-bottom: 1.35rem;
  min-height: 360px;
  align-items: stretch;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: clip;
}

.overview-command-center > * {
  min-width: 0;
}

.soc-card {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(229, 231, 235, 0.9);
  background: linear-gradient(165deg, #ffffff 0%, #f8fafc 55%, #f1f5f9 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 12px 40px rgba(15, 23, 42, 0.06),
    0 2px 8px rgba(15, 23, 42, 0.04);
  transition:
    transform var(--transition),
    box-shadow var(--transition),
    border-color var(--transition);
}

.soc-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    120% 80% at 100% 0%,
    rgba(37, 99, 235, 0.06) 0%,
    transparent 55%
  );
  pointer-events: none;
}

.soc-card:hover {
  transform: translateY(-3px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 20px 50px rgba(15, 23, 42, 0.1),
    0 4px 14px rgba(37, 99, 235, 0.06);
  border-color: rgba(147, 197, 253, 0.45);
}

.soc-card--hero {
  grid-column: 1;
  grid-row: 1 / span 2;
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1.6rem 1.35rem;
  background: linear-gradient(
    155deg,
    #ffffff 0%,
    #f8fafc 40%,
    rgba(239, 246, 255, 0.95) 100%
  );
  border-color: rgba(191, 219, 254, 0.55);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 18px 56px rgba(37, 99, 235, 0.1),
    0 4px 16px rgba(15, 23, 42, 0.06);
}

.soc-card--hero:hover {
  transform: translateY(-4px);
}

.soc-card--hero::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  width: min(160px, 55%);
  height: min(160px, 55%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(79, 70, 229, 0.08), transparent 70%);
  pointer-events: none;
}

.soc-card__hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 1;
}

.soc-card__eyebrow {
  margin: 0 0 0.3rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-strong);
}

.soc-card__title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
}

.risk-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  flex-shrink: 0;
}

.risk-pill--healthy {
  background: rgba(22, 163, 74, 0.12);
  color: var(--success);
  border: 1px solid rgba(22, 163, 74, 0.2);
}

.risk-pill--warning {
  background: rgba(245, 158, 11, 0.12);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.risk-pill--critical {
  background: rgba(239, 68, 68, 0.12);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.22);
}

.risk-pill--neutral {
  background: rgba(148, 163, 184, 0.15);
  color: #475569;
}

.score-meter {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  margin: 0.35rem 0 0.5rem;
  z-index: 1;
  overflow: hidden;
}

.meter-segments {
  --meter-radius: 92px;
  --meter-step: 9.473684deg;
  position: relative;
  width: min(240px, 100%);
  height: 136px;
  margin: 0 auto;
  margin-bottom: 2rem;
  flex-shrink: 0;
}

.meter-segment {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 7px;
  height: 30px;
  margin-left: -3.5px;
  border-radius: 6px;
  background: rgba(226, 232, 240, 0.95);
  transform-origin: bottom center;
  transform: rotate(calc(-90deg + var(--i) * var(--meter-step)))
    translateY(calc(-1 * var(--meter-radius)));
  transition:
    background 0.4s ease,
    box-shadow 0.4s ease,
    transform 0.35s ease;
}

.meter-segment.is-active {
  background: linear-gradient(
    180deg,
    #38bdf8 0%,
    var(--brand) 45%,
    var(--brand-accent) 100%
  );
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.35);
}

.meter-segment.is-active:nth-child(odd) {
  animation: segmentPulse 1.8s ease-in-out infinite;
}

@keyframes segmentPulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.82;
  }
}

.score-meter__center {
  position: absolute;
  left: 50%;
  bottom: 2px;
  transform: translateX(-50%);
  width: min(11rem, 72%);
  text-align: center;
  pointer-events: none;
  z-index: 2;
}

.score-meter__value {
  display: block;
  font-size: clamp(1.85rem, 2.8vw + 0.5rem, 2.75rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.04em;
  color: var(--text);
  background: linear-gradient(135deg, var(--brand-strong), var(--brand-accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: nowrap;
}

.score-meter__unit {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.score-meter__footer {
  position: relative;
  z-index: 3;
  flex-shrink: 0;
  display: grid;
  gap: 0.5rem;
  margin-top: 0.15rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(229, 231, 235, 0.8);
  background: linear-gradient(
    180deg,
    rgba(248, 250, 252, 0) 0%,
    rgba(248, 250, 252, 0.92) 18%,
    #f8fafc 100%
  );
}

.trend-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.trend-pill--up {
  color: var(--success);
}

.trend-pill--down {
  color: var(--danger);
}

.trend-pill__icon {
  display: inline-flex;
  width: 1.35rem;
  height: 1.35rem;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.95);
  font-size: 0.75rem;
}

.trend-pill--up .trend-pill__icon {
  background: rgba(22, 163, 74, 0.12);
}

.trend-pill--down .trend-pill__icon {
  background: rgba(239, 68, 68, 0.1);
}

.score-meter__updated {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.score-meter__updated time {
  font-weight: 600;
  color: var(--text-muted);
}

.score-meter__note {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

.soc-metric {
  display: flex;
  gap: 0.85rem;
  padding: 1.15rem 1.2rem;
  min-width: 0;
  min-height: 168px;
  height: 100%;
  align-items: flex-start;
}

.soc-metric--assets {
  grid-column: 2;
  grid-row: 1;
}

.soc-metric--uptime {
  grid-column: 3;
  grid-row: 1;
}

.soc-metric--ssl {
  grid-column: 4;
  grid-row: 1;
}

.soc-metric--headers {
  grid-column: 2;
  grid-row: 2;
}

.soc-metric--defacement {
  grid-column: 3;
  grid-row: 2;
}

.soc-metric--dns {
  grid-column: 4;
  grid-row: 2;
}

.soc-metric__desc {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--text-secondary);
  flex: 1;
}

.soc-metric__icon {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  border: 1px solid rgba(229, 231, 235, 0.95);
  background: #fff;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.05);
}

.soc-metric__icon svg {
  width: 22px;
  height: 22px;
}

.soc-metric__icon--brand {
  color: var(--brand-strong);
  background: var(--brand-soft);
  border-color: rgba(147, 197, 253, 0.45);
}

.soc-metric__icon--success {
  color: var(--success);
  background: rgba(220, 252, 231, 0.65);
  border-color: rgba(134, 239, 172, 0.45);
}

.soc-metric__icon--indigo {
  color: var(--brand-accent);
  background: rgba(238, 242, 255, 0.95);
  border-color: rgba(199, 210, 254, 0.55);
}

.soc-metric__icon--shield {
  color: var(--brand-strong);
  background: linear-gradient(145deg, var(--brand-soft), #fff);
}

.soc-metric__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.soc-metric__label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.soc-metric__value-row {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.soc-metric__value {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--text);
}

.soc-metric__value--grade {
  font-size: 2rem;
  color: var(--brand-strong);
}

.soc-metric__suffix {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.soc-metric__status {
  align-self: flex-start;
}

.mini-progress {
  --progress: 0;
  height: 6px;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.9);
  overflow: hidden;
  margin-top: 0.15rem;
}

.mini-progress__bar {
  height: 100%;
  width: calc(var(--progress) * 1%);
  max-width: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--success), #22c55e);
  transition: width 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.mini-progress--brand .mini-progress__bar {
  background: linear-gradient(90deg, var(--brand), var(--brand-accent));
}

.sparkline-host {
  height: 32px;
  margin-top: 0.15rem;
}

.sparkline {
  width: 100%;
  height: 100%;
  display: block;
}

.cert-health {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.1rem;
}

.cert-health__bar {
  flex: 1;
  height: 5px;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.95);
  position: relative;
  overflow: hidden;
}

.cert-health__bar::after {
  content: "";
  position: absolute;
  inset: 0;
  width: calc(var(--cert-pct, 0) * 1%);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--brand-accent));
  transition: width 0.8s ease;
}

.cert-health__bar.is-full::after {
  width: 100%;
  background: linear-gradient(90deg, var(--success), #22c55e);
}

.cert-health__text {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}

.shield-meter {
  --shield: 100;
  height: 6px;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.9);
  overflow: hidden;
  margin-top: 0.2rem;
}

.shield-meter__fill {
  height: 100%;
  width: calc(var(--shield) * 1%);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand-strong), #38bdf8);
  transition: width 1s ease;
}

.asset-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.2rem;
}

.asset-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(226, 232, 240, 0.95);
  border: 1px solid rgba(203, 213, 225, 0.8);
  transition: transform var(--transition);
}

.asset-dot.is-live {
  background: linear-gradient(135deg, var(--brand), var(--brand-accent));
  border-color: transparent;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.chart-panel {
  background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
  border-radius: 22px;
  border: 1px solid rgba(229, 231, 235, 0.95);
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.06);
  padding: 1.35rem 1.5rem 1.5rem;
}

.chart-panel__header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.chart-panel__header--compact {
  margin-bottom: 0.75rem;
}

.chart-panel__eyebrow {
  margin: 0 0 0.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-strong);
}

.chart-panel__subtitle {
  margin: 0.25rem 0 0;
  font-size: 0.78rem;
  color: #64748b;
  font-weight: 500;
}

.chart-panel__title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.chart-range-tabs {
  display: inline-flex;
  padding: 0.25rem;
  gap: 0.2rem;
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.98);
  border: 1px solid rgba(229, 231, 235, 0.95);
}

.chart-range-tab {
  min-width: 44px;
  padding: 0.45rem 0.75rem;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition:
    background var(--transition),
    color var(--transition);
}

.chart-range-tab:hover {
  color: var(--brand-strong);
  background: rgba(255, 255, 255, 0.9);
}

.chart-range-tab.is-active {
  color: var(--brand-strong);
  background: #fff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12);
}

.chart-grid--secondary .chart-panel {
  padding: 1.2rem 1.25rem 1.35rem;
}

.panel-card--alerts {
  margin-top: 0.25rem;
}

@media (max-width: 1280px) and (min-width: 901px) {
  .overview-command-center {
    grid-template-columns: minmax(220px, 1.25fr) repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(3, minmax(140px, auto));
    min-height: 0;
  }

  .soc-card--hero {
    grid-column: 1;
    grid-row: 1 / span 3;
  }

  .soc-metric--assets {
    grid-column: 2;
    grid-row: 1;
  }

  .soc-metric--uptime {
    grid-column: 3;
    grid-row: 1;
  }

  .soc-metric--ssl {
    grid-column: 2;
    grid-row: 2;
  }

  .soc-metric--headers {
    grid-column: 3;
    grid-row: 2;
  }

  .soc-metric--defacement {
    grid-column: 2;
    grid-row: 3;
  }

  .soc-metric--dns {
    grid-column: 3;
    grid-row: 3;
  }

  .meter-segments {
    --meter-radius: 84px;
    width: min(210px, 100%);
    height: 124px;
  }

  .meter-segment {
    width: 6px;
    height: 26px;
    margin-left: -3px;
  }

  .score-meter__center {
    width: min(10rem, 68%);
  }

  .score-meter__value {
    font-size: clamp(1.7rem, 2.2vw + 0.65rem, 2.35rem);
  }
}

@media (min-width: 901px) {
  .settings-nav-mobile {
    display: none;
  }

  .settings-nav-desktop {
    display: block;
  }
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.data-table th,
.data-table td {
  padding: 1rem 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(229, 231, 235, 0.95);
}

.data-table th {
  color: var(--text-secondary);
  font-weight: 700;
}

.data-table tbody tr:hover {
  background: rgba(37, 99, 235, 0.05);
}

.empty-state {
  padding: 2rem;
  border-radius: 24px;
  background: rgba(219, 234, 254, 0.5);
  color: var(--brand-strong);
  text-align: center;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 100px;
  padding: 0.65rem 0.85rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}

.status-chip.healthy {
  background: rgba(22, 163, 74, 0.12);
  color: var(--success);
}

.status-chip.warning {
  background: rgba(245, 158, 11, 0.12);
  color: var(--warning);
}

.status-chip.critical {
  background: rgba(239, 68, 68, 0.12);
  color: var(--danger);
}

.status-chip.monitoring {
  background: rgba(37, 99, 235, 0.12);
  color: var(--brand-strong);
}

.timeline-list,
.alert-list,
.asset-card-list {
  display: grid;
  gap: 1rem;
}

.timeline-item,
.alert-item,
.header-detail-card,
.setting-card {
  padding: 1.4rem;
}

.timeline-item {
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr);
  gap: 1rem;
}

.timeline-item::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--brand);
  margin-top: 0.4rem;
}

.timeline-item-time {
  color: var(--text-secondary);
  font-size: 0.88rem;
  margin-bottom: 0.45rem;
}

.timeline-item-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.timeline-item-body {
  margin: 0.45rem 0 0;
  color: var(--text-secondary);
  line-height: 1.75;
}

.asset-card {
  display: grid;
  gap: 1rem;
  padding: 1.5rem;
}

.asset-card-list {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.asset-card-header,
.check-card-header,
.exposure-card-header,
.setting-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.asset-card-title,
.check-card-title,
.exposure-card-title,
.setting-card-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
}

.asset-card-meta {
  display: grid;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.asset-card-footer {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.asset-card-footer .text-link,
.asset-card-footer .text-button {
  margin-top: 0.5rem;
}

.asset-card-meta,
.check-card-meta,
.exposure-card-meta,
.setting-card-meta {
  color: var(--text-secondary);
  line-height: 1.7;
}

.asset-card-footer,
.check-card-footer,
.exposure-card-footer,
.setting-card-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.asset-card-actions,
.check-actions {
  display: inline-flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.text-button,
.text-link {
  color: var(--brand-strong);
  font-weight: 700;
}

.text-button:hover,
.text-link:hover {
  text-decoration: underline;
}

/* --- Typography & page chrome --- */
.eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-strong);
}

.panel-card + .panel-card {
  margin-top: 0;
}

.panel-card--nested {
  margin-top: 1.25rem;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.04);
}

.panel-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.panel-header .panel-title {
  margin-bottom: 0;
}

.panel-title--spaced {
  margin-top: 1.5rem;
}

.details-summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--brand-strong);
  list-style: none;
}

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

/* --- Button system --- */
.btn,
.primary-button,
.secondary-button,
.button-outline,
.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.7rem 1.25rem;
  border-radius: 14px;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  border: 1px solid transparent;
  white-space: nowrap;
  transition:
    transform var(--transition),
    box-shadow var(--transition),
    background var(--transition),
    border-color var(--transition),
    color var(--transition);
}

.btn-sm,
.header-actions .primary-button,
.header-actions .btn {
  min-height: 40px;
  padding: 0.55rem 1rem;
  font-size: 0.85rem;
  border-radius: 12px;
}

.btn-primary,
.primary-button,
.cta-button {
  color: #fff;
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
  border-color: transparent;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.18);
}

.btn-primary:hover,
.primary-button:hover,
.cta-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.22);
}

.btn-secondary,
.secondary-button,
.button-outline {
  color: var(--brand-strong);
  background: #fff;
  border-color: rgba(37, 99, 235, 0.22);
  box-shadow: none;
}

.btn-secondary:hover,
.secondary-button:hover,
.button-outline:hover {
  background: var(--brand-soft);
  transform: translateY(-1px);
}

.btn-ghost {
  color: var(--text-muted);
  background: rgba(248, 250, 252, 0.95);
  border-color: rgba(229, 231, 235, 0.95);
  box-shadow: none;
}

.btn-ghost:hover {
  color: var(--brand-strong);
  background: var(--brand-soft);
  border-color: rgba(37, 99, 235, 0.18);
}

.btn-danger,
.text-button.danger {
  color: #fff;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  border-color: transparent;
  box-shadow: 0 10px 22px rgba(239, 68, 68, 0.18);
  text-decoration: none;
}

.btn-danger:hover,
.text-button.danger:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(239, 68, 68, 0.22);
  text-decoration: none;
}

.action-bar,
.asset-card-actions,
.panel-actions,
.form-actions-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.panel-actions {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(229, 231, 235, 0.95);
}

.asset-card-footer {
  padding-top: 0.25rem;
  border-top: 1px solid rgba(229, 231, 235, 0.7);
  margin-top: 0.25rem;
}

.asset-card-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.asset-card-meta-row > span:not(.tag-badge) {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.asset-card-url {
  margin: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-break: break-all;
}

.asset-card-header > div:first-child {
  min-width: 0;
  flex: 1;
}

/* --- Metric & status cards --- */
.metric-card,
.status-card {
  transition:
    transform var(--transition),
    box-shadow var(--transition);
}

.metric-card:hover,
.status-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.09);
}

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

/* --- Check / monitor pages --- */
.meta-sup {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-strong);
}

.muted {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 0.95rem;
}

.check-summary-card {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border-radius: 20px;
  background: linear-gradient(
    135deg,
    rgba(239, 246, 255, 0.95) 0%,
    rgba(255, 255, 255, 0.98) 100%
  );
  border: 1px solid rgba(191, 219, 254, 0.55);
  box-shadow: 0 8px 28px rgba(37, 99, 235, 0.06);
}

.check-summary-card h2 {
  margin: 0.25rem 0 0.5rem;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.check-summary-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.check-card {
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
  transition: box-shadow var(--transition);
}

.check-card:last-child {
  margin-bottom: 0;
}

.check-card-header h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.check-subtitle {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.check-section {
  display: grid;
  gap: 0.35rem;
}

.check-section.two-columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.check-section p {
  margin: 0;
  line-height: 1.6;
}

.expiry-value {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--brand-strong);
}

/* --- Alerts --- */
.alert-list-stack {
  display: grid;
  gap: 1rem;
}

.alert-card {
  border-left: 4px solid var(--brand);
}

.alert-card--critical {
  background: rgba(254, 242, 242, 0.85);
  border-left-color: var(--danger);
}

.alert-card--warning {
  background: rgba(255, 251, 235, 0.9);
  border-left-color: var(--warning);
}

.alert-card--info {
  background: rgba(239, 246, 255, 0.9);
  border-left-color: var(--brand);
}

.alert-action-note {
  margin: 0;
  color: #991b1b;
  font-weight: 600;
  font-size: 0.92rem;
}

.alert-item {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

/* --- Detail grids & tables --- */
.asset-detail-grid,
.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.detail-cell {
  padding: 1rem 1.1rem;
  border-radius: var(--radius-sm);
  background: rgba(248, 250, 252, 0.95);
  border: 1px solid rgba(229, 231, 235, 0.95);
}

.detail-cell strong {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(229, 231, 235, 0.95);
}

.table-scroll .data-table {
  min-width: 560px;
}

.data-table th {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(248, 250, 252, 0.98);
  position: sticky;
  top: 0;
  z-index: 1;
}

/* --- Verification --- */
.method-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.35rem;
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.98);
  border: 1px solid rgba(229, 231, 235, 0.95);
}

.method-tab {
  flex: 1 1 auto;
  min-width: min(100%, 140px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  border: 1px solid transparent;
  transition:
    background var(--transition),
    color var(--transition),
    box-shadow var(--transition);
}

.method-tab:hover {
  color: var(--brand-strong);
  background: rgba(255, 255, 255, 0.9);
}

.method-tab.active {
  color: var(--brand-strong);
  background: #fff;
  border-color: rgba(37, 99, 235, 0.15);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.1);
}

.instruction-card {
  margin-top: 1.25rem;
  padding: 1.5rem;
  border-radius: var(--radius-sm);
  background: rgba(248, 250, 252, 0.98);
  border: 1px solid rgba(229, 231, 235, 0.95);
}

.instruction-card .panel-title {
  margin-bottom: 0.75rem;
}

.token-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.token-code,
code.inline-code {
  display: inline-block;
  max-width: 100%;
  padding: 0.55rem 0.85rem;
  border-radius: 10px;
  background: #fff;
  border: 1px solid rgba(229, 231, 235, 0.95);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  color: var(--text);
  word-break: break-all;
}

.code-block {
  margin: 1rem 0 0;
  padding: 1rem 1.1rem;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(229, 231, 235, 0.95);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.6;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.info-callout {
  padding: 1rem 1.1rem;
  border-radius: 14px;
  background: var(--brand-soft);
  border: 1px solid rgba(147, 197, 253, 0.55);
  color: #1e40af;
  font-size: 0.92rem;
  line-height: 1.6;
}

.info-callout strong {
  color: #1d4ed8;
}

.form-success,
.form-error {
  padding: 1rem 1.15rem;
  border-radius: 14px;
  margin-bottom: 1rem;
  font-size: 0.92rem;
  line-height: 1.6;
}

.form-success {
  background: rgba(220, 253, 232, 0.85);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #166534;
}

.form-error {
  background: rgba(254, 226, 226, 0.85);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #991b1b;
}

/* --- Modal --- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1100;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
}

.modal-overlay.open {
  display: flex;
}

.modal-dialog {
  width: min(500px, 100%);
  padding: 1.75rem;
  border-radius: var(--radius-sm);
  background: #fff;
  border: 1px solid rgba(229, 231, 235, 0.95);
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.2);
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.modal-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(254, 243, 199, 0.9);
  font-size: 1.35rem;
}

.modal-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
}

.modal-body {
  margin: 0 0 1.25rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.modal-list {
  margin: 0 0 1.5rem;
  padding-left: 1.25rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.modal-list li {
  margin-bottom: 0.65rem;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.modal-actions .btn,
.modal-actions button {
  flex: 1 1 120px;
}

/* --- Add asset layout --- */
.split-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.75rem;
  max-width: 960px;
  margin: 0 auto;
  width: 100%;
}

.add-asset-intro h2 {
  margin: 0 0 0.5rem;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
}

.add-asset-intro p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.65;
}

.feature-panel {
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
  color: #fff;
  height: 100%;
}

.feature-panel .panel-title {
  color: #fff;
  margin-bottom: 1rem;
}

.feature-step {
  display: grid;
  gap: 0.35rem;
}

.feature-step-title {
  font-weight: 700;
  font-size: 0.95rem;
}

.feature-step p {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.95;
  line-height: 1.55;
}

.feature-steps {
  display: grid;
  gap: 1.15rem;
}

.form-hint {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.form-label-required {
  color: var(--danger);
}

.empty-panel {
  text-align: center;
  padding: 2.5rem 1.5rem;
}

.empty-panel .panel-note {
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}

/* --- Settings --- */
.settings-container {
  display: grid;
  grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
  gap: 1.75rem;
  align-items: start;
  width: 100%;
  min-width: 0;
}

.settings-nav-mobile {
  display: none;
  grid-column: 1 / -1;
}

.settings-nav-label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.settings-nav-select {
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(229, 231, 235, 0.95);
  background: #fff;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--text-muted) 50%),
    linear-gradient(135deg, var(--text-muted) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% + 2px),
    calc(100% - 12px) calc(50% + 2px);
  background-size:
    6px 6px,
    6px 6px;
  background-repeat: no-repeat;
}

.settings-sidebar {
  position: sticky;
  top: 1rem;
  min-width: 0;
}

.settings-menu {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(229, 231, 235, 0.95);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.05);
}

.settings-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.65rem 0.85rem;
  margin-top: 1rem;
}

.settings-section-title:first-of-type {
  margin-top: 0;
}

.settings-menu-item {
  display: block;
  width: 100%;
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  color: var(--text-muted);
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition:
    background var(--transition),
    color var(--transition);
}

.settings-menu-item:hover {
  background: rgba(37, 99, 235, 0.08);
  color: var(--brand-strong);
}

.settings-menu-item.active {
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-weight: 600;
}

.settings-content {
  display: grid;
  gap: 1.25rem;
  min-width: 0;
}

.settings-panel {
  display: none;
}

.settings-panel.active {
  display: block;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.danger-zone {
  border: 1px solid rgba(252, 165, 165, 0.65);
  background: rgba(254, 242, 242, 0.85);
  padding: 1.5rem;
  border-radius: var(--radius-sm);
  margin-top: 1.25rem;
}

.danger-zone h3 {
  margin: 0 0 0.5rem;
  color: #dc2626;
  font-weight: 700;
  font-size: 1rem;
}

.danger-zone p {
  margin: 0 0 1rem;
  font-size: 0.92rem;
  color: #991b1b;
  line-height: 1.6;
}

.coming-soon {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-secondary);
}

.coming-soon-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.coming-soon h3 {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
  color: var(--text);
}

.coming-soon-note {
  margin: 1rem 0 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.chart-wrap {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
}

.chart-wrap--trend {
  height: 360px;
  max-height: 42vh;
  min-height: 260px;
}

.chart-wrap--donut {
  height: 280px;
  min-height: 220px;
  max-height: 320px;
}

.chart-wrap canvas {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  min-height: 0 !important;
}

.btn-block {
  flex: 1 1 100%;
  width: 100%;
}

.record-status-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.record-card {
  padding: 1rem 1.1rem;
  border-radius: 14px;
  border-left: 4px solid transparent;
}

.record-card--ok {
  background: rgba(220, 252, 231, 0.85);
  border-left-color: var(--success);
}

.record-card--ok h4,
.record-card--ok p {
  color: #166534;
}

.record-card--fail {
  background: rgba(254, 226, 226, 0.85);
  border-left-color: var(--danger);
}

.record-card--fail h4,
.record-card--fail p {
  color: #991b1b;
}

.record-card h4 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
}

.record-card p {
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
  line-height: 1.5;
}

.issue-list {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.issue-list li {
  margin-bottom: 0.35rem;
}

.callout-warning {
  padding: 1rem 1.1rem;
  border-radius: 14px;
  background: rgba(255, 251, 235, 0.95);
  border: 1px solid rgba(251, 191, 36, 0.35);
  color: #92400e;
}

.callout-warning ul {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
}

.header-analysis-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.header-analysis-grid h4 {
  grid-column: 1 / -1;
  margin: 0.5rem 0 0;
  font-size: 1rem;
}

@media (max-width: 1024px) {
  .topbar-nav {
    gap: 0.65rem;
  }

  .topbar-link,
  .drawer-link {
    font-size: 0.9rem;
    padding: 0.35rem 0.55rem;
  }
}

@media (max-width: 900px) {
  .dashboard-shell {
    padding: 0.75rem 0.85rem 1.5rem;
    gap: 1rem;
  }

  .topbar {
    gap: 0.5rem;
    border-radius: 18px;
  }

  .topbar-nav {
    display: none;
  }

  .hamburger-toggle {
    display: inline-flex;
    margin-left: auto;
    flex-shrink: 0;
  }

  .topbar-actions {
    flex-shrink: 0;
    margin-left: 0.5rem;
  }

  .sidebar-drawer {
    width: min(320px, 90%);
  }

  .drawer-backdrop {
    display: none;
  }

  .page-header {
    flex-direction: column;
    align-items: stretch;
  }

  .header-actions {
    width: 100%;
  }

  .header-actions .btn,
  .header-actions .primary-button {
    flex: 1 1 auto;
    min-width: 0;
    white-space: normal;
    text-align: center;
  }

  .panel-card {
    padding: 1.35rem;
    border-radius: 20px;
  }

  .stats-grid,
  .overview-grid,
  .metric-grid,
  .monitor-grid,
  .chart-grid,
  .asset-card-list {
    grid-template-columns: 1fr;
  }

  .asset-card-list {
    grid-template-columns: 1fr;
  }

  .check-section.two-columns {
    grid-template-columns: 1fr;
  }

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

  .overview-command-center {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto;
    min-height: 0;
    gap: 0.85rem;
  }

  .soc-card--hero {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .soc-metric--assets {
    grid-column: 1;
    grid-row: auto;
  }

  .soc-metric--uptime {
    grid-column: 2;
    grid-row: auto;
  }

  .soc-metric--ssl {
    grid-column: 1;
    grid-row: auto;
  }

  .soc-metric--headers {
    grid-column: 2;
    grid-row: auto;
  }

  .soc-metric--defacement {
    grid-column: 1;
    grid-row: auto;
  }

  .soc-metric--dns {
    grid-column: 2;
    grid-row: auto;
  }

  .soc-metric {
    min-height: 148px;
  }

  .score-meter {
    margin: 0.25rem 0 0.4rem;
  }

  .overview-command-center .soc-card:hover,
  .overview-command-center .soc-card--hero:hover {
    transform: none;
  }

  .settings-container {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .settings-nav-mobile {
    display: block;
  }

  .settings-nav-desktop {
    display: none;
  }

  .settings-sidebar {
    position: static;
  }

  .settings-content {
    min-width: 0;
    width: 100%;
  }

  .settings-content .panel-card {
    padding: 1.25rem;
  }

  .method-tabs {
    flex-direction: column;
  }

  .method-tab {
    min-width: 100%;
  }

  .action-bar .btn,
  .asset-card-actions .btn {
    flex: 1 1 calc(50% - 0.35rem);
    min-width: 0;
    white-space: normal;
    text-align: center;
  }

  .chart-wrap--trend {
    height: min(320px, 42vh);
    min-height: 240px;
  }

  .chart-wrap--donut {
    height: 240px;
    min-height: 200px;
  }
}

@media (max-width: 640px) {
  .dashboard-shell {
    padding: 0.65rem 0.65rem 1.25rem;
  }

  .topbar {
    justify-content: space-between;
    padding: 0.85rem;
    min-height: 56px;
    gap: 0.5rem;
  }

  .topbar-brand {
    gap: 0.5rem;
    min-width: 0;
    flex-shrink: 1;
  }

  .navbar-logo {
    width: 36px;
  }

  .sidebar-title {
    font-size: 1.1rem;
  }

  .sidebar-subtitle {
    /* display: none; */
    font-size: 0.6rem;
  }

  .topbar-action,
  .hamburger-toggle {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
  }

  .topbar-link,
  .drawer-link {
    font-size: 0.87rem;
    padding: 0.35rem 0.5rem;
  }

  .page-title {
    font-size: 1.65rem;
  }

  .page-subtitle {
    font-size: 0.92rem;
    line-height: 1.55;
  }

  .panel-card {
    padding: 1.15rem;
    border-radius: 18px;
  }

  .metric-value,
  .status-value {
    font-size: 1.65rem;
  }

  .action-bar .btn,
  .asset-card-actions .btn,
  .panel-actions .btn,
  .panel-actions .primary-button {
    flex: 1 1 100%;
    width: 100%;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

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

  .asset-detail-grid {
    grid-template-columns: 1fr;
  }

  .overview-command-center {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    gap: 0.75rem;
    min-height: 0;
    margin-bottom: 1rem;
  }

  .soc-card--hero,
  .soc-metric--assets,
  .soc-metric--uptime,
  .soc-metric--ssl,
  .soc-metric--headers,
  .soc-metric--defacement,
  .soc-metric--dns {
    grid-column: 1;
    grid-row: auto;
    width: 100%;
  }

  .soc-card--hero {
    padding: 1.15rem 1rem 1rem;
  }

  .soc-card__hero-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
  }

  .soc-card__title {
    font-size: 1.2rem;
  }

  .risk-pill {
    align-self: flex-start;
  }

  .score-meter {
    margin: 0.2rem 0 0.35rem;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  .soc-card--hero {
    overflow: hidden;
  }

  .meter-segments {
    --meter-radius: 78px;
    width: min(220px, 100%);
    max-width: 100%;
    height: 118px;
  }

  .meter-segment {
    width: 6px;
    height: 24px;
    margin-left: -3px;
  }

  .score-meter__center {
    width: min(9.5rem, 78%);
  }

  .score-meter__value {
    font-size: clamp(1.65rem, 8vw, 2.25rem);
  }

  .score-meter__unit {
    font-size: 0.88rem;
  }

  .score-meter__footer {
    gap: 0.4rem;
    margin-top: 0.35rem;
    padding-top: 0.55rem;
  }

  .trend-pill {
    font-size: 0.78rem;
    flex-wrap: wrap;
  }

  .score-meter__updated {
    font-size: 0.74rem;
    line-height: 1.45;
    word-break: break-word;
  }

  .score-meter__note {
    font-size: 0.78rem;
  }

  .soc-metric {
    min-height: 0;
    height: auto;
    padding: 1rem;
    gap: 0.75rem;
    align-items: flex-start;
  }

  .soc-metric__icon {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
  }

  .soc-metric__icon svg {
    width: 20px;
    height: 20px;
  }

  .soc-metric__body {
    gap: 0.3rem;
    min-width: 0;
    flex: 1;
  }

  .soc-metric__label {
    font-size: 0.68rem;
  }

  .soc-metric__value {
    font-size: 1.45rem;
  }

  .soc-metric__value--grade {
    font-size: 1.65rem;
  }

  .soc-metric__suffix {
    font-size: 0.82rem;
  }

  .soc-metric__desc {
    font-size: 0.78rem;
    line-height: 1.45;
    margin-top: 0.25rem;
  }

  .soc-metric__status {
    margin-top: 0.15rem;
  }

  .soc-metric__value-row {
    flex-wrap: wrap;
  }

  .chart-panel__header {
    flex-direction: column;
    align-items: stretch;
  }

  .chart-panel {
    padding: 1rem;
  }

  .chart-range-tabs {
    width: 100%;
    justify-content: stretch;
  }

  .chart-range-tab {
    flex: 1;
  }

  .chart-card {
    padding: 1rem;
  }

  .chart-wrap--trend {
    height: min(280px, 40vh);
    min-height: 220px;
  }

  .chart-wrap--donut {
    height: 220px;
    min-height: 180px;
  }

  .check-summary-card {
    padding: 1.15rem;
  }

  .data-table th,
  .data-table td {
    padding: 0.75rem 0.65rem;
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .overview-command-center {
    gap: 0.65rem;
  }

  .soc-card--hero {
    padding: 1rem 0.9rem;
    border-radius: 18px;
  }

  .soc-metric {
    padding: 0.9rem;
    border-radius: 18px;
  }

  .meter-segments {
    --meter-radius: 70px;
    width: min(200px, 100%);
    height: 108px;
  }

  .meter-segment {
    height: 22px;
  }

  .soc-metric__value {
    font-size: 1.35rem;
  }

  .soc-metric__value--grade {
    font-size: 1.5rem;
  }
}

@media (max-width: 900px) and (min-width: 641px) {
  .overview-command-center .soc-card:hover,
  .overview-command-center .soc-card--hero:hover {
    transform: none;
  }

  .soc-card--hero {
    overflow: hidden;
  }

  .meter-segments {
    --meter-radius: 80px;
    width: min(215px, 100%);
    height: 122px;
  }

  .score-meter__center {
    width: min(10rem, 75%);
  }

  .score-meter__value {
    font-size: clamp(1.65rem, 5vw, 2.2rem);
  }

  .score-meter__footer {
    margin-top: 0.3rem;
    padding-top: 0.5rem;
  }
}

.form-layout {
  display: grid;
  gap: 1.25rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.form-group {
  display: grid;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.95rem 1rem;
  border-radius: 18px;
  border: 1px solid rgba(229, 231, 235, 0.95);
  background: #f8fafc;
  color: var(--text);
}

.form-group textarea {
  min-height: 140px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
}

.flash {
  padding: 1rem 1.2rem;
  border-radius: 18px;
  border: 1px solid transparent;
  margin-bottom: 1rem;
}

.flash.success {
  background: rgba(220, 253, 232, 0.75);
  border-color: rgba(16, 185, 129, 0.25);
  color: #166534;
}

.flash.danger {
  background: rgba(254, 226, 226, 0.75);
  border-color: rgba(239, 68, 68, 0.25);
  color: #991b1b;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  padding: 2rem;
}

.auth-hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2rem;
  padding: 3rem;
}

.auth-hero-subtitle {
  color: var(--text-secondary);
  line-height: 1.8;
}

.auth-preview {
  position: relative;
  background: linear-gradient(
    180deg,
    rgba(37, 99, 235, 0.08),
    rgba(79, 70, 229, 0.02)
  );
  border-radius: 32px;
  padding: 2rem;
  box-shadow: var(--shadow);
}

.preview-metric {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(229, 231, 235, 0.95);
}

.preview-metric span {
  color: var(--text-secondary);
}

.auth-card {
  max-width: 520px;
  margin: 0 auto;
  padding: 2rem;
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
  border: 1px solid rgba(229, 231, 235, 0.95);
}

.auth-card h2 {
  margin-bottom: 1rem;
}

.auth-card p {
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
  line-height: 1.75;
}

.auth-card label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.auth-card input {
  width: 100%;
  padding: 1rem 1.1rem;
  border-radius: 16px;
  border: 1px solid rgba(229, 231, 235, 0.95);
  background: #f8fafc;
  margin-bottom: 1rem;
}

.auth-card .cta-btn {
  width: 100%;
  padding: 1rem 1.2rem;
  border-radius: 18px;
  border: none;
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
  color: #fff;
  font-weight: 700;
}

@media (max-width: 1200px) {
  .topbar {
    padding: 1rem 1.25rem;
  }

  .topbar-nav {
    gap: 0.65rem;
  }
}

@media (max-width: 900px) {
  .topbar {
    justify-content: space-between;
  }

  .topbar-nav {
    display: none;
  }

  .hamburger-toggle {
    display: inline-flex;
  }

  .page-header {
    gap: 0.75rem;
  }

  .drawer-backdrop {
    display: block;
  }

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

  .auth-hero,
  .auth-preview {
    padding: 2rem;
  }
}

/* --- App-wide SaaS surfaces (post-login) --- */
.dashboard-app .saas-page-content {
  gap: 1.35rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: clip;
}

.dashboard-app .page-content {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: clip;
}

.dashboard-app .chart-panel,
.dashboard-app .chart-card,
.dashboard-app .panel-card.full-width {
  max-width: 100%;
  min-width: 0;
}

.dashboard-app .chart-wrap,
.dashboard-app .chart-wrap canvas {
  max-width: 100%;
}

.dashboard-app .page-header {
  padding-bottom: 0.25rem;
}

.dashboard-app .panel-title {
  margin-bottom: 1.25rem;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.dashboard-app .panel-note,
.dashboard-app .muted {
  font-size: 0.92rem;
}

.dashboard-app .empty-state {
  border-radius: 18px;
  border: 1px dashed rgba(191, 219, 254, 0.65);
  background: linear-gradient(
    180deg,
    rgba(239, 246, 255, 0.65),
    rgba(255, 255, 255, 0.9)
  );
}

.dashboard-app .data-table th {
  background: rgba(248, 250, 252, 0.98);
}

.dashboard-app .data-table tbody tr:hover {
  background: rgba(37, 99, 235, 0.04);
}

.dashboard-app .form-group input,
.dashboard-app .form-group select,
.dashboard-app .form-group textarea {
  border-radius: 14px;
  border-color: rgba(229, 231, 235, 0.95);
  background: #fff;
  transition:
    border-color var(--transition),
    box-shadow var(--transition);
}

.dashboard-app .form-group input:focus,
.dashboard-app .form-group select:focus,
.dashboard-app .form-group textarea:focus {
  outline: none;
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.dashboard-app .detail-cell {
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

.dashboard-app .flash {
  border-radius: 14px;
}

.dashboard-app .stats-grid .metric-card {
  min-height: 0;
}

.dashboard-app .metric-card:hover {
  transform: translateY(-2px);
}

/* --- Defacement v3 (minimal) --- */
.deface-v3 {
  display: grid;
  gap: 1rem;
}

.deface-v3__eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-strong);
}

.deface-v3__title {
  margin: 0;
  font-size: clamp(1.5rem, 2.5vw, 1.85rem);
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.deface-v3__lede {
  margin: 0.55rem 0 0;
  max-width: 42rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.65;
}

.deface-v3__meta-dot {
  margin: 0 0.35rem;
  opacity: 0.45;
}

/* Masthead */
.deface-v3__masthead {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 0.25rem 0 0.5rem;
}

.deface-v3__stat-strip {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.deface-v3__stat {
  display: grid;
  gap: 0.1rem;
  min-width: 4.5rem;
  padding: 0.65rem 0.85rem;
  border-radius: 14px;
  border: 1px solid rgba(229, 231, 235, 0.9);
  background: rgba(255, 255, 255, 0.85);
  text-align: center;
}

.deface-v3__stat-value {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
}

.deface-v3__stat-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.deface-v3__stat--critical .deface-v3__stat-value { color: var(--danger); }
.deface-v3__stat--warning .deface-v3__stat-value { color: var(--warning); }
.deface-v3__stat--healthy .deface-v3__stat-value { color: var(--success); }
.deface-v3__stat--neutral .deface-v3__stat-value { color: #64748b; }

/* Toolbar */
.deface-v3__toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem 1.25rem !important;
}

.deface-v3__toolbar-fields {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  flex: 1;
  flex-wrap: wrap;
  min-width: 0;
}

.deface-v3__field {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
}

.deface-v3__field--grow {
  flex: 1 1 200px;
}

.deface-v3__field--narrow {
  width: 5.5rem;
}

.deface-v3__field--check {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 0.55rem;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.deface-v3__field-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.deface-v3__field input,
.deface-v3__field select {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(229, 231, 235, 0.95);
  background: #fff;
  color: var(--text);
  font-size: 0.9rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.deface-v3__field input:focus,
.deface-v3__field select:focus {
  outline: none;
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.deface-v3__toolbar-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* List */
.deface-v3__list {
  padding: 0 !important;
  overflow: hidden;
}

.deface-v3__row {
  position: relative;
  display: grid;
  gap: 0.85rem;
  padding: 1.15rem 1.35rem 1.15rem 1.5rem;
  border-bottom: 1px solid rgba(229, 231, 235, 0.75);
  transition: background var(--transition);
}

.deface-v3__row:last-child {
  border-bottom: none;
}

.deface-v3__row:hover {
  background: rgba(248, 250, 252, 0.65);
}

.deface-v3__row-accent {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--brand);
  opacity: 0.35;
}

.deface-v3__row--warning .deface-v3__row-accent {
  background: var(--warning);
  opacity: 0.85;
}

.deface-v3__row--critical .deface-v3__row-accent {
  background: var(--danger);
  opacity: 0.9;
}

.deface-v3__row--unknown .deface-v3__row-accent {
  background: #94a3b8;
  opacity: 0.7;
}

.deface-v3__row-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.deface-v3__domain {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  word-break: break-word;
}

.deface-v3__meta {
  margin: 0.25rem 0 0;
  font-size: 0.84rem;
  color: var(--text-secondary);
}

.deface-v3__row-head-end {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.deface-v3__score {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--brand-strong);
  line-height: 1;
}

.deface-v3__score[data-level="warning"] { color: var(--warning); }
.deface-v3__score[data-level="critical"] { color: var(--danger); }
.deface-v3__score[data-level="healthy"] { color: var(--success); }

/* Meters */
.deface-v3__meters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.deface-v3__meter-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.deface-v3__meter-top strong {
  font-size: 0.88rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text);
}

.deface-v3__meter-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.2);
  overflow: hidden;
}

.deface-v3__meter-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--brand-accent));
  transition: width 0.4s ease;
}

.deface-v3__meter-fill.is-warning {
  background: linear-gradient(90deg, #f59e0b, #f97316);
}

.deface-v3__meter-fill.is-critical {
  background: linear-gradient(90deg, #ef4444, #dc2626);
}

.deface-v3__row-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.deface-v3__signals {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  min-width: 0;
}

.deface-v3__chip {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  background: rgba(148, 163, 184, 0.12);
  color: #475569;
}

.deface-v3__chip--healthy {
  background: rgba(22, 163, 74, 0.1);
  color: var(--success);
}

.deface-v3__chip--warning {
  background: rgba(245, 158, 11, 0.12);
  color: var(--warning);
}

.deface-v3__chip--critical {
  background: rgba(239, 68, 68, 0.12);
  color: var(--danger);
}

.deface-v3__chip--neutral {
  background: rgba(148, 163, 184, 0.15);
  color: #64748b;
}

.deface-v3__link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--brand-strong);
  white-space: nowrap;
  transition: gap var(--transition), color var(--transition);
}

.deface-v3__link:hover {
  gap: 0.55rem;
  color: var(--brand);
}

.deface-v3__empty {
  text-align: center;
  padding: 2.5rem 1.5rem !important;
}

.deface-v3__empty-title {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 700;
}

/* Detail page */
.deface-v3--detail {
  gap: 1.15rem;
}

.deface-v3__back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  width: fit-content;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: color var(--transition);
}

.deface-v3__back:hover {
  color: var(--brand-strong);
}

.deface-v3__detail-hero {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 1.25rem 1.5rem;
  padding: 1.35rem 1.5rem;
  border-radius: 22px;
  border: 1px solid rgba(229, 231, 235, 0.9);
  background: #fff;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.05);
}

.deface-v3__detail-hero--normal {
  border-color: rgba(22, 163, 74, 0.2);
  background: linear-gradient(135deg, rgba(22, 163, 74, 0.04) 0%, #fff 55%);
}

.deface-v3__detail-hero--warning {
  border-color: rgba(245, 158, 11, 0.28);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.06) 0%, #fff 55%);
}

.deface-v3__detail-hero--critical {
  border-color: rgba(239, 68, 68, 0.28);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.06) 0%, #fff 55%);
}

.deface-v3__detail-title {
  margin: 0.2rem 0 0;
  font-size: clamp(1.25rem, 2.2vw, 1.55rem);
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.deface-v3__detail-meta {
  margin: 0.45rem 0 0;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.deface-v3__detail-score {
  display: grid;
  justify-items: center;
  gap: 0.35rem;
  text-align: center;
}

.deface-v3__detail-ring {
  --pct: 0;
  width: 4.75rem;
  height: 4.75rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(
    var(--brand) calc(var(--pct) * 1%),
    rgba(226, 232, 240, 0.9) 0
  );
  position: relative;
}

.deface-v3__detail-ring::before {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: #fff;
}

.deface-v3__detail-ring span {
  position: relative;
  z-index: 1;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--brand-strong);
}

.deface-v3__detail-score-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.deface-v3__detail-action {
  align-self: center;
}

.deface-v3__detail-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 1rem;
}

.deface-v3__detail-split {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1rem;
}

.deface-v3__panel {
  padding: 1.2rem 1.35rem !important;
}

.deface-v3__panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.deface-v3__panel-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 750;
  letter-spacing: -0.01em;
}

.deface-v3__panel-note {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.deface-v3__metric-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.deface-v3__metric-card {
  padding: 0.85rem 0.9rem;
  border-radius: 14px;
  border: 1px solid rgba(229, 231, 235, 0.85);
  background: rgba(248, 250, 252, 0.6);
  display: grid;
  gap: 0.25rem;
}

.deface-v3__metric-card.is-healthy {
  border-color: rgba(22, 163, 74, 0.2);
  background: rgba(22, 163, 74, 0.04);
}

.deface-v3__metric-card.is-warning {
  border-color: rgba(245, 158, 11, 0.25);
  background: rgba(245, 158, 11, 0.05);
}

.deface-v3__metric-card.is-critical {
  border-color: rgba(239, 68, 68, 0.25);
  background: rgba(239, 68, 68, 0.05);
}

.deface-v3__metric-card.is-warning .deface-v3__meter-fill {
  background: linear-gradient(90deg, #f59e0b, #f97316);
}

.deface-v3__metric-card.is-critical .deface-v3__meter-fill {
  background: linear-gradient(90deg, #ef4444, #dc2626);
}

.deface-v3__metric-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.deface-v3__metric-value {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.deface-v3__signal-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.deface-v3__signal {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  background: rgba(248, 250, 252, 0.8);
  border: 1px solid rgba(229, 231, 235, 0.8);
}

.deface-v3__signal--warning {
  border-color: rgba(245, 158, 11, 0.25);
  background: rgba(245, 158, 11, 0.06);
}

.deface-v3__signal--critical {
  border-color: rgba(239, 68, 68, 0.25);
  background: rgba(239, 68, 68, 0.06);
}

.deface-v3__signal-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--warning);
  flex-shrink: 0;
}

.deface-v3__signal--critical .deface-v3__signal-dot {
  background: var(--danger);
}

.deface-v3__signal-empty {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.deface-v3__keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.85rem;
}

.deface-v3__alert {
  margin-top: 0.85rem;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.08);
  font-size: 0.88rem;
}

.deface-v3__alert strong {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--warning);
}

.deface-v3__alert p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.5;
}

.deface-v3__compare {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
  align-items: stretch;
}

.deface-v3__compare-col {
  padding: 1rem;
  border-radius: 14px;
  border: 1px solid rgba(229, 231, 235, 0.85);
  background: rgba(248, 250, 252, 0.5);
}

.deface-v3__compare-col--current {
  border-color: rgba(245, 158, 11, 0.25);
  background: rgba(245, 158, 11, 0.04);
}

.deface-v3__compare-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 0.45rem;
}

.deface-v3__compare-text {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.55;
  word-break: break-word;
}

.deface-v3__compare-divider {
  width: 1px;
  background: rgba(229, 231, 235, 0.9);
  align-self: stretch;
}

.deface-v3__chart {
  height: 160px;
  margin-top: 0.25rem;
}

.deface-v3__snapshot-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.deface-v3__facts {
  margin: 0;
  display: grid;
  gap: 0.55rem;
}

.deface-v3__facts div {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 0.5rem;
  align-items: baseline;
}

.deface-v3__facts dt {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.deface-v3__facts dd {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 600;
  word-break: break-all;
}

.deface-v3__excerpt {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(229, 231, 235, 0.8);
}

.deface-v3__excerpt summary {
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--brand-strong);
  list-style: none;
}

.deface-v3__excerpt summary::-webkit-details-marker {
  display: none;
}

.deface-v3__excerpt p {
  margin: 0.65rem 0 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.deface-v3__history {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
}

.deface-v3__history-item {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(229, 231, 235, 0.7);
  align-items: center;
}

.deface-v3__history-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.deface-v3__history-time {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.deface-v3__history-body {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  min-width: 0;
}

.deface-v3__history-score {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-right: 0.15rem;
}

.deface-v3__history-risk {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-left: auto;
}

@media (max-width: 960px) {
  .deface-v3__detail-hero {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .deface-v3__detail-score {
    justify-items: start;
    grid-template-columns: auto 1fr;
    grid-auto-flow: column;
    align-items: center;
    gap: 0.75rem;
  }

  .deface-v3__detail-action {
    justify-self: start;
  }

  .deface-v3__detail-grid,
  .deface-v3__detail-split,
  .deface-v3__compare,
  .deface-v3__snapshot-grid {
    grid-template-columns: 1fr;
  }

  .deface-v3__compare-divider {
    display: none;
  }

  .deface-v3__metric-cards,
  .deface-v3__meters {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .deface-v3__masthead {
    flex-direction: column;
    align-items: flex-start;
  }

  .deface-v3__stat-strip {
    width: 100%;
  }

  .deface-v3__stat {
    flex: 1;
    min-width: 0;
  }

  .deface-v3__toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .deface-v3__toolbar-actions {
    justify-content: flex-end;
  }

  .deface-v3__row-head {
    flex-direction: column;
  }

  .deface-v3__row-head-end {
    width: 100%;
    justify-content: space-between;
  }

  .deface-v3__history-item {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .deface-v3__history-risk {
    margin-left: 0;
  }
}

/* --- Defacement premium dashboard --- */
.deface-dash {
  display: grid;
  gap: 1.25rem;
}

.deface-dash__eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-strong);
}

.deface-dash__hero {
  position: relative;
  padding: 1.35rem 1.5rem !important;
  overflow: hidden;
}

.deface-dash__hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 72% 50%,
    var(--nexus-glow, rgba(37, 99, 235, 0.09)) 0%,
    transparent 52%
  );
  pointer-events: none;
}

.deface-dash__hero[data-tier="excellent"] {
  --nexus-glow: rgba(22, 163, 74, 0.1);
}

.deface-dash__hero[data-tier="warning"] {
  --nexus-glow: rgba(245, 158, 11, 0.12);
}

.deface-dash__hero[data-tier="critical"] {
  --nexus-glow: rgba(239, 68, 68, 0.12);
}

.deface-dash__hero-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.5rem 2rem;
  align-items: center;
}

.deface-dash__hero-copy {
  min-width: 0;
}

.deface-dash__hero-meter {
  flex-shrink: 0;
  display: flex;
  justify-content: center;
}

.deface-dash__hero-foot--inline {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(229, 231, 235, 0.8);
}

.deface-dash__hero-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  text-align: left;
  margin-bottom: 0.25rem;
}

.deface-dash__hero-title {
  margin: 0;
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.deface-dash__status-badge {
  display: inline-flex;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  flex-shrink: 0;
}

.deface-dash__status-badge--healthy {
  background: rgba(22, 163, 74, 0.12);
  color: var(--success);
}

.deface-dash__status-badge--warning {
  background: rgba(245, 158, 11, 0.12);
  color: var(--warning);
}

.deface-dash__status-badge--critical {
  background: rgba(239, 68, 68, 0.12);
  color: var(--danger);
}

.deface-dash__status-badge--neutral {
  background: rgba(148, 163, 184, 0.15);
  color: #475569;
}

.deface-dash__hero-foot {
  position: relative;
  z-index: 1;
  margin-top: 0.5rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(229, 231, 235, 0.8);
}

.deface-dash__hero-foot--split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  text-align: left;
}

.deface-dash__scan-time {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.deface-dash__scan-time strong {
  color: var(--text);
}

.deface-dash__hero-note {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

/* Integrity Nexus meter, premium circular gauge */
.deface-nexus {
  --nexus-color: var(--brand);
  --nexus-glow: rgba(37, 99, 235, 0.35);
  --nexus-size: 272px;
  --nexus-circ: 703.716;
  width: var(--nexus-size);
  max-width: 100%;
}

.deface-nexus[data-tier="excellent"] {
  --nexus-color: var(--success);
  --nexus-glow: rgba(22, 163, 74, 0.38);
}

.deface-nexus[data-tier="good"] {
  --nexus-color: var(--brand);
  --nexus-glow: rgba(37, 99, 235, 0.35);
}

.deface-nexus[data-tier="warning"] {
  --nexus-color: var(--warning);
  --nexus-glow: rgba(245, 158, 11, 0.4);
}

.deface-nexus[data-tier="critical"] {
  --nexus-color: var(--danger);
  --nexus-glow: rgba(239, 68, 68, 0.4);
}

.deface-nexus__stage {
  position: relative;
  width: var(--nexus-size);
  height: var(--nexus-size);
  max-width: 100%;
  margin: 0 auto;
}

.deface-nexus__svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.deface-nexus__ring--ghost {
  fill: none;
  stroke: rgba(226, 232, 240, 0.55);
  stroke-width: 1;
}

.deface-nexus__ring--ghost-sm {
  fill: none;
  stroke: rgba(241, 245, 249, 0.9);
  stroke-width: 1;
}

.deface-nexus__track {
  stroke: rgba(226, 232, 240, 0.95);
}

.deface-nexus__progress {
  stroke: var(--nexus-color);
  stroke-dasharray: var(--nexus-circ);
  stroke-dashoffset: var(--nexus-circ);
}

.deface-nexus__tick {
  stroke: rgba(203, 213, 225, 0.9);
  stroke-width: 1.5;
  stroke-linecap: round;
  opacity: 0.55;
  transition: stroke 0.3s ease, opacity 0.3s ease;
}

.deface-nexus__tick.is-lit {
  stroke: var(--nexus-color);
  opacity: 1;
}

.deface-nexus__disc {
  filter: drop-shadow(0 8px 24px rgba(15, 23, 42, 0.06));
}

.deface-nexus__disc-ring {
  stroke: rgba(229, 231, 235, 0.95);
  stroke-width: 1.5;
}

.deface-nexus__crosshair line,
.deface-nexus__crosshair circle {
  stroke: rgba(226, 232, 240, 0.9);
  stroke-width: 1;
}

.deface-nexus__pointer {
  fill: var(--nexus-color);
  opacity: 0;
  transform-origin: 140px 140px;
  transition: opacity 0.4s ease 0.8s;
}

.deface-nexus.is-animated .deface-nexus__pointer {
  opacity: 0.95;
}

.deface-nexus__scale-mark {
  fill: #94a3b8;
  font-family: "Outfit", sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.deface-nexus__sweep {
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    transparent 340deg,
    rgba(37, 99, 235, 0.14) 350deg,
    transparent 360deg
  );
  opacity: 0;
  animation: defaceNexusSweep 2.4s ease-out 0.2s 1 forwards;
  pointer-events: none;
}

.deface-nexus[data-tier="excellent"] .deface-nexus__sweep {
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    transparent 340deg,
    rgba(22, 163, 74, 0.16) 350deg,
    transparent 360deg
  );
}

.deface-nexus[data-tier="warning"] .deface-nexus__sweep {
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    transparent 340deg,
    rgba(245, 158, 11, 0.18) 350deg,
    transparent 360deg
  );
}

.deface-nexus[data-tier="critical"] .deface-nexus__sweep {
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    transparent 340deg,
    rgba(239, 68, 68, 0.18) 350deg,
    transparent 360deg
  );
}

@keyframes defaceNexusSweep {
  0% {
    opacity: 0;
    transform: rotate(0deg);
  }
  15% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: rotate(360deg);
  }
}

.deface-nexus__pulse {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58%;
  height: 58%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid var(--nexus-color);
  opacity: 0;
  animation: defaceNexusPulse 2.8s ease-out 1s infinite;
  pointer-events: none;
}

@keyframes defaceNexusPulse {
  0% {
    transform: translate(-50%, -50%) scale(0.92);
    opacity: 0.45;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.08);
    opacity: 0;
  }
}

.deface-nexus__core {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  width: 58%;
  pointer-events: none;
  z-index: 2;
}

.deface-nexus__value-row {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0.1rem;
  line-height: 1;
}

.deface-nexus__value {
  font-size: clamp(2.1rem, 3.2vw, 2.85rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.deface-nexus__unit {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-top: 0.35rem;
}

.deface-nexus__label {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--nexus-color);
}

.deface-nexus__facets {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.85rem;
  padding: 0.75rem 0.85rem;
  border-radius: 16px;
  border: 1px solid rgba(229, 231, 235, 0.9);
  background: rgba(248, 250, 252, 0.75);
}

.deface-nexus__facet {
  display: grid;
  grid-template-columns: 4.25rem 1fr 2.5rem;
  gap: 0.55rem;
  align-items: center;
}

.deface-nexus__facet-name {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.deface-nexus__facet-track {
  height: 5px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.22);
  overflow: hidden;
}

.deface-nexus__facet-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: var(--nexus-color);
  transition: width 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.deface-nexus__facet--healthy .deface-nexus__facet-fill {
  background: var(--success);
}

.deface-nexus__facet--warning .deface-nexus__facet-fill {
  background: var(--warning);
}

.deface-nexus__facet--critical .deface-nexus__facet-fill {
  background: var(--danger);
}

.deface-nexus.is-animated .deface-nexus__facet-fill {
  width: var(--w, 0);
}

.deface-nexus__facet-val {
  font-size: 0.78rem;
  font-weight: 800;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

@media (prefers-reduced-motion: reduce) {
  .deface-nexus__sweep,
  .deface-nexus__pulse {
    animation: none !important;
    opacity: 0 !important;
  }

  .deface-nexus__progress,
  .deface-nexus__pointer,
  .deface-nexus__facet-fill {
    transition: none !important;
  }
}

@media (max-width: 900px) {
  .deface-dash__hero-layout {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .deface-dash__hero-meter {
    order: -1;
  }
}

/* KPI grid */
.deface-dash__kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem;
}

.deface-dash__kpi-grid--compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.deface-dash__kpi {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  padding: 1.15rem 1.2rem;
  border-radius: 22px;
  border: 1px solid rgba(229, 231, 235, 0.9);
  background: linear-gradient(165deg, #ffffff 0%, #f8fafc 60%, #f1f5f9 100%);
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.05);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  min-height: 110px;
}

.deface-dash__kpi:hover {
  transform: translateY(-2px);
  border-color: rgba(147, 197, 253, 0.45);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
}

.deface-dash__kpi-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.deface-dash__kpi-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

.deface-dash__kpi-icon--brand {
  background: rgba(37, 99, 235, 0.1);
  color: var(--brand-strong);
}

.deface-dash__kpi-icon--success {
  background: rgba(22, 163, 74, 0.1);
  color: var(--success);
}

.deface-dash__kpi-icon--warning {
  background: rgba(245, 158, 11, 0.12);
  color: var(--warning);
}

.deface-dash__kpi-icon--neutral {
  background: rgba(148, 163, 184, 0.15);
  color: #64748b;
}

.deface-dash__kpi-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

.deface-dash__kpi-value {
  display: block;
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.deface-dash__kpi-value--sm {
  font-size: 1.15rem;
}

.deface-dash__kpi-sub {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Mid grid */
.deface-dash__mid-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 1rem;
}

.deface-dash__section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.1rem;
}

.deface-dash__section-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.deface-dash__section-sub {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* Overview */
.deface-dash__overview-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.deface-dash__overview-stat {
  padding: 0.85rem;
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.8);
  border: 1px solid rgba(229, 231, 235, 0.85);
  text-align: center;
}

.deface-dash__overview-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.deface-dash__overview-value--success { color: var(--success); }
.deface-dash__overview-value--warning { color: var(--warning); }

.deface-dash__overview-label {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.deface-dash__progress-block {
  margin-bottom: 0.85rem;
}

.deface-dash__progress-head {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.45rem;
}

.deface-dash__progress-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.2);
  overflow: hidden;
}

.deface-dash__progress-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  transition: width 0.7s ease;
}

.deface-dash__progress-fill--brand { background: var(--brand); }

.deface-dash__overview-meta {
  margin: 0;
  font-size: 0.84rem;
  color: var(--text-secondary);
}

.deface-dash__donut-wrap,
.deface-dash__trend-wrap {
  height: 200px;
  position: relative;
}

.deface-dash__trend-wrap {
  height: 180px;
}

/* Badges */
.deface-dash__badge {
  display: inline-flex;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.deface-dash__badge--normal,
.deface-dash__badge--healthy {
  background: rgba(22, 163, 74, 0.12);
  color: var(--success);
}

.deface-dash__badge--warning {
  background: rgba(245, 158, 11, 0.12);
  color: var(--warning);
}

.deface-dash__badge--critical {
  background: rgba(239, 68, 68, 0.12);
  color: var(--danger);
}

.deface-dash__badge--unknown,
.deface-dash__badge--neutral {
  background: rgba(148, 163, 184, 0.15);
  color: #64748b;
}

.deface-dash__badge--monitoring {
  background: rgba(37, 99, 235, 0.12);
  color: var(--brand-strong);
}

/* Page health */
.deface-dash__health-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.deface-dash__health-row {
  display: grid;
  gap: 0.5rem;
}

.deface-dash__health-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.deface-dash__health-name {
  font-size: 0.92rem;
  font-weight: 700;
}

.deface-dash__health-bar-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.deface-dash__health-bar {
  flex: 1;
  height: 5px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.2);
  overflow: hidden;
}

.deface-dash__health-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--brand);
  transition: width 0.6s ease;
}

.deface-dash__health-fill.is-healthy { background: var(--success); }
.deface-dash__health-fill.is-warning { background: var(--warning); }
.deface-dash__health-fill.is-critical { background: var(--danger); }

.deface-dash__health-pct {
  font-size: 0.82rem;
  font-weight: 700;
  min-width: 2.5rem;
  text-align: right;
}

/* Timeline */
.deface-dash__timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 0.5rem;
  border-left: 2px solid rgba(229, 231, 235, 0.9);
}

.deface-dash__timeline-item {
  position: relative;
  padding: 0 0 1.1rem 1.25rem;
}

.deface-dash__timeline-item:last-child {
  padding-bottom: 0;
}

.deface-dash__timeline-dot {
  position: absolute;
  left: -0.55rem;
  top: 0.2rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand);
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(229, 231, 235, 0.9);
}

.deface-dash__timeline-item--baseline .deface-dash__timeline-dot { background: var(--brand); }
.deface-dash__timeline-item--change .deface-dash__timeline-dot { background: var(--warning); }
.deface-dash__timeline-item--passed .deface-dash__timeline-dot { background: var(--success); }

.deface-dash__timeline-title {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
}

.deface-dash__timeline-desc {
  display: block;
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 0.15rem;
}

.deface-dash__timeline-time {
  display: block;
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

/* Toolbar */
.deface-dash__toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem 1.25rem !important;
}

.deface-dash__toolbar-fields {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  flex: 1;
  flex-wrap: wrap;
}

.deface-dash__field {
  display: grid;
  gap: 0.3rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.deface-dash__field--grow { flex: 1 1 200px; }
.deface-dash__field--narrow { width: 5rem; }

.deface-dash__field--check {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-direction: row;
  text-transform: none;
  font-size: 0.85rem;
  padding-bottom: 0.5rem;
  cursor: pointer;
}

.deface-dash__field input,
.deface-dash__field select {
  padding: 0.55rem 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(229, 231, 235, 0.95);
  font-size: 0.9rem;
  text-transform: none;
  font-weight: 500;
}

.deface-dash__toolbar-actions {
  display: flex;
  gap: 0.5rem;
}

/* Table */
.deface-dash__table-card {
  padding: 1.25rem 1.35rem !important;
  overflow: hidden;
}

.deface-dash__table-head,
.deface-dash__table-row {
  display: grid;
  grid-template-columns: 2fr 1fr 0.8fr 0.9fr 0.9fr 0.8fr;
  gap: 0.75rem;
  align-items: center;
}

.deface-dash__table-head {
  padding: 0 0.5rem 0.75rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(229, 231, 235, 0.85);
}

.deface-dash__table-row {
  padding: 1rem 0.5rem;
  border-bottom: 1px solid rgba(229, 231, 235, 0.7);
  transition: background var(--transition);
}

.deface-dash__table-row:hover {
  background: rgba(248, 250, 252, 0.7);
}

.deface-dash__table-row:last-child {
  border-bottom: none;
}

.deface-dash__table-cell--url {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.deface-dash__table-cell--url strong {
  font-size: 0.92rem;
  word-break: break-word;
}

.deface-dash__table-muted {
  font-size: 0.8rem;
  color: var(--text-secondary);
  word-break: break-all;
}

.deface-dash__table-score {
  font-size: 1rem;
  font-weight: 800;
}

.deface-dash__investigate {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--brand-strong);
  transition: color var(--transition);
}

.deface-dash__investigate:hover {
  color: var(--brand);
}

/* How it works */
.deface-dash__how-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.deface-dash__how-card {
  padding: 1rem 1.1rem;
  border-radius: 18px;
  border: 1px solid rgba(229, 231, 235, 0.85);
  background: rgba(248, 250, 252, 0.6);
  transition: transform var(--transition), border-color var(--transition);
}

.deface-dash__how-card:hover {
  transform: translateY(-2px);
  border-color: rgba(147, 197, 253, 0.4);
}

.deface-dash__how-icon {
  display: inline-flex;
  width: 2rem;
  height: 2rem;
  border-radius: 10px;
  background: rgba(37, 99, 235, 0.1);
  color: var(--brand-strong);
  align-items: center;
  justify-content: center;
  margin-bottom: 0.55rem;
}

.deface-dash__how-icon svg {
  width: 1rem;
  height: 1rem;
}

.deface-dash__how-card h3 {
  margin: 0 0 0.35rem;
  font-size: 0.92rem;
  font-weight: 700;
}

.deface-dash__how-card p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.deface-dash__empty-row {
  margin: 0;
  padding: 1rem 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-align: center;
}

/* Detail page extras */
.deface-dash--detail {
  gap: 1.15rem;
}

.deface-dash__back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  width: fit-content;
}

.deface-dash__back:hover {
  color: var(--brand-strong);
}

.deface-dash__signal-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.deface-dash__signal {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 0.8rem;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 600;
  border: 1px solid rgba(229, 231, 235, 0.85);
  background: rgba(248, 250, 252, 0.7);
}

.deface-dash__signal--warning {
  border-color: rgba(245, 158, 11, 0.25);
  background: rgba(245, 158, 11, 0.06);
}

.deface-dash__signal--critical {
  border-color: rgba(239, 68, 68, 0.25);
  background: rgba(239, 68, 68, 0.06);
}

.deface-dash__signal-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--warning);
  flex-shrink: 0;
}

.deface-dash__signal--critical .deface-dash__signal-dot {
  background: var(--danger);
}

.deface-dash__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.deface-dash__alert-box {
  margin-top: 0.75rem;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.08);
  font-size: 0.85rem;
}

.deface-dash__compare {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
}

.deface-dash__compare-col {
  padding: 1rem;
  border-radius: 16px;
  border: 1px solid rgba(229, 231, 235, 0.85);
  background: rgba(248, 250, 252, 0.5);
}

.deface-dash__compare-col--current {
  border-color: rgba(245, 158, 11, 0.25);
  background: rgba(245, 158, 11, 0.04);
}

.deface-dash__compare-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

.deface-dash__compare-text {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.55;
  word-break: break-word;
}

.deface-dash__compare-divider {
  width: 1px;
  background: rgba(229, 231, 235, 0.9);
}

.deface-dash__facts {
  margin: 0;
  display: grid;
  gap: 0.55rem;
}

.deface-dash__facts div {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 0.5rem;
}

.deface-dash__facts dt {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.deface-dash__facts dd {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 600;
  word-break: break-all;
}

.deface-dash__excerpt {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(229, 231, 235, 0.8);
}

.deface-dash__excerpt summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--brand-strong);
}

.deface-dash__excerpt p {
  margin: 0.5rem 0 0;
  font-size: 0.84rem;
  color: var(--text-secondary);
  white-space: pre-wrap;
}

@media (max-width: 1100px) {
  .deface-dash__kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .deface-dash__how-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .deface-dash__kpi-grid,
  .deface-dash__kpi-grid--compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .deface-dash__mid-grid {
    grid-template-columns: 1fr;
  }
  .deface-dash__compare {
    grid-template-columns: 1fr;
  }
  .deface-dash__compare-divider {
    display: none;
  }
  .deface-dash__table-head {
    display: none;
  }
  .deface-dash__table-row {
    grid-template-columns: 1fr;
    gap: 0.4rem;
    padding: 1rem 0;
  }
}

@media (max-width: 640px) {
  .deface-dash__kpi-grid {
    grid-template-columns: 1fr;
  }
  .deface-dash__overview-stats {
    grid-template-columns: 1fr;
  }
  .deface-dash__how-grid {
    grid-template-columns: 1fr;
  }
  .deface-dash__hero-top {
    flex-direction: column;
  }

  .deface-dash__hero-layout {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .deface-dash__hero-meter {
    order: -1;
  }

  .deface-nexus {
    --nexus-size: 240px;
  }
}

/* --- Error pages --- */
.error-page-body {
  min-height: 100vh;
  background: linear-gradient(165deg, #f8fafc 0%, #eef2ff 55%, #f8fafc 100%);
}

.error-page {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-items: center;
  justify-items: center;
  padding: 1.5rem 1.25rem 2rem;
  overflow: hidden;
}

.error-page__backdrop {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.error-page__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.08) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, #000 20%, transparent 72%);
}

.error-page__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
}

.error-page__glow--one {
  width: 340px;
  height: 340px;
  top: 8%;
  right: 12%;
  background: rgba(37, 99, 235, 0.16);
}

.error-page__glow--two {
  width: 280px;
  height: 280px;
  bottom: 10%;
  left: 8%;
  background: rgba(79, 70, 229, 0.12);
}

.error-page__brand {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  margin-bottom: 1.25rem;
}

.error-page__logo-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  transition: color var(--transition);
}

.error-page__logo-link:hover {
  color: var(--brand-strong);
}

.error-page__logo-link img {
  width: 2.5rem;
  height: 2.5rem;
}

.error-page__card {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  display: grid;
  grid-template-columns: minmax(220px, 0.95fr) minmax(0, 1.15fr);
  gap: 2rem;
  align-items: center;
  padding: 2rem 2.1rem;
  border-radius: 28px;
  border: 1px solid rgba(229, 231, 235, 0.95);
  background: rgba(255, 255, 255, 0.92);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 24px 64px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(8px);
}

.error-page__visual {
  display: grid;
  justify-items: center;
  gap: 0.5rem;
}

.error-page__radar {
  position: relative;
  width: 168px;
  height: 168px;
  display: grid;
  place-items: center;
  color: var(--brand-strong);
}

.error-page__radar-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(37, 99, 235, 0.18);
  animation: errorRadarPulse 3.2s ease-out infinite;
}

.error-page__radar-ring--delay {
  inset: 14px;
  animation-delay: 1.1s;
}

@keyframes errorRadarPulse {
  0% {
    transform: scale(0.88);
    opacity: 0.75;
  }
  70% {
    transform: scale(1.05);
    opacity: 0.15;
  }
  100% {
    transform: scale(1.05);
    opacity: 0;
  }
}

.error-page__radar-sweep {
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    transparent 300deg,
    rgba(37, 99, 235, 0.14) 330deg,
    transparent 360deg
  );
  animation: errorRadarSweep 4s linear infinite;
}

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

.error-page__shield {
  width: 72px;
  height: 82px;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 8px 18px rgba(37, 99, 235, 0.18));
}

.error-page__code {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.15rem;
  font-size: clamp(3rem, 8vw, 4.5rem);
  font-weight: 900;
  letter-spacing: -0.06em;
  line-height: 1;
  color: var(--text);
}

.error-page__code-zero {
  color: var(--brand-strong);
  animation: errorCodeBlink 2.4s ease-in-out infinite;
}

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

.error-page__content {
  min-width: 0;
}

.error-page__eyebrow {
  margin: 0 0 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-strong);
}

.error-page__title {
  margin: 0 0 0.65rem;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.error-page__message {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 0.96rem;
  max-width: 36rem;
}

.error-page__path {
  margin-top: 1.1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 14px;
  border: 1px solid rgba(229, 231, 235, 0.95);
  background: rgba(248, 250, 252, 0.9);
  display: grid;
  gap: 0.3rem;
}

.error-page__path-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.error-page__path code {
  font-family: ui-monospace, "Cascadia Code", "Segoe UI Mono", monospace;
  font-size: 0.82rem;
  color: var(--text);
  word-break: break-all;
}

.error-page__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.35rem;
}

.error-page__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.1rem;
  margin-top: 1.15rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(229, 231, 235, 0.85);
}

.error-page__links a {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: color var(--transition);
}

.error-page__links a:hover {
  color: var(--brand-strong);
}

.error-page__footer {
  position: relative;
  z-index: 1;
  margin-top: 1.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

@media (max-width: 768px) {
  .error-page__card {
    grid-template-columns: 1fr;
    gap: 1.35rem;
    padding: 1.5rem 1.35rem;
    text-align: center;
  }

  .error-page__message {
    margin-left: auto;
    margin-right: auto;
  }

  .error-page__actions,
  .error-page__links {
    justify-content: center;
  }

  .error-page__path {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  .error-page__radar-ring,
  .error-page__radar-sweep,
  .error-page__code-zero {
    animation: none !important;
  }
}

/* ── Client-Side Threat Intelligence ── */
.csti-overview {
  margin-top: 1.5rem;
  padding: 1.5rem;
  border: 1px solid var(--border-subtle);
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
}
.csti-overview__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.csti-overview__eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-primary);
}
.csti-overview__title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
}
.csti-overview__desc {
  margin: 0.35rem 0 0;
  color: var(--text-secondary);
  font-size: 0.92rem;
}
.csti-overview__cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.csti-overview__card {
  padding: 0.9rem 1rem;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.csti-overview__card strong {
  display: block;
  margin-top: 0.35rem;
  font-size: 1.35rem;
  color: var(--text-primary);
}
.csti-overview__label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
}
.csti-overview__card--critical strong { color: #dc2626; }
.csti-overview__card--high strong { color: #ea580c; }
.csti-overview__card--score strong { color: var(--brand-strong); }
.csti-overview__sub {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.csti-overview__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.csti-overview__panel {
  padding: 1rem;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--border-subtle);
}
.csti-overview__panel h3 {
  margin: 0 0 0.75rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
}
.csti-overview__chart { height: 160px; position: relative; }
.csti-overview__chart--donut { height: 180px; }
.csti-overview__flag {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin: 0;
  color: var(--brand-primary);
}
.csti-overview__country {
  margin: 0.25rem 0 0;
  font-size: 1.1rem;
  font-weight: 700;
}
.csti-overview__count,
.csti-overview__page {
  margin: 0.35rem 0 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ── Client-Side Threat Intelligence Dashboard ── */
.csti-dash {
  display: grid;
  gap: 1.25rem;
}

.csti-dash__eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-primary);
}

/* Hero */
.csti-dash__hero {
  position: relative;
  padding: 1.35rem 1.5rem !important;
  overflow: hidden;
}

.csti-dash__hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 100% 0%, var(--csti-glow, rgba(37, 99, 235, 0.08)), transparent 65%);
  pointer-events: none;
}

.csti-dash__hero[data-tier="clear"] { --csti-glow: rgba(22, 163, 74, 0.1); }
.csti-dash__hero[data-tier="watch"] { --csti-glow: rgba(37, 99, 235, 0.1); }
.csti-dash__hero[data-tier="elevated"] { --csti-glow: rgba(245, 158, 11, 0.12); }
.csti-dash__hero[data-tier="critical"] { --csti-glow: rgba(239, 68, 68, 0.14); }

.csti-dash__hero-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.25rem;
  align-items: center;
}

.csti-dash__hero-copy { min-width: 0; }

.csti-dash__hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.csti-dash__hero-title {
  margin: 0;
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}

.csti-dash__hero-desc {
  margin: 0.65rem 0 0;
  max-width: 58ch;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

.csti-dash__status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.csti-dash__status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  animation: csti-pulse-dot 2s ease-in-out infinite;
}

@keyframes csti-pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.85); }
}

.csti-dash__status-badge--healthy {
  background: rgba(22, 163, 74, 0.12);
  color: var(--success);
}

.csti-dash__status-badge--warning {
  background: rgba(245, 158, 11, 0.12);
  color: var(--warning);
}

.csti-dash__status-badge--critical {
  background: rgba(239, 68, 68, 0.12);
  color: var(--danger);
}

.csti-dash__hero-foot {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(229, 231, 235, 0.8);
}

.csti-dash__hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.25rem;
  font-size: 0.84rem;
  color: var(--text-secondary);
}

.csti-dash__hero-stats strong { color: var(--text); }

.csti-dash__hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.65rem;
}

.csti-dash__chip {
  display: inline-flex;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  background: rgba(148, 163, 184, 0.12);
  color: #475569;
}

.csti-dash__chip--mode {
  background: rgba(37, 99, 235, 0.1);
  color: var(--brand-strong);
}

.csti-dash__hero-meter {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
}

.csti-threat-score-meta {
  display: flex;
  gap: 1.25rem;
  padding: 0.55rem 0.85rem;
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.95);
  border: 1px solid rgba(229, 231, 235, 0.9);
}

.csti-threat-score-meta__item {
  display: grid;
  gap: 0.1rem;
  text-align: center;
}

.csti-threat-score-meta__label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
}

.csti-threat-score-meta__value {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text);
}

.csti-threat-score-meta__value--penalty {
  color: var(--danger);
}

.csti-dash__penalty {
  padding: 1.15rem 1.25rem !important;
}

.csti-penalty-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.65rem;
}

.csti-penalty-card {
  padding: 0.85rem 0.9rem;
  border-radius: 14px;
  border: 1px solid rgba(229, 231, 235, 0.9);
  background: #fff;
}

.csti-penalty-card__label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.csti-penalty-card__value {
  display: block;
  margin-top: 0.3rem;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
}

.csti-penalty-card__sub {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.68rem;
  color: var(--text-secondary);
}

.csti-penalty-card--critical { border-color: rgba(239, 68, 68, 0.2); background: rgba(239, 68, 68, 0.04); }
.csti-penalty-card--critical .csti-penalty-card__value { color: var(--danger); }
.csti-penalty-card--high { border-color: rgba(249, 115, 22, 0.2); background: rgba(249, 115, 22, 0.04); }
.csti-penalty-card--high .csti-penalty-card__value { color: #c2410c; }
.csti-penalty-card--medium { border-color: rgba(234, 179, 8, 0.2); background: rgba(234, 179, 8, 0.04); }
.csti-penalty-card--medium .csti-penalty-card__value { color: #a16207; }
.csti-penalty-card--low { border-color: rgba(22, 163, 74, 0.2); background: rgba(22, 163, 74, 0.04); }
.csti-penalty-card--low .csti-penalty-card__value { color: var(--success); }
.csti-penalty-card--total {
  border-color: rgba(37, 99, 235, 0.25);
  background: rgba(37, 99, 235, 0.05);
}
.csti-penalty-card--total .csti-penalty-card__value { color: var(--brand-strong); }

/* Threat Intelligence Network */
.csti-network__summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 1.25rem;
}

.csti-network__panels {
  display: grid;
  gap: 1.25rem;
}

.csti-network__panel-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
}

.csti-network__panel-head {
  margin-bottom: 0.75rem;
}

.csti-network-table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(229, 231, 235, 0.95);
  border-radius: 14px;
}

.csti-network-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.csti-network-table th,
.csti-network-table td {
  padding: 0.65rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid rgba(229, 231, 235, 0.8);
  white-space: nowrap;
}

.csti-network-table th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  background: rgba(248, 250, 252, 0.9);
}

.csti-network-table__row {
  cursor: pointer;
  transition: background 0.15s ease;
}

.csti-network-table__row:hover,
.csti-network-table__row:focus-visible {
  background: rgba(37, 99, 235, 0.05);
  outline: none;
}

.csti-network-score {
  display: inline-flex;
  min-width: 2rem;
  justify-content: center;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.1);
  color: #b91c1c;
  font-weight: 800;
}

.csti-feed-card--network {
  border-color: rgba(37, 99, 235, 0.25);
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.65), #fff 40%);
}

.csti-feed-card__network-tag {
  display: inline-flex;
  margin-left: 0.35rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand-strong);
  background: rgba(37, 99, 235, 0.1);
}

.csti-feed-card__network-note {
  margin: 0.35rem 0 0.5rem;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--text-secondary);
}

.csti-actor-timeline {
  margin-top: 1rem;
}

.csti-actor-timeline__list {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.csti-actor-timeline__item {
  display: grid;
  gap: 0.15rem;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(229, 231, 235, 0.95);
  background: rgba(248, 250, 252, 0.8);
  font-size: 0.82rem;
}

.csti-actor-timeline__date {
  font-size: 0.72rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.csti-dash__hero-radar {
  position: absolute;
  right: -2rem;
  bottom: -2rem;
  width: 200px;
  height: 200px;
  opacity: 0.35;
  pointer-events: none;
}

.csti-dash__radar-ring {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(37, 99, 235, 0.25);
  border-radius: 50%;
}

.csti-dash__radar-ring--2 {
  inset: 25%;
  border-color: rgba(37, 99, 235, 0.15);
}

.csti-dash__radar-sweep {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0deg, rgba(37, 99, 235, 0.18) 40deg, transparent 80deg);
  animation: csti-radar-spin 6s linear infinite;
}

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

/* KPI grid */
.csti-dash__kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.85rem;
}

.csti-dash__kpi {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  padding: 1rem 1.1rem;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(229, 231, 235, 0.9);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.csti-dash__kpi:hover {
  transform: translateY(-2px);
  border-color: rgba(147, 197, 253, 0.45);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.08);
}

.csti-dash__kpi-icon {
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
}

.csti-dash__kpi-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

.csti-dash__kpi-icon--brand {
  background: rgba(37, 99, 235, 0.1);
  color: var(--brand-strong);
}

.csti-dash__kpi-icon--success {
  background: rgba(22, 163, 74, 0.1);
  color: var(--success);
}

.csti-dash__kpi-icon--warning {
  background: rgba(245, 158, 11, 0.12);
  color: var(--warning);
}

.csti-dash__kpi-icon--critical {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

.csti-dash__kpi-icon--neutral {
  background: rgba(148, 163, 184, 0.15);
  color: #64748b;
}

.csti-dash__kpi-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
}

.csti-dash__kpi-value {
  display: block;
  margin-top: 0.3rem;
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
}

.csti-dash__kpi--critical .csti-dash__kpi-value { color: var(--danger); }
.csti-dash__kpi--high .csti-dash__kpi-value { color: #ea580c; }

.csti-dash__kpi-sub,
.csti-dash__kpi-trend {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.csti-dash__kpi-trend.is-up { color: var(--danger); font-weight: 600; }
.csti-dash__kpi-trend.is-down { color: var(--success); font-weight: 600; }

/* Section heads */
.csti-dash__section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
  flex-wrap: wrap;
}

.csti-dash__section-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.csti-dash__section-sub {
  margin: 0.2rem 0 0;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.csti-dash__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}

.csti-dash__badge--live {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

.csti-dash__live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--danger);
  animation: csti-pulse-dot 1.5s ease-in-out infinite;
}

.csti-dash__badge--monitoring {
  background: rgba(37, 99, 235, 0.12);
  color: var(--brand-strong);
}

.csti-dash__badge--healthy {
  background: rgba(22, 163, 74, 0.12);
  color: var(--success);
}

.csti-dash__badge--neutral {
  background: rgba(148, 163, 184, 0.15);
  color: #64748b;
}

/* Map + Feed */
.csti-dash__map-feed {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 1rem;
  align-items: start;
}

.csti-dash__feed {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.csti-dash__feed .csti-dash__section-head {
  flex-shrink: 0;
}

.csti-dash__map-wrap {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: #0f172a;
}

.csti-dash__map-canvas {
  height: 460px;
  width: 100%;
  z-index: 1;
}

.csti-dash__map-canvas .leaflet-control-zoom {
  border: none !important;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.28) !important;
  border-radius: 12px !important;
  overflow: hidden;
}

.csti-dash__map-canvas .leaflet-control-zoom a {
  width: 34px !important;
  height: 34px !important;
  line-height: 34px !important;
  background: rgba(15, 23, 42, 0.88) !important;
  color: #e2e8f0 !important;
  border: none !important;
}

.csti-dash__map-canvas .leaflet-control-zoom a:hover {
  background: rgba(30, 41, 59, 0.95) !important;
  color: #fff !important;
}

.csti-dash__map-hud {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 500;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.1rem;
  padding: 0.55rem 0.75rem;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.86);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.csti-dash__map-hud-label {
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
}

.csti-dash__map-hud-value {
  font-size: 1.25rem;
  font-weight: 800;
  color: #f8fafc;
  line-height: 1;
}

.csti-dash__map-legend {
  position: absolute;
  left: 0.75rem;
  bottom: 0.75rem;
  z-index: 500;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  padding: 0.45rem 0.7rem;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(8px);
  font-size: 0.68rem;
  font-weight: 600;
  color: #cbd5e1;
}

.csti-dash__legend-note {
  padding-right: 0.55rem;
  margin-right: 0.15rem;
  border-right: 1px solid rgba(148, 163, 184, 0.25);
  color: #94a3b8;
  font-weight: 700;
}

.csti-dash__legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.csti-dash__legend-swatch {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.csti-dash__legend-swatch--critical { background: #ef4444; }
.csti-dash__legend-swatch--high { background: #f97316; }
.csti-dash__legend-swatch--medium { background: #eab308; }
.csti-dash__legend-swatch--low { background: #22c55e; }

.csti-dash__map-empty {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
  background: rgba(15, 23, 42, 0.55);
  color: #e2e8f0;
}

.csti-dash__map-empty h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  color: #f8fafc;
}

.csti-dash__map-empty p {
  margin: 0;
  font-size: 0.84rem;
  color: #94a3b8;
  max-width: 32ch;
}

.csti-map-popup-wrap .leaflet-popup-content-wrapper {
  border-radius: 14px;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.28);
  border: 1px solid rgba(229, 231, 235, 0.95);
}

.csti-map-popup-wrap .leaflet-popup-content {
  margin: 0;
  width: 260px !important;
}

.csti-map-popup-wrap .leaflet-popup-tip {
  box-shadow: none;
}

.csti-map-popup {
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--text-secondary);
}

.csti-map-popup__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.75rem 0.85rem 0.55rem;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(255, 255, 255, 0.95));
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
}

.csti-map-popup__head strong {
  font-size: 0.86rem;
  color: var(--text);
}

.csti-map-popup__severity {
  flex-shrink: 0;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  font-size: 0.64rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.csti-map-popup__severity--critical { background: rgba(254, 226, 226, 0.95); color: #b91c1c; }
.csti-map-popup__severity--high { background: rgba(255, 237, 213, 0.95); color: #c2410c; }
.csti-map-popup__severity--medium { background: rgba(254, 243, 199, 0.95); color: #a16207; }
.csti-map-popup__severity--low { background: rgba(220, 252, 231, 0.95); color: #15803d; }

.csti-map-popup__facts {
  margin: 0;
  padding: 0.65rem 0.85rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.csti-map-popup__facts div {
  padding: 0.45rem 0.5rem;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid rgba(229, 231, 235, 0.9);
}

.csti-map-popup__facts dt {
  margin: 0 0 0.12rem;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
}

.csti-map-popup__facts dd {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
  word-break: break-word;
}

.csti-map-popup__hint {
  margin: 0;
  padding: 0.55rem 0.85rem 0.7rem;
  font-size: 0.72rem;
  color: #64748b;
  border-top: 1px solid rgba(229, 231, 235, 0.9);
  background: #fff;
}

.csti-map-popup code {
  font-size: 0.74rem;
  background: #e2e8f0;
  padding: 0.08rem 0.3rem;
  border-radius: 4px;
}

.csti-ip-marker-wrap {
  background: transparent !important;
  border: none !important;
}

.csti-ip-marker {
  position: relative;
  display: block;
  width: var(--marker-size, 18px);
  height: var(--marker-size, 18px);
}

.csti-ip-marker__core {
  position: absolute;
  inset: 28%;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 12px currentColor;
  z-index: 2;
}

.csti-ip-marker__ring {
  position: absolute;
  inset: 10%;
  border-radius: 50%;
  border: 2px solid currentColor;
  background: rgba(255, 255, 255, 0.92);
  z-index: 1;
}

.csti-ip-marker__pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.35;
  animation: csti-marker-pulse 2.2s ease-out infinite;
  z-index: 0;
}

.csti-ip-marker__count {
  position: absolute;
  top: -6px;
  right: -8px;
  min-width: 1rem;
  height: 1rem;
  padding: 0 0.2rem;
  border-radius: 999px;
  background: #0f172a;
  color: #f8fafc;
  font-size: 0.58rem;
  font-weight: 800;
  line-height: 1rem;
  text-align: center;
  z-index: 3;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.35);
}

.csti-ip-marker--critical { color: #ef4444; }
.csti-ip-marker--high { color: #f97316; }
.csti-ip-marker--medium { color: #eab308; }
.csti-ip-marker--low { color: #22c55e; }

.csti-ip-marker.is-selected .csti-ip-marker__ring {
  inset: 0;
  border-width: 3px;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.85), 0 0 18px currentColor;
}

.csti-ip-marker.is-selected .csti-ip-marker__pulse {
  animation: csti-marker-pulse-active 1.4s ease-out infinite;
}

@keyframes csti-marker-pulse {
  0% { transform: scale(0.65); opacity: 0.45; }
  70% { transform: scale(1.55); opacity: 0; }
  100% { transform: scale(1.55); opacity: 0; }
}

@keyframes csti-marker-pulse-active {
  0% { transform: scale(0.75); opacity: 0.55; }
  60% { transform: scale(1.85); opacity: 0; }
  100% { transform: scale(1.85); opacity: 0; }
}

/* Live feed */
.csti-feed-scroll {
  flex: 1 1 auto;
  min-height: 0;
}

.csti-feed-list {
  height: 460px;
  max-height: 460px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.15rem 0.35rem 0.15rem 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.55) transparent;
  scroll-behavior: smooth;
}

.csti-feed-list::-webkit-scrollbar { width: 6px; }
.csti-feed-list::-webkit-scrollbar-track {
  background: rgba(148, 163, 184, 0.08);
  border-radius: 999px;
}
.csti-feed-list::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.45);
  border-radius: 999px;
}
.csti-feed-list::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 0.65);
}

.csti-feed-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.csti-feed-filter {
  border: 1px solid var(--border-subtle);
  background: #fff;
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.csti-feed-filter:hover {
  border-color: rgba(37, 99, 235, 0.35);
  color: var(--brand-strong);
}

.csti-feed-filter.is-active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.csti-feed-card {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  flex-shrink: 0;
  border-radius: 12px;
  border: 1px solid rgba(229, 231, 235, 0.9);
  background: #fff;
  overflow: hidden;
  animation: csti-feed-in 0.4s ease backwards;
  animation-delay: var(--feed-delay, 0ms);
  transition: border-color 0.15s, box-shadow 0.15s;
}

@keyframes csti-feed-in {
  from { opacity: 0; transform: translateX(-6px); }
  to { opacity: 1; transform: translateX(0); }
}

.csti-feed-card:hover {
  border-color: rgba(147, 197, 253, 0.5);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.csti-feed-card.is-map-highlighted {
  border-color: rgba(37, 99, 235, 0.65);
  background: linear-gradient(90deg, rgba(239, 246, 255, 0.98), rgba(255, 255, 255, 0.98));
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2), 0 8px 22px rgba(37, 99, 235, 0.14);
  animation: csti-feed-highlight 1.2s ease;
}

@keyframes csti-feed-highlight {
  0% { transform: translateX(-4px); }
  40% { transform: translateX(2px); }
  100% { transform: translateX(0); }
}

.csti-feed-card__stripe {
  width: 4px;
  flex-shrink: 0;
  background: #94a3b8;
}

.csti-feed-card--critical .csti-feed-card__stripe { background: var(--danger); }
.csti-feed-card--high .csti-feed-card__stripe { background: #f97316; }
.csti-feed-card--medium .csti-feed-card__stripe { background: #eab308; }
.csti-feed-card--low .csti-feed-card__stripe { background: var(--success); }

.csti-feed-card__body {
  flex: 1;
  min-width: 0;
  padding: 0.7rem 0.85rem;
}

.csti-feed-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.csti-feed-card__type {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
}

.csti-feed-card__target {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.csti-feed-card__badge {
  flex-shrink: 0;
  font-size: 0.68rem !important;
}

.csti-feed-card__meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: 0.45rem;
}

.csti-feed-card__meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.76rem;
  color: var(--text-secondary);
}

.csti-feed-card__meta-item svg {
  width: 0.85rem;
  height: 0.85rem;
  flex-shrink: 0;
  opacity: 0.55;
}

.csti-feed-card__meta-item code {
  font-size: 0.74rem;
  background: #f1f5f9;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

.csti-feed-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.45rem;
}

.csti-feed-card__time {
  font-size: 0.72rem;
  font-weight: 600;
  color: #94a3b8;
}

.csti-feed-card__actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.csti-feed-card__details,
.csti-feed-card__delete {
  flex-shrink: 0;
  padding: 0.2rem 0.55rem !important;
  font-size: 0.72rem !important;
  font-weight: 700;
  border-radius: 999px;
}

.csti-feed-card__delete {
  color: #b91c1c !important;
  border-color: rgba(239, 68, 68, 0.22) !important;
  background: rgba(254, 242, 242, 0.85) !important;
}

.csti-feed-card__delete:hover {
  background: rgba(254, 226, 226, 0.95) !important;
  border-color: rgba(239, 68, 68, 0.35) !important;
}

.csti-btn-danger {
  color: #b91c1c !important;
  border-color: rgba(239, 68, 68, 0.25) !important;
}

.csti-btn-danger:hover {
  background: rgba(254, 242, 242, 0.95) !important;
}

.csti-btn-danger-solid {
  background: linear-gradient(135deg, #dc2626, #b91c1c) !important;
  border-color: transparent !important;
  box-shadow: 0 8px 22px rgba(220, 38, 38, 0.22);
}

.csti-btn-danger-solid:hover {
  filter: brightness(1.03);
}

.csti-btn-danger-solid:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* Incident detail modal */
.csti-incident-modal {
  position: relative;
  width: min(560px, 100%);
  max-height: min(88vh, 720px);
  overflow-y: auto;
  padding: 1.35rem 1.5rem !important;
}

.csti-incident-modal__head {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.65rem 0.85rem;
  align-items: start;
  margin-bottom: 1rem;
}

.csti-incident-modal__title-wrap {
  grid-column: 1 / -1;
  padding-right: 2rem;
}

.csti-incident-modal__eyebrow {
  margin: 0 0 0.25rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-strong);
}

.csti-incident-modal__id {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.csti-incident-modal__id code {
  font-size: 0.74rem;
  background: #f1f5f9;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  word-break: break-all;
}

.csti-incident-modal__severity {
  align-self: start;
  font-size: 0.72rem !important;
}

.csti-incident-modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 10px;
  background: rgba(148, 163, 184, 0.12);
  color: #64748b;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.csti-incident-modal__close:hover {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

.csti-incident-modal__desc {
  margin: 0 0 1rem;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.95);
  border: 1px solid rgba(229, 231, 235, 0.9);
  font-size: 0.84rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

.csti-incident-facts {
  margin: 0 0 1rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem 1rem;
}

.csti-incident-facts div {
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(229, 231, 235, 0.9);
}

.csti-incident-facts dt {
  margin: 0 0 0.2rem;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.csti-incident-facts dd {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text);
  word-break: break-word;
}

.csti-incident-facts dd code {
  font-size: 0.8rem;
  background: #f1f5f9;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

.csti-incident-ip-history {
  margin: 0 0 1rem;
  padding: 0.85rem 0.95rem;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(254, 242, 242, 0.55), rgba(255, 255, 255, 0.95));
  border: 1px solid rgba(254, 202, 202, 0.65);
}

.csti-incident-ip-history__title {
  margin: 0 0 0.35rem;
  font-size: 0.82rem;
  font-weight: 800;
  color: #991b1b;
}

.csti-incident-ip-history__sub {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--text-secondary);
}

.csti-incident-ip-history__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.45rem;
}

.csti-incident-ip-history__list li {
  display: grid;
  gap: 0.15rem;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  background: #fff;
  border: 1px solid rgba(229, 231, 235, 0.95);
}

.csti-incident-ip-history__type {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text);
}

.csti-incident-ip-history__meta {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.csti-incident-ip-history__meta code {
  font-size: 0.7rem;
  background: #f1f5f9;
  padding: 0.05rem 0.3rem;
  border-radius: 4px;
}

.csti-incident-ip-history__more {
  font-size: 0.72rem;
  font-weight: 700;
  color: #b45309;
  background: rgba(255, 251, 235, 0.9) !important;
  border-color: rgba(251, 191, 36, 0.35) !important;
  text-align: center;
}

.csti-incident-payload {
  margin-bottom: 1rem;
}

.csti-incident-payload__label {
  margin: 0 0 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
}

.csti-incident-payload__code {
  margin: 0;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: #0f172a;
  color: #e2e8f0;
  font-size: 0.78rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 160px;
  overflow-y: auto;
}

.csti-incident-modal__actions {
  margin-bottom: 0;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.csti-delete-modal {
  position: relative;
  width: min(480px, 100%);
  padding: 1.5rem 1.55rem !important;
  text-align: center;
}

.csti-delete-modal__icon {
  width: 3.25rem;
  height: 3.25rem;
  margin: 0 auto 0.85rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(254, 226, 226, 0.95), rgba(254, 242, 242, 0.75));
  color: #dc2626;
  border: 1px solid rgba(252, 165, 165, 0.65);
}

.csti-delete-modal__icon svg {
  width: 1.45rem;
  height: 1.45rem;
}

.csti-delete-modal__title {
  margin: 0 0 0.45rem;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
}

.csti-delete-modal__lead {
  margin: 0 0 1rem;
  font-size: 0.84rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

.csti-delete-modal__lead strong {
  color: #991b1b;
}

.csti-delete-modal__facts {
  margin: 0 0 0.85rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  text-align: left;
}

.csti-delete-modal__facts div {
  padding: 0.6rem 0.7rem;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(229, 231, 235, 0.95);
}

.csti-delete-modal__facts dt {
  margin: 0 0 0.15rem;
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.csti-delete-modal__facts dd {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  word-break: break-word;
}

.csti-delete-modal__facts dd code {
  font-size: 0.76rem;
  background: #f1f5f9;
  padding: 0.08rem 0.32rem;
  border-radius: 4px;
}

.csti-delete-modal__warn {
  margin: 0 0 1rem;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  background: rgba(255, 251, 235, 0.9);
  border: 1px solid rgba(251, 191, 36, 0.35);
  font-size: 0.76rem;
  line-height: 1.45;
  color: #92400e;
  text-align: left;
}

.csti-delete-modal__actions {
  justify-content: center;
  gap: 0.55rem;
}

/* Analytics */
.csti-dash__analytics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.csti-dash__chart--timeline { grid-column: 1 / -1; }
.csti-dash__chart--wide { grid-column: 1 / -1; }

.csti-chart-wrap {
  height: 220px;
  position: relative;
}

.csti-chart-wrap--trend { height: 200px; }
.csti-chart-wrap--donut { height: 250px; }

/* IP table */
.csti-table-wrap { overflow-x: auto; }

.csti-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.csti-table th,
.csti-table td {
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid rgba(229, 231, 235, 0.8);
  text-align: left;
}

.csti-table th {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  background: rgba(248, 250, 252, 0.8);
}

.csti-table tbody tr {
  transition: background 0.15s;
}

.csti-table tbody tr:hover {
  background: rgba(248, 250, 252, 0.7);
}

.csti-table__ip {
  font-size: 0.8rem;
  background: #f1f5f9;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
}

.csti-table__count {
  font-weight: 800;
  color: var(--brand-strong);
}

.csti-table-empty {
  text-align: center;
  color: var(--text-secondary);
  padding: 1.5rem !important;
}

.csti-risk-pill {
  display: inline-flex;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}

.csti-risk-pill--critical { background: rgba(239, 68, 68, 0.12); color: var(--danger); }
.csti-risk-pill--high { background: rgba(249, 115, 22, 0.12); color: #c2410c; }
.csti-risk-pill--medium { background: rgba(234, 179, 8, 0.12); color: #a16207; }
.csti-risk-pill--low { background: rgba(22, 163, 74, 0.12); color: var(--success); }

/* Response config */
.csti-dash__config-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.csti-response-card {
  padding: 1rem 0;
  border-bottom: 1px solid rgba(229, 231, 235, 0.8);
}

.csti-response-card:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.csti-response-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.csti-response-card__name {
  display: block;
  font-size: 0.95rem;
}

.csti-response-card__domain {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.csti-mode-selector {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.csti-mode-option {
  position: relative;
  display: grid;
  gap: 0.2rem;
  padding: 0.75rem 0.65rem;
  border-radius: 14px;
  border: 1.5px solid rgba(229, 231, 235, 0.9);
  background: #f8fafc;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}

.csti-mode-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.csti-mode-option:hover {
  border-color: rgba(147, 197, 253, 0.55);
  transform: translateY(-1px);
}

.csti-mode-option.is-selected {
  border-color: var(--brand);
  background: rgba(37, 99, 235, 0.06);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.15);
}

.csti-mode-option__icon {
  display: flex;
  justify-content: center;
  color: var(--brand-strong);
}

.csti-mode-option__icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

.csti-mode-option__label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text);
}

.csti-mode-option__desc {
  font-size: 0.68rem;
  color: var(--text-secondary);
}

/* Agent terminal */
.csti-agent-status {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem 1rem;
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.9);
  border: 1px solid rgba(229, 231, 235, 0.8);
}

.csti-agent-status__item {
  display: grid;
  gap: 0.15rem;
}

.csti-agent-status__label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
}

.csti-agent-status__value {
  font-size: 0.88rem;
  font-weight: 600;
}

.csti-snippet-label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
}

.csti-snippet-terminal {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #1e293b;
  background: #0f172a;
}

.csti-snippet-terminal__bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.75rem;
  background: #1e293b;
  border-bottom: 1px solid #334155;
}

.csti-snippet-terminal__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #475569;
}

.csti-snippet-terminal__dot:nth-child(1) { background: #ef4444; }
.csti-snippet-terminal__dot:nth-child(2) { background: #eab308; }
.csti-snippet-terminal__dot:nth-child(3) { background: #22c55e; }

.csti-snippet-terminal__title {
  flex: 1;
  margin-left: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: #94a3b8;
}

.csti-snippet-terminal__copy {
  border: none;
  background: rgba(37, 99, 235, 0.2);
  color: #93c5fd;
  border-radius: 6px;
  padding: 0.25rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.csti-snippet-terminal__copy:hover {
  background: rgba(37, 99, 235, 0.35);
}

.csti-snippet-terminal__code {
  margin: 0;
  padding: 0.85rem 1rem;
  font-size: 0.74rem;
  line-height: 1.55;
  color: #e2e8f0;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 140px;
  overflow-y: auto;
}

.csti-snippet-hint {
  margin: 0.55rem 0 0;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.csti-snippet-hint code {
  font-size: 0.74rem;
  background: #f1f5f9;
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
}

/* Coverage */
.csti-dash__coverage {
  padding: 1.25rem 1.35rem !important;
}

.csti-coverage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.85rem;
}

.csti-coverage-card {
  padding: 1rem 1.1rem;
  border-radius: 16px;
  border: 1px solid rgba(229, 231, 235, 0.9);
  background: #fff;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.csti-coverage-card:hover {
  transform: translateY(-2px);
  border-color: rgba(147, 197, 253, 0.45);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.07);
}

.csti-coverage-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.csti-coverage-icon {
  display: inline-flex;
  width: 2.25rem;
  height: 2.25rem;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(37, 99, 235, 0.1);
  color: var(--brand-strong);
}

.csti-coverage-icon svg {
  width: 1.15rem;
  height: 1.15rem;
}

.csti-coverage-card h3 {
  margin: 0 0 0.35rem;
  font-size: 0.92rem;
  font-weight: 700;
}

.csti-coverage-card p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.csti-empty-inline {
  margin: 0;
  padding: 2rem 1rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Empty states */
.csti-empty-state {
  text-align: center;
  padding: 2.5rem 1.25rem;
  color: var(--text-secondary);
}

.csti-empty-state--compact {
  padding: 1.25rem 0.5rem;
}

.csti-empty-state h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  color: var(--text);
}

.csti-empty-state p {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.5;
  max-width: 36ch;
  margin-inline: auto;
}

.csti-empty-illustration {
  width: 72px;
  height: 72px;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(37, 99, 235, 0.18), rgba(37, 99, 235, 0.04));
  border: 2px solid rgba(37, 99, 235, 0.15);
  color: var(--brand-strong);
}

.csti-empty-illustration svg {
  width: 2rem;
  height: 2rem;
}

.csti-empty-illustration--shield {
  background: radial-gradient(circle at 30% 30%, rgba(22, 163, 74, 0.15), rgba(22, 163, 74, 0.04));
  border-color: rgba(22, 163, 74, 0.2);
  color: var(--success);
}

.csti-empty-illustration--radar {
  background: radial-gradient(circle at 30% 30%, rgba(37, 99, 235, 0.2), rgba(37, 99, 235, 0.05));
}

/* Toast */
.csti-toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  padding: 0.65rem 1rem;
  border-radius: 12px;
  background: #0f172a;
  color: #f8fafc;
  font-size: 0.84rem;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.25);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s, transform 0.25s;
}

.csti-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Severity badges */
.badge--medium { background: #fef3c7; color: #b45309; }
.badge--low { background: #ecfdf5; color: #047857; }
.badge--high { background: #ffedd5; color: #c2410c; }

/* Responsive */
@media (max-width: 1200px) {
  .csti-dash__kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .csti-penalty-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .csti-network__summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .csti-overview__cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .csti-overview__grid { grid-template-columns: 1fr 1fr; }
  .csti-dash__map-feed { grid-template-columns: 1fr; }
  .csti-dash__config-grid { grid-template-columns: 1fr; }
  .csti-dash__hero-layout {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .csti-dash__hero-meter { order: -1; }
}

@media (max-width: 768px) {
  .csti-overview__cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .csti-overview__grid { grid-template-columns: 1fr; }
  .csti-dash__analytics { grid-template-columns: 1fr; }
  .csti-dash__kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .csti-mode-selector { grid-template-columns: 1fr; }
  .csti-dash__hero-top { flex-direction: column; }
  .csti-feed-filters { width: 100%; }
  .csti-feed-list {
    height: 360px;
    max-height: 360px;
  }

  .csti-dash__map-canvas {
    height: 360px;
  }
  .csti-incident-facts,
  .csti-delete-modal__facts {
    grid-template-columns: 1fr;
  }
  .csti-penalty-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .csti-overview__head {
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .csti-dash__kpi-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .csti-dash__radar-sweep,
  .csti-dash__status-dot,
  .csti-dash__live-dot,
  .csti-feed-card {
    animation: none;
  }
}

/* --- Settings v2 --- */
.settings-page {
  display: grid;
  gap: 1.75rem;
}

.settings-page-header {
  padding-bottom: 0.25rem;
}

.settings-page-eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-strong);
}

.settings-page-title {
  margin: 0;
  font-size: clamp(1.75rem, 3vw, 2.15rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.settings-page-desc {
  margin: 0.5rem 0 0;
  max-width: 42rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.settings-panel-card {
  padding: 1.75rem 1.85rem;
}

.settings-panel-card--billing {
  padding: 0;
  overflow: hidden;
}

.settings-panel-header {
  margin-bottom: 1.5rem;
}

.settings-panel-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
}

.settings-panel-desc {
  margin: 0.45rem 0 0;
  color: var(--text-secondary);
  line-height: 1.65;
  font-size: 0.95rem;
}

.settings-form {
  display: grid;
  gap: 0.25rem;
}

.settings-form-actions {
  margin-top: 1.25rem;
  padding-top: 0.25rem;
}

.settings-flash {
  margin-bottom: 0.25rem;
}

.settings-coming-soon {
  display: grid;
  gap: 0.65rem;
  justify-items: start;
  padding: 1.5rem;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.05), rgba(79, 70, 229, 0.02));
  border: 1px dashed rgba(37, 99, 235, 0.18);
}

.settings-coming-soon__icon {
  font-size: 1.5rem;
}

.settings-coming-soon p {
  margin: 0;
  color: var(--text-secondary);
}

/* --- Billing (settings tab) --- */
.billing-settings {
  padding: 1.75rem 1.85rem 2rem;
}

.billing-plan-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.35rem 1.5rem;
  margin-bottom: 1.25rem;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(79, 70, 229, 0.06) 100%);
  border: 1px solid rgba(37, 99, 235, 0.14);
}

.billing-plan-eyebrow {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-strong);
}

.billing-plan-name {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.billing-plan-profile {
  margin: 0.35rem 0 0;
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.billing-plan-hero__badge {
  flex-shrink: 0;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: capitalize;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(229, 231, 235, 0.95);
  color: var(--text-secondary);
}

.billing-plan-hero__badge--active {
  background: rgba(220, 252, 231, 0.95);
  border-color: rgba(34, 197, 94, 0.25);
  color: #166534;
}

.billing-plan-hero__badge--past_due,
.billing-plan-hero__badge--cancelled {
  background: rgba(254, 226, 226, 0.9);
  border-color: rgba(239, 68, 68, 0.2);
  color: #991b1b;
}

.billing-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 2rem;
}

.billing-stat-card {
  display: grid;
  gap: 0.2rem;
  padding: 1.1rem 1.15rem;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(229, 231, 235, 0.95);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.billing-stat-label {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.billing-stat-value {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.billing-stat-value--sm {
  font-size: 1rem;
}

.billing-stat-note {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.billing-empty-plan {
  display: grid;
  gap: 0.75rem;
  justify-items: start;
  padding: 2rem;
  margin-bottom: 1.5rem;
  text-align: left;
}

.billing-empty-plan__icon {
  font-size: 2rem;
}

.billing-empty-plan h3 {
  margin: 0;
}

.billing-empty-plan p {
  margin: 0;
  color: var(--text-secondary);
}

.billing-invoices-section {
  display: grid;
  gap: 1rem;
}

.billing-invoices-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

.billing-section-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.billing-section-desc {
  margin: 0.35rem 0 0;
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.invoice-card-list {
  display: grid;
  gap: 0.75rem;
}

.invoice-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.15rem;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(229, 231, 235, 0.95);
  transition: box-shadow var(--transition), border-color var(--transition);
}

.invoice-card:hover {
  border-color: rgba(37, 99, 235, 0.2);
  box-shadow: 0 12px 32px rgba(37, 99, 235, 0.08);
}

.invoice-card__icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(37, 99, 235, 0.08);
  font-size: 1.2rem;
}

.invoice-card__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.invoice-card__number {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text);
}

.invoice-card__amount {
  font-size: 1rem;
  font-weight: 800;
  color: var(--brand-strong);
}

.invoice-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.25rem;
  font-size: 0.86rem;
  color: var(--text-secondary);
}

.invoice-card__dot {
  opacity: 0.5;
}

.billing-invoices-empty {
  padding: 1.5rem;
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.95);
  border: 1px dashed rgba(203, 213, 225, 0.9);
}

.billing-invoices-empty p {
  margin: 0;
  color: var(--text-secondary);
}

/* --- Targets allowance + limit modal --- */
.allowance-banner {
  display: grid;
  gap: 0.65rem;
  padding: 1rem 1.15rem;
  margin-bottom: 1rem;
  border-radius: 16px;
  background: rgba(37, 99, 235, 0.06);
  border: 1px solid rgba(37, 99, 235, 0.12);
}

.allowance-banner--full {
  background: rgba(254, 243, 199, 0.55);
  border-color: rgba(245, 158, 11, 0.25);
}

.allowance-banner strong {
  display: block;
  margin-bottom: 0.15rem;
}

.allowance-banner span {
  font-size: 0.92rem;
  color: var(--text-secondary);
}

.allowance-bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.allowance-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb, #4f46e5);
}

.allowance-banner--full .allowance-bar span {
  background: linear-gradient(90deg, #f59e0b, #ef4444);
}

.modal-card {
  position: relative;
  width: min(440px, 100%);
  padding: 2rem 1.75rem 1.5rem;
  border-radius: 22px;
  background: #fff;
  border: 1px solid rgba(229, 231, 235, 0.95);
  box-shadow: 0 28px 72px rgba(15, 23, 42, 0.22);
}

.modal-close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 10px;
  background: rgba(248, 250, 252, 0.95);
  color: var(--text-secondary);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.modal-close:hover {
  background: rgba(37, 99, 235, 0.08);
  color: var(--brand-strong);
}

.website-limit-modal {
  text-align: center;
}

.website-limit-modal__icon {
  font-size: 2.25rem;
  margin-bottom: 0.5rem;
}

.website-limit-modal__title {
  margin: 0 0 0.65rem;
  font-size: 1.35rem;
  font-weight: 800;
}

.website-limit-modal__lead {
  margin: 0 0 1.25rem;
  color: var(--text-secondary);
  line-height: 1.65;
  font-size: 0.95rem;
}

.website-limit-modal__offer {
  display: grid;
  gap: 0.65rem;
  padding: 1.15rem;
  margin-bottom: 0.25rem;
  border-radius: 16px;
  text-align: left;
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.06), rgba(79, 70, 229, 0.03));
  border: 1px solid rgba(37, 99, 235, 0.12);
}

.website-limit-modal__offer-label {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand-strong);
}

.website-limit-modal__offer p {
  margin: 0;
  color: var(--text-secondary);
}

.website-limit-modal__qty {
  display: grid;
  gap: 0.35rem;
}

.website-limit-modal__qty label {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.website-limit-modal__qty input {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(229, 231, 235, 0.95);
  background: #fff;
}

.website-limit-modal__contact {
  margin: 0 0 0.75rem;
  color: var(--text-secondary);
}

/* --- Subscription renewal modal --- */
.subscription-renewal-modal {
  width: min(480px, 100%);
  max-height: min(92vh, 720px);
  overflow-y: auto;
}

.subscription-renewal-modal__icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.subscription-renewal-modal__icon--warning {
  background: rgba(254, 243, 199, 0.95);
}

.subscription-renewal-modal__icon--critical {
  background: rgba(254, 226, 226, 0.95);
}

.subscription-renewal-modal__title {
  margin: 0 0 0.65rem;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.subscription-renewal-modal__lead {
  margin: 0 0 1.1rem;
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 0.95rem;
}

.subscription-renewal-modal__summary {
  margin-bottom: 1.15rem;
  padding: 1rem 1.05rem;
  border-radius: 14px;
  background: rgba(239, 246, 255, 0.65);
  border: 1px solid rgba(191, 219, 254, 0.55);
}

.subscription-renewal-modal__row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.35rem 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.subscription-renewal-modal__row--total {
  margin-top: 0.35rem;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(191, 219, 254, 0.45);
  font-weight: 700;
  color: var(--text);
}

.subscription-renewal-modal__note {
  margin: 0.75rem 0 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.subscription-renewal-modal__plans {
  margin: 0 0 1rem;
  padding: 0;
  border: none;
}

.subscription-renewal-modal__plans-label {
  display: block;
  margin-bottom: 0.65rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.subscription-renewal-plan-list {
  display: grid;
  gap: 0.55rem;
}

.subscription-renewal-plan {
  display: block;
  cursor: pointer;
}

.subscription-renewal-plan__input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.subscription-renewal-plan__card {
  display: grid;
  gap: 0.2rem;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  border: 1.5px solid rgba(191, 219, 254, 0.55);
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.subscription-renewal-plan__input:checked + .subscription-renewal-plan__card,
.subscription-renewal-plan.is-current .subscription-renewal-plan__input:checked + .subscription-renewal-plan__card {
  border-color: var(--brand-strong, #2563eb);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  background: rgba(239, 246, 255, 0.55);
}

.subscription-renewal-plan__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.subscription-renewal-plan__name {
  font-weight: 700;
  color: var(--text);
}

.subscription-renewal-plan__badge {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.12);
  color: var(--brand-strong, #2563eb);
}

.subscription-renewal-plan__meta {
  font-size: 0.86rem;
  color: var(--text-secondary);
}

.subscription-renewal-plan__profile {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.subscription-renewal-modal__error {
  margin: 0 0 0.85rem;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  background: rgba(254, 226, 226, 0.7);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #991b1b;
  font-size: 0.88rem;
  line-height: 1.45;
}

.billing-renewal-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding: 1rem 1.15rem;
  border-radius: 14px;
  border: 1px solid transparent;
}

.billing-renewal-banner strong {
  display: block;
  margin-bottom: 0.25rem;
}

.billing-renewal-banner p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.5;
}

.billing-renewal-banner--warning {
  background: rgba(254, 243, 199, 0.45);
  border-color: rgba(251, 191, 36, 0.35);
  color: #92400e;
}

.billing-renewal-banner--critical {
  background: rgba(254, 226, 226, 0.55);
  border-color: rgba(239, 68, 68, 0.25);
  color: #991b1b;
}

/* --- Login form polish (minimal layout) --- */
.auth-card--login {
  padding: 2.25rem 2rem 2rem;
}

.auth-form {
  display: grid;
  gap: 0.15rem;
}

.auth-form .form-group {
  margin-bottom: 0.85rem;
}

.auth-form label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.auth-form input {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(229, 231, 235, 0.95);
  background: #f8fafc;
  font-size: 0.95rem;
  transition:
    border-color var(--transition),
    box-shadow var(--transition),
    background var(--transition);
}

.auth-form input::placeholder {
  color: var(--text-muted);
}

.auth-form input:focus {
  outline: none;
  border-color: rgba(37, 99, 235, 0.4);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  background: #fff;
}

.auth-form-submit {
  margin-top: 0.35rem;
  cursor: pointer;
  transition: opacity var(--transition), transform var(--transition);
}

.auth-form-submit:hover {
  opacity: 0.95;
}

.auth-signup-line {
  margin: 1.5rem 0 0;
  font-size: 0.92rem;
  color: var(--text-secondary);
  text-align: center;
}

.auth-signup-link {
  font-weight: 700;
  color: var(--brand-strong);
  text-decoration: underline;
  text-decoration-color: rgba(37, 99, 235, 0.35);
  text-underline-offset: 3px;
  transition: color var(--transition), text-decoration-color var(--transition);
}

.auth-signup-link:hover {
  color: #1d4ed8;
  text-decoration-color: rgba(37, 99, 235, 0.7);
}

@media (max-width: 900px) {
  .billing-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .invoice-card {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .invoice-card__action {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 520px) {
  .billing-stats-grid {
    grid-template-columns: 1fr;
  }

  .billing-plan-hero {
    flex-direction: column;
  }
}

/* --- Subscription-driven monitoring UI --- */
.monitoring-plan-callout {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.06), rgba(79, 70, 229, 0.03));
  border-color: rgba(37, 99, 235, 0.15);
}

.targets-insights-grid,
.overview-saas-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.targets-insight-card,
.overview-saas-card {
  padding: 1.35rem 1.5rem;
}

.overview-saas-eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-strong);
}

.overview-saas-title {
  margin: 0 0 1rem;
  font-size: 1.35rem;
  font-weight: 800;
}

.overview-saas-rows,
.targets-util-rows {
  display: grid;
  gap: 0.55rem;
}

.overview-saas-row,
.targets-util-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.9rem;
}

.overview-saas-row span,
.targets-util-row span {
  color: var(--text-secondary);
}

.overview-coverage-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.overview-coverage-stats div {
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.95);
  border: 1px solid rgba(229, 231, 235, 0.9);
}

.overview-coverage-stats span {
  display: block;
  font-size: 0.76rem;
  color: var(--text-secondary);
  margin-bottom: 0.2rem;
}

.overview-coverage-stats strong {
  font-size: 1.1rem;
}

.overview-coverage-list,
.coverage-service-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.4rem;
}

.overview-coverage-list li,
.coverage-service-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.overview-coverage-list li.is-active,
.coverage-service-item.is-active {
  color: var(--text);
  font-weight: 600;
}

.coverage-service-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.6);
  flex-shrink: 0;
}

.coverage-service-item.is-active .coverage-service-dot {
  background: #22c55e;
}

.coverage-service-status {
  margin-left: auto;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--brand-strong);
}

.profile-badge-large {
  display: inline-block;
  margin: 0.5rem 0;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-weight: 700;
  font-size: 0.95rem;
}

.targets-insight-meta {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.targets-security-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.targets-security-stat {
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.95);
  border: 1px solid rgba(229, 231, 235, 0.9);
}

.targets-security-stat--wide {
  grid-column: 1 / -1;
}

.targets-security-stat span {
  display: block;
  font-size: 0.76rem;
  color: var(--text-secondary);
  margin-bottom: 0.2rem;
}

.status-text--active {
  color: #166534;
}

.overview-saas-trend {
  margin: 1rem 0 0;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

@media (max-width: 900px) {
  .targets-insights-grid,
  .overview-saas-grid {
    grid-template-columns: 1fr;
  }
}
