:root {
  --app-bg: #f8f8fb;
  --app-surface: #ffffff;
  --app-border: #ececf3;
  --app-ink: #191919;
  --app-muted: #8d8d98;
  --app-primary: #8f67ff;
  --app-primary-strong: #7446f7;
  --app-accent: #f1ebff;
  --app-sidebar: #ffffff;
  --app-nav-height: 64px;
  --type-minimum: 10px;
  --type-micro: 11px;
  --type-tiny: 12px;
  --type-caption: 13px;
  --type-small: 14px;
}

html {
  font-size: 15px;
}

body.app-body {
  background: linear-gradient(180deg, #fcfcfe 0%, var(--app-bg) 100%);
  color: var(--app-ink);
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.9375rem;
}

.app-container {
  max-width: 1480px;
}

.app-main-workspace {
  padding-bottom: 0;
  min-height: 100vh;
}

.app-navbar {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--app-border);
  box-shadow: 0 8px 30px rgba(25, 25, 25, 0.04);
  backdrop-filter: blur(10px);
}

.app-brand {
  display: inline-flex;
  align-items: center;
  padding-top: 0;
  padding-bottom: 0;
}

.app-brand-tag {
  color: var(--app-muted);
  font-size: 0.78rem;
}

.app-brand-logo {
  display: block;
  height: 42px;
  width: auto;
  max-width: min(360px, 46vw);
  object-fit: contain;
}

.app-top-btn {
  border: 1px solid var(--app-border);
  background: #fff;
  color: var(--app-ink);
  border-radius: 0.8rem;
  padding-inline: 0.9rem;
}

.app-top-btn:hover {
  background: #f6f6fb;
  color: var(--app-ink);
}

.app-top-btn-primary {
  background: linear-gradient(135deg, var(--app-primary), var(--app-primary-strong));
  color: #fff;
  border-color: transparent;
}

.app-top-btn-primary:hover {
  color: #fff;
  background: linear-gradient(135deg, #9b76ff, #7d51f8);
}

.nav-user-chip {
  background: #f5f3fb;
  border: 1px solid #ece7ff;
  color: #5b4b8a;
  border-radius: 1px;
  padding: 0.4rem 0.7rem;
  font-size: 0.82rem;
}

.nav-user-chip-accent {
  background: #eef4ff;
  border-color: #d8e6ff;
  color: #35558a;
}

.page-shell {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.narrow-shell {
  max-width: inherit;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 0.85rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.68rem;
  font-weight: 700;
  color: #9b96aa;
}

.page-title {
  font-size: clamp(1.55rem, 2.2vw, 2.25rem);
  line-height: 1.1;
  margin-bottom: 0.2rem;
  font-weight: 700;
}

.page-subtitle {
  color: var(--app-muted);
  max-width: 50rem;
  margin-bottom: 0;
  font-size: 0.9rem;
}

.policy-builder {
  background: linear-gradient(180deg, #fcfcff 0%, #f5f4fb 100%);
  border: 1px solid var(--app-border);
}

.pagy.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.pagy.nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.9rem;
  border: 1px solid var(--app-border);
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.96);
  color: var(--app-ink);
  text-decoration: none;
  font-weight: 600;
  line-height: 1;
  box-shadow: 0 8px 20px rgba(25, 25, 25, 0.04);
  transition:
    background-color 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease,
    transform 0.16s ease,
    box-shadow 0.16s ease;
}

.pagy.nav a:hover {
  background: #f6f6fb;
  border-color: #ddd9ec;
  color: var(--app-ink);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(25, 25, 25, 0.07);
}

.pagy.nav a.current {
  background: linear-gradient(135deg, var(--app-primary), var(--app-primary-strong));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 12px 24px rgba(116, 70, 247, 0.22);
}

.pagy.nav a[aria-label="Previous"],
.pagy.nav a[aria-label="Next"] {
  min-width: 6.5rem;
  padding: 0 1rem;
  border-radius: 999px;
  font-size: 0;
  letter-spacing: 0.01em;
}

.pagy.nav a[aria-label="Previous"]::before,
.pagy.nav a[aria-label="Next"]::before {
  font-size: 0.88rem;
  font-weight: 700;
}

.pagy.nav a[aria-label="Previous"]::before {
  content: "\2039  Prev";
}

.pagy.nav a[aria-label="Next"]::before {
  content: "Next  \203A";
}

.pagy.nav a.gap,
.pagy.nav a[aria-disabled="true"] {
  background: transparent;
  color: var(--app-muted);
  border-color: transparent;
  box-shadow: none;
  transform: none;
  cursor: default;
}

.pagy.nav a.gap {
  min-width: auto;
  padding: 0 0.15rem;
}

.pagy.nav a[aria-disabled="true"] {
  opacity: 0.72;
}

.pagy.nav a[aria-disabled="true"][aria-label="Previous"],
.pagy.nav a[aria-disabled="true"][aria-label="Next"] {
  border-color: var(--app-border);
  background: rgba(245, 245, 250, 0.9);
}

.account-card {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(219, 227, 239, 0.72);
  backdrop-filter: blur(10px);
}

.metric-card {
  border: 1px solid var(--app-border);
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  /* border-radius: 1px; */
  border-radius: 1px;
  padding: 0.9rem 1rem;
}

.metric-label {
  color: var(--app-muted);
  font-size: 0.73rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.25rem;
}

.metric-value {
  font-weight: 700;
  font-size: 1.55rem;
  line-height: 1;
}

.metric-value.small-value {
  font-size: 0.92rem;
  line-height: 1.35;
  word-break: break-word;
}

.module-policy-table th {
  font-size: 0.82rem;
  color: var(--app-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom-width: 1px;
}

.module-policy-table td,
.module-policy-table th {
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

.workspace-shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
  min-height: 100vh;
}

.workspace-sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  min-height: 100vh;
  height: 100vh;
}

.workspace-sidebar-card {
  background: var(--app-sidebar);
  color: var(--app-ink);
  min-height: 100vh;
  height: 100%;
  padding: 1.1rem 1rem 0;
  border-right: 1px solid var(--app-border);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.workspace-sidebar-top {
  display: flex;
  flex-direction: column;
  gap: 1.3rem;
}

.workspace-sidebar-bottom {
  margin-top: auto;
  padding-top: 1.25rem;
  padding-bottom: 1rem;
}

.workspace-profile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.workspace-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #c9b7ff, #9a78ff);
  color: #fff;
  font-weight: 700;
  font-size: 0.88rem;
}

.workspace-user-name {
  font-weight: 700;
  font-size: 0.94rem;
  line-height: 1.15;
}

.workspace-user-email {
  color: var(--app-muted);
  font-size: 0.76rem;
  line-height: 1.3;
}

.workspace-client-name {
  margin-top: 0.25rem;
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1.2;
}

.report-enhanced-select + .ts-wrapper {
  font-size: 0.98rem;
}

.report-enhanced-select + .ts-wrapper .ts-control {
  min-height: 3rem;
  max-height: 70px;
  border: 1px solid #d9deea;
  border-radius: 0.95rem;
  padding: 0.45rem 0.6rem;
  box-shadow: none;
  background: #fff;
  overflow-y: auto;
  align-content: flex-start;
  scrollbar-width: thin;
}

.report-enhanced-select + .ts-wrapper.focus .ts-control,
.report-enhanced-select + .ts-wrapper .ts-control:focus-within {
  border-color: #5d7df6;
  box-shadow: 0 0 0 0.2rem rgba(93, 125, 246, 0.12);
}

.report-enhanced-select + .ts-wrapper.multi .ts-control > div {
  background: #eef3ff;
  border: 1px solid #dbe5ff;
  color: #23408e;
  border-radius: 999px;
  padding: 0.28rem 0.65rem;
  line-height: 1.2;
}

.report-enhanced-select + .ts-wrapper .ts-control > input {
  min-width: 8rem;
  font-size: 0.95rem;
}

.report-enhanced-select + .ts-wrapper .ts-dropdown {
  border: 1px solid #d9deea;
  border-radius: 0.95rem;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
  padding: 0.4rem;
}

.report-enhanced-select + .ts-wrapper .option,
.report-enhanced-select + .ts-wrapper .item {
  word-break: break-word;
}

.report-enhanced-select + .ts-wrapper .option {
  border-radius: 0.7rem;
  padding: 0.55rem 0.7rem;
}

.report-enhanced-select + .ts-wrapper .option.active {
  background: #eff4ff;
  color: #173a8b;
}

.report-enhanced-select + .ts-wrapper .remove {
  border-left: 0;
  color: #4f67a9;
  margin-left: 0.35rem;
  padding-left: 0.25rem;
}

.report-enhanced-select + .ts-wrapper .no-results {
  color: #8d8d98;
  padding: 0.55rem 0.7rem;
}

.public-report-body {
  background:
    radial-gradient(circle at top left, rgba(99, 102, 241, 0.08), transparent 32%),
    linear-gradient(180deg, #fbfcff 0%, #f3f6fb 100%);
}

.public-report-main {
  max-width: 1440px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}

.public-report-shell {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.public-report-hero {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  padding: 1.5rem 1.75rem;
  border: 1px solid rgba(219, 227, 239, 0.72);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-radius: 1.4rem;
}

.public-report-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 700;
  color: #7c86a3;
  margin-bottom: 0.45rem;
}

.public-report-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  margin-bottom: 0.9rem;
}

.public-report-brand img {
  display: block;
  height: 30px;
  width: auto;
  max-width: 170px;
  object-fit: contain;
}

.public-report-slogan {
  text-transform: uppercase;
  letter-spacing: 0.13em;
  font-size: 0.6rem;
  font-weight: 700;
  color: #7c86a3;
}

.public-report-title {
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1;
  margin-bottom: 0.35rem;
}

.public-report-subtitle {
  margin-bottom: 0;
  color: #6b7280;
  max-width: 46rem;
}

.public-report-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
}

.public-report-pill {
  padding: 1rem 1.1rem;
  border: 1px solid rgba(219, 227, 239, 0.72);
  background: rgba(255, 255, 255, 0.92);
  border-radius: 1.1rem;
}

@media (max-width: 991px) {
  .public-report-hero {
    flex-direction: column;
    align-items: start;
  }

  .public-report-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575px) {
  .public-report-main {
    padding-inline: 1rem;
  }

  .public-report-summary {
    grid-template-columns: 1fr;
  }
}

.report-chart-wrap {
  display: flex;
  justify-content: center;
  padding: 1rem 0 1.5rem;
}

.report-chart-donut {
  width: 16rem;
  height: 16rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
}

.report-chart-center {
  width: 8.25rem;
  height: 8.25rem;
  border-radius: 50%;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.08);
}

.report-legend {
  display: grid;
  gap: 0.75rem;
}

.report-legend-item {
  display: flex;
  align-items: start;
  gap: 0.75rem;
}

.report-legend-swatch {
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 999px;
  margin-top: 0.25rem;
  flex: 0 0 auto;
}

.workspace-title {
  font-size: 1.25rem;
  line-height: 1.1;
  margin-bottom: 0.25rem;
  font-weight: 700;
}

.workspace-slug {
  color: var(--app-muted);
  font-size: 0.82rem;
}

.workspace-search-input {
  border-radius: 0.75rem;
  border-color: var(--app-border);
  background: #f3f4f8;
  font-size: 0.88rem;
  min-height: 2.5rem;
}

.workspace-search-input:disabled {
  color: #9d9cab;
  opacity: 1;
}

.workspace-nav-group {
  display: grid;
  gap: 0.55rem;
}

.workspace-section-label {
  color: #b0acbc;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  padding-inline: 0.45rem;
  margin-bottom: 0;
}

.workspace-nav {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.workspace-nav-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 2.55rem;
  padding: 0.65rem 0.8rem;
  border-radius: 0.8rem;
  color: #78788a;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.94rem;
  transition: all 0.15s ease;
}

/* Count of unacknowledged notifications. Rendered only when non-zero, so a
   quiet inbox adds nothing to the nav. */
.workspace-nav-count {
  margin-left: auto;
  min-width: 1.35rem;
  padding: 0.05rem 0.4rem;
  border-radius: 0.7rem;
  background: #e5484d;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 600;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.workspace-nav-link:hover {
  color: var(--app-ink);
  background: #f5f4fa;
}

.workspace-nav-link.active {
  color: var(--app-ink);
  background: #ffffff;
  border: 1px solid var(--app-border);
  box-shadow: 0 2px 8px rgba(32, 34, 39, 0.04);
}

.workspace-nav-link-muted {
  color: #9b97a9;
}

.workspace-main {
  min-width: 0;
  padding: 1.5rem 0 1.5rem 1.75rem;
}

.admin-sidebar-card {
  background: linear-gradient(180deg, #ffffff, #fbfbfe);
}

.admin-workspace-main {
  padding-top: 1.25rem;
}

.workspace-alert {
  margin-bottom: 1rem;
}

.auto-dismiss-alert {
  transition: opacity 0.3s ease, transform 0.3s ease, margin 0.3s ease;
}

.auto-dismiss-alert-hidden {
  opacity: 0;
  transform: translateY(-6px);
}

.panel-card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--app-border);
  border-radius: 1px;
  padding: 1rem 1.05rem;
  box-shadow: 0 8px 24px rgba(22, 38, 63, 0.035);
}

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

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

.panel-subtitle {
  margin: 0.25rem 0 0;
  color: var(--app-muted);
  font-size: 0.86rem;
}

.metric-card-hero {
  background: #fff;
  color: var(--app-ink);
}

.metric-card-request {
  background: linear-gradient(135deg, #fcfbff, #f6f3ff);
}

.metric-card-hero .metric-label,
.metric-card-hero .metric-footnote {
  color: var(--app-muted);
}

.metric-footnote {
  color: var(--app-muted);
  font-size: 0.8rem;
  margin-top: 0.35rem;
}

.workspace-table thead th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--app-muted);
  border-bottom-width: 1px;
}

.workspace-table td,
.workspace-table th {
  padding-top: 0.8rem;
  padding-bottom: 0.8rem;
  font-size: 0.9rem;
}

.finding-feed {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.insight-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.95fr;
  gap: 0.9rem;
}
.btn{
  border-radius: 1px !important;
}

.insight-tile {
  border: 1px solid var(--app-border);
  border-radius: 1px;
  background: linear-gradient(180deg, #ffffff, #fafbfe);
  padding: 0.95rem;
}

.insight-label {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--app-muted);
  margin-bottom: 0.8rem;
}

.status-meter-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.status-meter-row {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.status-meter-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.84rem;
}

.progress-thin {
  height: 0.45rem;
  background: #f1f2f7;
}

.stats-grid-compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}

.insight-summary-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.insight-summary-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.7rem;
  align-items: start;
  font-size: 0.9rem;
  color: #363847;
}

.insight-summary-dot {
  width: 0.55rem;
  height: 0.55rem;
  margin-top: 0.35rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--app-primary), var(--app-primary-strong));
}

.insight-divider {
  height: 1px;
  background: var(--app-border);
  margin: 1rem 0;
}

.finding-feed-item {
  border: 1px solid var(--app-border);
  border-radius: 1px;
  padding: 0.9rem;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.stats-pill {
  padding: 0.9rem;
  border-radius: 1px;
  border: 1px solid var(--app-border);
  background: #fff;
}

.stats-pill-value {
  margin-top: 0.55rem;
  font-size: 1.35rem;
  font-weight: 700;
}

.report-run-summary {
  overflow: hidden;
}

.report-run-hero {
  min-height: 100%;
  padding: 1.1rem 1.15rem;
  border: 1px solid var(--app-border);
  background:
    radial-gradient(circle at top right, rgba(143, 103, 255, 0.12), transparent 38%),
    linear-gradient(180deg, #ffffff, #f8fbff);
}

.report-run-status-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-top: 0.45rem;
}

.report-run-pulse {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 999px;
  background: #f0ad4e;
  box-shadow: 0 0 0 rgba(240, 173, 78, 0.5);
  animation: reportPulse 1.6s infinite;
}

.report-run-progress-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 250, 255, 0.98));
}

.report-run-progress-bar {
  position: relative;
  overflow: hidden;
  height: 0.5rem;
  border-radius: 999px;
  background: #eceefa;
  margin-bottom: 1rem;
}

.report-run-progress-fill {
  height: 100%;
  width: 36%;
  border-radius: inherit;
  background: linear-gradient(90deg, #c9b7ff, #8f67ff, #7446f7);
}

.report-run-progress-fill.is-running {
  width: 52%;
  animation: reportProgressSlide 1.8s ease-in-out infinite alternate;
}

.report-run-step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.8rem;
  padding: 0.9rem;
  min-height: 100%;
  border: 1px solid var(--app-border);
  background: #fff;
}

.report-run-step.is-active {
  border-color: #ddd2ff;
  background: linear-gradient(180deg, #fff, #faf8ff);
}

.report-run-step-marker {
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: #5c46a3;
  background: #eee8ff;
}

.report-run-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 1rem;
}

.report-run-meta-item {
  padding: 0.9rem;
  border: 1px solid var(--app-border);
  background: #fff;
}

.report-run-failure-card {
  border-color: #f1d7dd;
  background: linear-gradient(180deg, #fff, #fff9fa);
}

.report-run-error {
  padding: 0.95rem 1rem;
  border: 1px solid #f4d6dd;
  background: #fff;
}

@keyframes reportPulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(240, 173, 78, 0.45);
  }

  70% {
    transform: scale(1);
    box-shadow: 0 0 0 10px rgba(240, 173, 78, 0);
  }

  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(240, 173, 78, 0);
  }
}

@keyframes reportProgressSlide {
  0% {
    transform: translateX(0%);
  }

  100% {
    transform: translateX(85%);
  }
}

@media (max-width: 991px) {
  .report-run-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575px) {
  .report-run-meta-grid {
    grid-template-columns: 1fr;
  }
}

.module-usage-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.api-key-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-control {
    border-radius: 1px;
}

.api-key-policy-panel {
  border: 1px solid #ece9f8;
  border-radius: 0.95rem;
  background: #fbfaff;
  padding: 0.95rem;
}

.api-key-policy-default-note {
  border: 1px solid #ececf3;
  border-radius: 0.8rem;
  background: #ffffff;
  padding: 0.75rem 0.85rem;
}

.policy-note {
  border: 1px solid #ececf3;
  border-radius: 0.8rem;
  background: #ffffff;
  padding: 0.75rem 0.85rem;
}

.api-key-policy-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.api-key-policy-summary > div {
  padding: 10px;
  border: 1px solid var(--pc-border);
  border-radius: 5px;
  background: var(--pc-surface-2);
}

.api-key-policy-summary span,
.api-key-policy-summary strong {
  display: block;
}

.api-key-policy-summary span {
  color: var(--pc-muted);
  font-size: var(--type-tiny);
  font-weight: 780;
  text-transform: uppercase;
}

.api-key-policy-summary strong {
  margin-top: 5px;
  color: var(--pc-text);
  font-size: 18px;
  line-height: 1;
}

.api-key-policy-sections {
  display: grid;
  gap: 9px;
}

.api-key-policy-section,
.api-key-module-card {
  border: 1px solid var(--pc-border);
  border-radius: 5px;
  background: var(--pc-surface);
}

.api-key-policy-section > summary,
.api-key-module-card > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  list-style: none;
  cursor: pointer;
}

.api-key-policy-section > summary::-webkit-details-marker,
.api-key-module-card > summary::-webkit-details-marker {
  display: none;
}

.api-key-policy-section > summary {
  min-height: 54px;
  padding: 12px 14px;
}

.api-key-policy-section > summary span,
.api-key-policy-section > summary small {
  display: block;
}

.api-key-policy-section > summary span {
  color: var(--pc-text);
  font-size: 13px;
  font-weight: 820;
}

.api-key-policy-section > summary small {
  margin-top: 3px;
  color: var(--pc-muted);
  font-size: var(--type-caption);
}

.api-key-policy-section > summary::after,
.api-key-module-card > summary::after {
  content: "";
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  color: var(--pc-muted);
  transform: rotate(45deg);
}

.api-key-policy-section[open] > summary::after,
.api-key-module-card[open] > summary::after {
  transform: rotate(225deg);
}

.api-key-policy-section-body {
  padding: 0 14px 14px;
  border-top: 1px solid var(--pc-border);
}

.api-key-policy-section-body > .row:first-child,
.api-key-policy-section-body > .mb-3:first-child,
.api-key-module-editor {
  margin-top: 14px;
}

.api-key-policy-import-row {
  margin-top: 14px;
  margin-bottom: 10px;
  padding: 10px 12px;
  border: 1px static var(--pc-border);
  border-radius: 4px;
  background: #111111;
}

.api-key-policy-import-row select {
  max-width: 260px;
}

.api-key-module-editor {
  display: grid;
  gap: 8px;
}

.api-key-module-card > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 0.62fr) auto;
  min-height: 62px;
  padding: 11px 12px;
}

.api-key-module-main {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.api-key-module-body {
  display: grid;
  gap: 12px;
  padding: 12px;
  border-top: 1px solid var(--pc-border);
}

.module-score-cell {
  min-width: 140px;
}

.module-signal-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.module-signal-row td {
  padding-top: 0;
  border-top: 0;
}

.module-signal-card {
  min-width: 160px;
  flex: 1 1 180px;
  max-width: 220px;
  padding: 0.7rem;
  border: 1px solid #e7eaf3;
  border-radius: 0.8rem;
  background: #fbfcff;
}

.module-score-hint {
  margin-top: 0.35rem;
  font-size: 0.72rem;
  color: #53576a;
  line-height: 1.35;
}

.module-score-hint strong {
  color: #222534;
}

.module-score-hint-muted {
  color: #8d90a0;
}

.api-key-card-details {
  border: 1px solid var(--app-border);
  border-radius: 1px;
  background: linear-gradient(180deg, #ffffff, #fafbfe);
  overflow: hidden;
}

.api-key-card-summary {
  list-style: none;
  cursor: pointer;
  padding: 1rem 1rem 0.95rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

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

.api-key-card-summary::after {
  content: "+";
  font-size: 1.15rem;
  color: #82859a;
  margin-left: 0.75rem;
}

.api-key-card-details[open] .api-key-card-summary::after {
  content: "−";
}

.rounded-4{
  border-radius: 1px !important;
}
.alert {
    border-radius: 1px !important;
}
.api-key-card-summary-main {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 0;
}

.api-key-card-title-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.api-key-card-prefix {
  font-size: 0.8rem;
  color: var(--app-muted);
}

.api-key-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.api-key-card-summary-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(64px, 1fr));
  gap: 0.5rem;
}

.api-key-mini-stat {
  display: grid;
  gap: 0.15rem;
  text-align: center;
  padding: 0.55rem 0.6rem;
  border: 1px solid #ececf3;
  border-radius: 1px;
  background: #fff;
}

.api-key-mini-label {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--app-muted);
  font-weight: 700;
}

.api-key-mini-value {
  font-size: 0.98rem;
  font-weight: 700;
  color: #1f2231;
}

.api-key-card-body {
  padding: 0 1rem 1rem;
  border-top: 1px solid #f0f1f6;
}

.api-key-inline-note {
  padding-top: 0.65rem;
  font-size: 0.8rem;
  color: #7a7f91;
}

.module-usage-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 0.9rem;
  border-radius: 1px;
  border: 1px solid var(--app-border);
  background: #fff;
}

.table-warning-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.table-warning-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  background: #fff4e8;
  border: 1px solid #ffd9ae;
  color: #8a4b08;
  font-size: 0.76rem;
  line-height: 1.2;
}

.code-example-stack {
  display: grid;
  gap: 1rem;
}

.code-example-card {
  border: 1px solid var(--app-border);
  background: linear-gradient(180deg, #ffffff, #fafbfe);
}

.code-example-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1rem 0;
}

.empty-state-panel {
  padding: 1.1rem 1rem;
  border: 1px dashed var(--app-border);
  background: linear-gradient(180deg, #ffffff, #fafbfe);
}

.finding-fact-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.4rem 0;
  border-bottom: 1px dashed #efedf6;
}

.finding-fact-row:last-child {
  border-bottom: 0;
}

.finding-fact-label {
  color: var(--app-muted);
  font-size: 0.78rem;
}

.finding-fact-value {
  color: var(--app-ink);
  font-size: 0.8rem;
  font-weight: 600;
  text-align: right;
}

.request-findings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.finding-card {
  border: 1px solid var(--app-border);
  border-radius: 1px;
  padding: 0.9rem;
  background: linear-gradient(180deg, #ffffff, #fcfcfe);
}

.finding-score {
  font-weight: 700;
  color: var(--app-primary-strong);
  font-size: 0.92rem;
}

.behavioral-visual-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.75rem;
}

.behavioral-visual-card {
  border: 1px solid rgba(16, 35, 60, 0.1);
  border-radius: 8px;
  padding: 0.75rem;
  background: #fff;
}

.behavioral-visual-title {
  color: var(--app-ink);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  margin-bottom: 0.55rem;
  text-transform: uppercase;
}

.behavioral-visual-frame {
  border: 1px solid #edf0f5;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}

.behavioral-visual-frame svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 260px;
}

.behavioral-visual-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.55rem;
}

.behavioral-visual-meta span {
  border: 1px solid #e7eaf0;
  border-radius: 999px;
  color: var(--app-muted);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.45rem;
}

.finding-ai-highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}

.finding-ai-highlight {
  border: 1px solid #efedf6;
  border-radius: 10px;
  padding: 0.75rem 0.8rem;
  background: #fff;
}

.finding-ai-highlight-label {
  color: var(--app-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.finding-ai-highlight-value {
  color: var(--app-ink);
  font-size: 0.92rem;
  font-weight: 700;
  margin-top: 0.35rem;
  line-height: 1.25;
}

.json-block {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.76rem;
  color: #17314f;
  background: rgba(16, 35, 60, 0.05);
  border: 1px solid rgba(16, 35, 60, 0.08);
  border-radius: 1px;
  padding: 0.95rem;
  max-height: 360px;
  overflow: auto;
}

.token-panel {
  display: grid;
  gap: 0.9rem;
  background: linear-gradient(135deg, #fff8de, #ffefb4);
  border: 1px solid #f0d983;
  border-radius: 1px;
  padding: 1rem 1.05rem;
  box-shadow: 0 14px 40px rgba(135, 97, 17, 0.12);
}

.token-code-large {
  font-size: 0.9rem;
  padding: 0.85rem 0.95rem;
}

.summary-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.summary-list-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
  border-bottom: 1px dashed #efedf6;
  padding-bottom: 0.55rem;
}

.summary-key {
  color: var(--app-muted);
  font-size: 0.8rem;
}

.summary-value {
  color: var(--app-ink);
  font-weight: 600;
  text-align: right;
  font-size: 0.86rem;
}

.finding-facts {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.finding-fact {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  font-size: 0.82rem;
}

.finding-fact-key {
  color: var(--app-muted);
}

.finding-fact-value {
  color: var(--app-ink);
  text-align: right;
  font-weight: 500;
}

.request-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
}

.request-summary-stat {
  border: 1px solid var(--app-border);
  border-radius: 10px;
  padding: 1rem 1.05rem;
  background: linear-gradient(180deg, #ffffff, #fbfbfd);
  min-height: 132px;
}

.request-summary-stat-score {
  background: linear-gradient(135deg, #fffdfa, #f6f2ff);
}

.request-summary-stat-core {
  background: linear-gradient(135deg, #fff6f6, #fffaf7);
}

.request-summary-stat-ai {
  background: linear-gradient(135deg, #fffaf0, #fffdf7);
}

.request-summary-stat-processing {
  background: linear-gradient(135deg, #f8fbff, #fafcff);
}

.request-summary-label,
.request-summary-meta-label {
  color: var(--app-muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.request-summary-value,
.request-summary-meta-value {
  color: var(--app-ink);
  font-weight: 700;
}

.request-summary-value {
  font-size: 2rem;
  line-height: 1.05;
  margin-top: 0.55rem;
}

.request-summary-footnote {
  color: var(--app-muted);
  font-size: 0.82rem;
  margin-top: 0.55rem;
}

.request-summary-warning-panel {
  border: 1px solid var(--app-border);
  border-radius: 10px;
  padding: 1rem 1.05rem;
  background: linear-gradient(180deg, #ffffff, #fcfcfe);
}

.request-summary-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.request-summary-meta-card {
  border: 1px solid #efedf6;
  border-radius: 10px;
  padding: 0.9rem 0.95rem;
  background: #fff;
}

.request-summary-meta-value {
  margin-top: 0.45rem;
  font-size: 1rem;
  line-height: 1.3;
  word-break: break-word;
}

@media (max-width: 1199px) {
  .request-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .request-summary-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .request-summary-grid,
  .request-summary-meta-grid {
    grid-template-columns: 1fr;
  }

  .request-summary-value {
    font-size: 1.7rem;
  }

  .finding-ai-highlights {
    grid-template-columns: 1fr;
  }
}

.raw-details summary {
  cursor: pointer;
  color: var(--app-primary-strong);
  font-weight: 600;
  font-size: 0.82rem;
}

.token-alert {
  background: linear-gradient(180deg, #fff8dd, #fff2bf);
}

.token-code {
  display: block;
  padding: 0.75rem 0.85rem;
  border-radius: 0.8rem;
  background: rgba(16, 35, 60, 0.06);
  color: #0b2542;
  word-break: break-all;
  font-size: 0.82rem;
}

.list-group-item {
  background: transparent;
}

.ai-settings-hero {
  background:
    radial-gradient(circle at top right, rgba(31, 92, 214, 0.08), transparent 24rem),
    linear-gradient(180deg, #ffffff, #fbfcff);
}

.ai-settings-stat-card {
  height: 100%;
  border: 1px solid var(--app-border);
  background: rgba(255, 255, 255, 0.92);
  padding: 1rem;
  border-radius: 1px;
}

.ai-settings-stat-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--app-muted);
  margin-bottom: 0.55rem;
}

.ai-settings-stat-value {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.ai-settings-connection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem;
}

.connections-shell {
  display: grid;
  gap: 22px;
}

.connections-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--pc-border);
}

.connections-hero .page-subtitle {
  max-width: 760px;
}

.connections-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--pc-border);
  border-bottom: 1px solid var(--pc-border);
}

.connections-stat {
  min-height: 92px;
  padding: 20px 22px;
  border-right: 1px solid var(--pc-border);
}

.connections-stat:last-child {
  border-right: 0;
}

.connections-stat strong {
  display: block;
  color: var(--pc-text);
  font-size: 28px;
  font-weight: 760;
  line-height: 1;
}

.connections-stat span {
  display: block;
  margin-top: 12px;
  color: var(--pc-muted);
  font-size: var(--type-caption);
  font-weight: 760;
  text-transform: uppercase;
}

.connections-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(260px, 1fr));
  gap: 12px;
}

.connection-card,
.connections-empty {
  border: 1px solid var(--pc-border);
  border-radius: 5px;
  background: var(--pc-surface);
  color: var(--pc-text-soft);
}

.connection-card {
  display: grid;
  min-height: 360px;
  grid-template-rows: auto auto auto 1fr auto auto;
  gap: 16px;
  padding: 16px;
}

.connection-card-top,
.connection-card-actions,
.connection-badges {
  display: flex;
  align-items: center;
  gap: 10px;
}

.connection-card-top {
  justify-content: space-between;
}

.connection-icon {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--pc-border);
  border-radius: 5px;
  background: var(--pc-surface-2);
  color: var(--pc-cyan);
}

.connection-icon svg {
  width: 18px;
  height: 18px;
}

.connection-badges {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.connection-type-badge,
.connection-status-badge {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: var(--type-micro);
  font-weight: 500;
}

.connection-type-badge {
  background: #e8f0ff;
  color: #22559f;
  text-transform: uppercase;
}

.connection-status-badge {
  border: 1px solid var(--pc-border);
  background: var(--pc-surface-2);
  color: var(--pc-muted);
}

.connection-status-badge i {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
}

.connection-status-badge.is-enabled {
  border-color: rgba(22, 163, 111, 0.45);
  background: rgba(22, 163, 111, 0.13);
  color: #20d698;
}

.connection-status-badge.is-paused {
  color: var(--pc-muted);
}

.connection-card-main h2 {
  margin: 0;
  color: var(--pc-text);
  font-size: 17px;
  font-weight: 400;
}

.connection-card-main p {
  min-height: 44px;
  margin: 10px 0 0;
  color: var(--pc-muted);
  line-height: 1.45;
}

.connection-endpoint {
  padding: 12px;
  border: 1px solid var(--pc-border);
  border-radius: 5px;
  background: var(--pc-sidebar);
}

.connection-endpoint code {
  color: var(--pc-text-soft);
  white-space: normal;
  word-break: break-word;
}

.connection-meta {
  display: grid;
  gap: 0;
  margin: 0;
  border-top: 1px dashed var(--pc-border);
  border-bottom: 1px dashed var(--pc-border);
}

.connection-meta div {
  display: flex;
  min-height: 36px;
  align-items: center;
  gap: 10px;
}

.connection-meta dt {
  margin: 0;
  color: var(--pc-muted);
  font-size: var(--type-caption);
  font-weight: 500;
}

.connection-meta dd {
  margin: 0;
  color: var(--pc-text-soft);
  font-size: var(--type-small);
  font-weight: 400;
}

.connection-note {
  min-height: 40px;
  color: var(--pc-muted);
  font-size: var(--type-small);
  line-height: 1.45;
}

.connection-card-actions {
  margin-top: 2px;
  padding-top: 14px;
  border-top: 1px solid var(--pc-border);
  flex-wrap: wrap;
}

.connection-actions-spacer {
  flex: 1;
}

.connections-empty {
  grid-column: 1 / -1;
  padding: 18px;
}

.signature-tabs {
  display: grid;
  gap: 14px;
}

.signature-tab-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--pc-border);
  border-radius: 5px;
  background: var(--pc-surface);
  overflow: hidden;
}

.signature-tab {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border: 0;
  border-right: 1px solid var(--pc-border);
  background: transparent;
  color: var(--pc-muted);
  text-align: left;
}

.signature-tab:last-child {
  border-right: 0;
}

.signature-tab span {
  font-size: var(--type-small);
  font-weight: 760;
  text-transform: uppercase;
}

.signature-tab strong {
  color: var(--pc-text);
  font-size: 26px;
  line-height: 1;
}

.signature-tab.is-active {
  background: var(--pc-surface-2);
  color: var(--pc-text);
}

.signature-tab:focus-visible {
  outline: 2px solid var(--pc-cyan);
  outline-offset: -2px;
}

.signature-tab-panel {
  display: block;
}

.signature-tab-panel[hidden] {
  display: none;
}

.ai-settings-connection-tile,
.ai-settings-empty-state,
.ai-settings-guidance,
.ai-settings-provider-card,
.ai-settings-builder-card,
.ai-settings-review-details {
  border: 1px solid var(--app-border);
  background: linear-gradient(180deg, #ffffff, #fbfbfe);
  border-radius: 1px;
}

.ai-settings-connection-tile,
.ai-settings-empty-state,
.ai-settings-guidance,
.ai-settings-provider-card,
.ai-settings-builder-card {
  padding: 1rem;
}

.ai-settings-empty-state {
  grid-column: 1 / -1;
}

.ai-settings-dialog {
  width: min(980px, calc(100vw - 2rem));
  max-height: calc(100vh - 3rem);
  border: 0;
  padding: 0;
  border-radius: 1px;
  box-shadow: 0 20px 60px rgba(15, 30, 52, 0.2);
}

.ai-settings-dialog::backdrop {
  background: rgba(10, 17, 27, 0.42);
}

.ai-settings-dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 1rem;
  padding: 1.1rem 1.1rem 0.85rem;
  border-bottom: 1px solid var(--app-border);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 1;
}

.ai-settings-dialog-body {
  padding: 1rem 1.1rem 1.1rem;
  overflow: auto;
}

.ai-settings-provider-builder {
  border-top: 1px solid var(--app-border);
  padding-top: 1rem;
}

.ai-settings-review-details {
  overflow: hidden;
}

.ai-settings-review-summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 1rem;
  padding: 1rem;
  cursor: pointer;
}

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

.ai-settings-review-summary-main {
  min-width: 0;
}

.ai-settings-review-body {
  border-top: 1px solid var(--app-border);
  padding: 1rem;
  background: rgba(252, 252, 255, 0.75);
}

.ai-settings-summary-caret {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--app-primary-strong);
}

.ai-settings-review-details[open] .ai-settings-summary-caret::after {
  content: " \2191";
}

.ai-settings-review-details:not([open]) .ai-settings-summary-caret::after {
  content: " \2193";
}

.ai-settings-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.ai-settings-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid #d8dfeb;
  background: #f8fafc;
  color: #16324f;
  padding: 0.18rem 0.5rem;
  font-size: 0.76rem;
  font-weight: 600;
  border-radius: 999px;
}

.ai-settings-chip-muted {
  color: var(--app-muted);
}

.ai-settings-module-option {
  display: flex;
  align-items: start;
  gap: 0.65rem;
  width: 100%;
  height: 100%;
  padding: 0.8rem 0.85rem;
  border: 1px solid var(--app-border);
  background: rgba(255, 255, 255, 0.96);
  border-radius: 1px;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.ai-settings-module-option:hover {
  border-color: #cfd8e6;
  background: #fbfcff;
  box-shadow: 0 8px 18px rgba(18, 34, 54, 0.04);
}

.ai-settings-module-option:has(input:checked) {
  border-color: #93c5fd;
  background: linear-gradient(180deg, #f8fbff, #eef5ff);
}

.ai-settings-advanced-panel {
  border: 1px dashed #d7deea;
  border-radius: 1px;
  padding: 0.8rem 0.9rem;
  background: rgba(255, 255, 255, 0.76);
}

.ai-settings-advanced-panel summary {
  cursor: pointer;
  list-style: none;
}

.ai-settings-advanced-panel summary::-webkit-details-marker {
  display: none;
}

@media (max-width: 991.98px) {
  .page-header {
    align-items: start;
    flex-direction: column;
  }

  .metric-value {
    font-size: 1.45rem;
  }

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

  .workspace-sidebar {
    position: static;
    min-height: auto;
    height: auto;
  }

  .workspace-sidebar-card {
    min-height: auto;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--app-border);
  }

  .workspace-main {
    padding: 1.2rem 0 1.5rem;
  }

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

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

  .ai-settings-dialog {
    width: calc(100vw - 1rem);
    max-height: calc(100vh - 1rem);
  }

  .ai-settings-dialog-header {
    flex-direction: column;
  }

  .ai-settings-review-summary {
    flex-direction: column;
  }
}

.auth-body {
  background:
    radial-gradient(circle at 50% 0%, rgba(14, 104, 255, 0.12), transparent 30rem),
    linear-gradient(180deg, #fbfdff 0%, #f3f7fc 100%);
}

.auth-body .app-container {
  max-width: none;
  width: 100%;
}

.auth-shell {
  min-height: calc(100vh - 4rem);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.auth-form-panel {
  display: flex;
  justify-content: center;
  width: 100%;
}

.auth-card {
  width: 100%;
  max-width: 540px;
  overflow: hidden;
  border: 1px solid rgba(180, 198, 224, 0.55);
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 30px 80px rgba(13, 35, 72, 0.18);
}

.auth-card-body {
  padding: clamp(1.45rem, 3vw, 2.35rem);
}

.auth-copy-block {
  margin-bottom: 1.5rem;
}

.auth-heading {
  color: #06152f;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  line-height: 1.05;
  margin-bottom: 0.6rem;
}

.auth-subheading {
  color: #60708b;
  margin-bottom: 0;
}

.auth-form-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-form-stack .form-label {
  color: #20324f;
  font-size: 0.88rem;
  margin-bottom: 0.4rem;
}

.auth-input {
  min-height: 3.2rem;
  border-radius: 0.75rem;
  border-color: #d6e1ee;
  background: #fbfdff;
  padding-left: 0.95rem;
  padding-right: 0.95rem;
  box-shadow: inset 0 1px 0 rgba(13, 35, 72, 0.03);
}

.auth-input:focus {
  border-color: #0e68ff;
  box-shadow: 0 0 0 0.2rem rgba(14, 104, 255, 0.12);
}

.auth-submit {
  min-height: 3.25rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #0b55d8, #0c7eff);
  box-shadow: 0 14px 32px rgba(14, 104, 255, 0.24);
  font-weight: 700;
}

.auth-submit:hover,
.auth-submit:focus {
  background: linear-gradient(135deg, #0a4ec7, #0b73ea);
}

.auth-footer-copy,
.auth-hint {
  color: #60708b;
  font-size: 0.92rem;
}

.auth-hint {
  margin-top: 0.45rem;
}

.auth-link-inline,
.auth-link,
.tiny-link {
  color: #0b63df;
  font-weight: 700;
  text-decoration: none;
}

.auth-link-inline:hover,
.auth-link:hover,
.tiny-link:hover {
  color: #094eb0;
  text-decoration: underline;
}

.auth-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

@media (max-width: 991.98px) {
  .auth-body {
    background:
      radial-gradient(circle at 50% 0%, rgba(14, 104, 255, 0.12), transparent 24rem),
      linear-gradient(180deg, #fbfdff 0%, #f3f7fc 100%);
  }

  .auth-shell {
    min-height: calc(100vh - 2rem);
    padding: 1.25rem 0 2rem;
  }
}

/* ==== Client report: decision queue, funnel, scorecard, grouped concerns ==== */

.report-section-heading {
  font-size: 1.02rem;
  font-weight: 700;
  margin: 1.1rem 0 0.65rem 0.15rem;
}

.quality-value {
  color: #0f766e;
}

.metric-card-decision {
  border-color: #f3d9a4;
  background: linear-gradient(180deg, #fffdf7, #fdf6e5);
}

.metric-card-decision .metric-value {
  color: #92600a;
}

.metric-card-clear .metric-value {
  color: #0f766e;
}

.decision-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.decision-card {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--app-border);
  border-radius: 1px;
  padding: 0.95rem 1.05rem;
  box-shadow: 0 8px 24px rgba(22, 38, 63, 0.035);
}

.decision-chip {
  flex-shrink: 0;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.92rem;
}

.decision-chip-danger {
  background: #fdecec;
  color: #b42323;
}

.decision-chip-warning {
  background: #fdf3dd;
  color: #92600a;
}

.decision-body {
  flex: 1;
  min-width: 0;
}

.decision-title {
  font-weight: 600;
  font-size: 0.98rem;
}

.decision-sub {
  color: var(--app-muted);
  font-size: 0.86rem;
  margin-top: 0.15rem;
}

.decision-source-label {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
  background: #202020;
  padding: 0.1rem 0.4rem;
  border-radius: 1px;
}

.decision-actions {
  flex-shrink: 0;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.decision-preview summary {
  cursor: pointer;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--app-primary-strong);
  margin-top: 0.45rem;
  list-style: none;
}

.decision-preview summary::before {
  content: "▸ ";
}

.decision-preview[open] summary::before {
  content: "▾ ";
}

.report-empty-state {
  text-align: center;
  padding: 2.25rem 1rem;
  margin-bottom: 1rem;
}

.report-empty-check {
  width: 3rem;
  height: 3rem;
  margin: 0 auto 0.75rem;
  border-radius: 50%;
  background: #e5f5f0;
  color: #0f766e;
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.report-empty-sub {
  color: var(--app-muted);
  font-size: 0.9rem;
  margin-top: 0.3rem;
}

.concern-group-list {
  display: flex;
  flex-direction: column;
}

.concern-group {
  border-top: 1px solid var(--app-border);
  padding: 0.6rem 0.15rem;
}

.concern-group:first-child {
  border-top: 0;
}

.concern-group summary {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
  list-style: none;
}

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

.concern-group-label {
  font-weight: 600;
  font-size: 0.92rem;
}

.concern-group-followup {
  color: var(--app-muted);
  font-size: 0.82rem;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.concern-group-caret {
  margin-left: auto;
  color: var(--app-muted);
  font-size: 0.8rem;
}

.concern-group[open] .concern-group-caret {
  transform: rotate(180deg);
}

.count-pill {
  flex-shrink: 0;
  min-width: 2.4rem;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.14rem 0.55rem;
  border-radius: 999px;
}

.count-pill-danger {
  background: #fdecec;
  color: #b42323;
}

.scorecard-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.scorecard-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.scorecard-numbers {
  display: inline-flex;
  gap: 0.6rem;
  align-items: baseline;
}

.scorecard-bar {
  display: flex;
  height: 0.6rem;
  border-radius: 1px;
  background: #e7f3ee;
  overflow: hidden;
  margin-top: 0.3rem;
}

.scorecard-seg {
  display: block;
  height: 100%;
}

.scorecard-seg-blocked {
  background: #d64545;
}

.scorecard-seg-flagged {
  background: #eba63f;
}

.scorecard-detail {
  margin-top: 0.25rem;
}

.funnel-list {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.funnel-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.funnel-track {
  height: 0.85rem;
  border-radius: 1px;
  background: #f2f2f7;
  overflow: hidden;
}

.funnel-fill {
  display: block;
  height: 100%;
  border-radius: 1px;
}

.funnel-fill-screened {
  background: #b9a7f4;
}

.funnel-fill-blocked {
  background: #d64545;
}

.funnel-fill-late {
  background: #e07b39;
}

.funnel-fill-flagged {
  background: #eba63f;
}

.funnel-fill-cleared {
  background: #a9b3c4;
}

.funnel-fill-clean {
  background: #2f9e77;
}

.handled-strip {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  background: #f4faf7;
  border: 1px solid #d9ede4;
  border-radius: 1px;
  padding: 0.8rem 1.05rem;
  margin-bottom: 1rem;
}

.handled-strip-icon {
  flex-shrink: 0;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: #e5f5f0;
  color: #0f766e;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.handled-strip-text {
  flex: 1;
  min-width: 240px;
  font-size: 0.88rem;
  color: #2f5d4e;
}

.handled-strip-actions {
  display: inline-flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

@media (max-width: 767.98px) {
  .decision-card {
    flex-wrap: wrap;
  }

  .decision-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

/* Paperclip console visual system, adapted from Custos. */
:root {
  color-scheme: dark;
  --pc-bg: #080909;
  --pc-sidebar: #0b0c0c;
  --pc-surface: #101111;
  --pc-surface-2: #151616;
  --pc-surface-3: #1b1c1c;
  --pc-hover: #202222;
  --pc-border: #292b2b;
  --pc-border-strong: #383b3b;
  --pc-text: #f4f5f4;
  --pc-text-soft: #c2c5c3;
  --pc-muted: #7e8380;
  --pc-faint: #555a57;
  --pc-cyan: #1fc7d4;
  --pc-green: #19c989;
  --pc-blue: #4c8dff;
  --pc-violet: #9b7bff;
  --pc-amber: #f3b91f;
  --pc-orange: #ff7a2f;
  --pc-red: #ff4d5f;
  --pc-control: #171919;
  --pc-shadow: 0 18px 60px rgba(0, 0, 0, 0.34);
  --app-bg: var(--pc-bg);
  --app-surface: var(--pc-surface);
  --app-border: var(--pc-border);
  --app-ink: var(--pc-text);
  --app-muted: var(--pc-muted);
  --app-primary: var(--pc-cyan);
  --app-primary-strong: var(--pc-blue);
  --app-accent: var(--pc-surface-2);
  --app-sidebar: var(--pc-sidebar);
}

html {
  background: var(--pc-bg);
}

body.app-body {
  min-height: 100vh;
  background: var(--pc-bg);
  color: var(--pc-text);
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: 0;
}

body.console-body {
  overflow-x: clip;
}

body.console-body .console-main {
  width: 100%;
  min-height: 100vh;
  padding: 0;
  margin: 0;
  max-width: none;
}

a {
  color: var(--pc-text);
  text-decoration-color: var(--pc-border-strong);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--pc-cyan);
  text-decoration-color: currentColor;
}

code,
pre,
.json-block,
.token-code,
.token-code-large {
  border: 1px solid var(--pc-border);
  border-radius: 4px;
  background: var(--pc-surface-2);
  color: var(--pc-text-soft);
}

.workspace-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
  background: var(--pc-bg);
}

.workspace-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 100;
  width: 248px;
  min-height: 100vh;
  height: 100vh;
  background: var(--pc-sidebar);
  border-right: 1px solid var(--pc-border);
}

.workspace-sidebar-card,
.admin-sidebar-card {
  display: flex;
  min-height: 100vh;
  height: 100%;
  padding: 0;
  flex-direction: column;
  background: var(--pc-sidebar);
  color: var(--pc-text);
  border-right: 0;
}

.workspace-brand {
  display: flex;
  min-height: 56px;
  padding: 0 14px;
  align-items: center;
  color: var(--pc-text);
  text-decoration: none;
}

.workspace-brand img {
  display: block;
  width: 142px;
  max-height: 38px;
  object-fit: contain;
}

.workspace-sidebar-top {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  gap: 15px;
  overflow-y: auto;
  padding-bottom: 14px;
}

.workspace-profile {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  padding: 8px 12px 2px;
}

.workspace-avatar {
  display: inline-flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--pc-surface-3);
  color: var(--pc-text);
  font-size: var(--type-caption);
  font-weight: 800;
}

.workspace-user-name,
.workspace-user-email,
.workspace-client-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-user-name {
  color: var(--pc-text);
  font-size: var(--type-caption);
  font-weight: 700;
  line-height: 1.2;
}

.workspace-user-email,
.workspace-client-name {
  margin-top: 2px;
  color: var(--pc-muted);
  font-size: var(--type-micro);
  line-height: 1.2;
}

.workspace-nav-group {
  display: grid;
  gap: 4px;
  padding: 0 9px;
}

.workspace-section-label {
  display: flex;
  padding: 3px 10px 6px;
  color: var(--pc-faint);
  font-size: var(--type-micro);
  font-weight: 750;
  letter-spacing: 0;
  text-transform: uppercase;
}

.workspace-nav {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.workspace-nav-link {
  display: flex;
  min-height: 35px;
  padding: 7px 10px;
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: var(--pc-text-soft);
  font-size: 13px;
  font-weight: 560;
  text-decoration: none;
  transition: none;
}

.workspace-nav-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  color: var(--pc-text-faint);
  stroke-width: 1.9;
}

.workspace-nav-link span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-nav-lock {
  display: inline-flex;
  flex: 0 0 auto;
  margin-left: auto;
  color: var(--pc-text-faint);
}

.workspace-nav-lock .workspace-nav-icon {
  width: 13px;
  height: 13px;
}

.workspace-nav-link:hover {
  background: var(--pc-hover);
  color: var(--pc-text);
}

.workspace-nav-link:hover .workspace-nav-icon {
  color: var(--pc-text-soft);
}

.workspace-nav-link.active {
  border-color: var(--pc-border);
  background: var(--pc-surface-3);
  box-shadow: none;
  color: var(--pc-text);
}

.workspace-nav-link.active .workspace-nav-icon {
  color: var(--pc-cyan);
}

.workspace-nav-parent.active {
  border-color: transparent;
  background: transparent;
}

.workspace-nav-parent.active span {
  /* padding: 4px 8px;
  border: 1px solid var(--pc-border);
  border-radius: 5px;
  background: var(--pc-surface-3); */
  color: var(--pc-text);
}

.workspace-sidebar-bottom {
  margin-top: auto;
  padding: 10px 9px 12px;
  border-top: 1px solid var(--pc-border);
}

.workspace-account-actions {
  display: grid;
  gap: 3px;
  margin-top: 10px;
}

.workspace-account-actions form {
  margin: 0;
}

.workspace-action-link {
  width: 100%;
  border: 0;
  cursor: pointer;
  text-align: left;
}

.workspace-main,
.admin-workspace-main {
  min-width: 0;
  grid-column: 2;
  min-height: 100vh;
  padding: 0;
  background: var(--pc-bg);
}

.console-toolbar {
  position: sticky;
  top: 0;
  z-index: 70;
  display: flex;
  height: 48px;
  padding: 0 24px;
  align-items: center;
  gap: 12px;
  background: color-mix(in srgb, var(--pc-bg) 94%, transparent);
  border-bottom: 1px solid var(--pc-border);
  backdrop-filter: blur(14px);
}

.app-breadcrumb {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--pc-muted);
  font-size: var(--type-caption);
}

.app-breadcrumb b {
  color: var(--pc-faint);
  font-weight: 400;
}

.app-breadcrumb strong {
  color: var(--pc-text-soft);
  font-size: var(--type-caption);
  font-weight: 700;
  text-transform: uppercase;
}

.app-toolbar-spacer {
  flex: 1;
}

.toolbar-action-form {
  margin: 0;
}

.toolbar-action-link,
.toolbar-action-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  font-size: var(--type-small);
  font-weight: 760;
}

.toolbar-action-link .workspace-nav-icon,
.toolbar-action-button .workspace-nav-icon {
  width: 15px;
  height: 15px;
  margin: 0;
  color: currentColor;
}

.page-shell,
.narrow-shell {
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  padding: 28px 32px 72px;
  gap: 18px;
  color: var(--pc-text);
}

.page-header {
  display: flex;
  min-height: 44px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--pc-border);
}

.eyebrow,
.metric-label,
.review-stat-label,
.workspace-table thead th,
.module-policy-table th,
.request-summary-label,
.request-summary-meta-label,
.ai-settings-stat-label,
.insight-label,
.public-report-eyebrow {
  color: var(--pc-muted);
  font-size: var(--type-micro);
  font-weight: 750;
  letter-spacing: 0;
  text-transform: uppercase;
}

.page-title,
.workspace-title,
.public-report-title {
  margin: 0;
  color: var(--pc-text);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0;
}

.page-subtitle,
.panel-subtitle,
.metric-footnote,
.workspace-slug,
.text-muted,
.text-secondary,
.small,
.summary-key,
.decision-sub,
.report-empty-sub {
  color: var(--pc-muted) !important;
}

.panel-card,
.account-card,
.metric-card,
.stats-pill,
.insight-tile,
.finding-feed-item,
.api-key-card-details,
.module-usage-item,
.code-example-card,
.empty-state-panel,
.finding-card,
.behavioral-visual-card,
.finding-ai-highlight,
.request-summary-stat,
.request-summary-warning-panel,
.request-summary-meta-card,
.ai-settings-stat-card,
.ai-settings-connection-tile,
.ai-settings-empty-state,
.ai-settings-guidance,
.ai-settings-provider-card,
.ai-settings-builder-card,
.ai-settings-review-details,
.decision-card,
.public-report-pill,
.public-report-hero,
.report-run-hero,
.report-run-meta-item,
.report-run-step,
.policy-builder,
.api-key-policy-panel,
.api-key-policy-default-note,
.policy-note {
  border: 1px solid var(--pc-border);
  border-radius: 5px;
  background: var(--pc-surface);
  box-shadow: none;
  color: var(--pc-text-soft);
}

.panel-card {
  padding: 16px;
}

.panel-grid {
  display: grid;
  gap: 14px;
}

.panel-grid-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.panel-grid-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.action-card {
  display: block;
  min-height: 148px;
  transition: background-color 120ms ease, border-color 120ms ease;
}

.action-card:hover {
  border-color: var(--pc-border-strong);
  background: var(--pc-surface-2);
}

.client-admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
  padding: 8px;
  border: 1px solid var(--pc-border);
  border-radius: 5px;
  background: var(--pc-surface);
}

.client-admin-tab {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid transparent;
  border-radius: 5px;
  color: var(--pc-muted);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.client-admin-tab:hover {
  border-color: var(--pc-border);
  background: var(--pc-surface-2);
  color: var(--pc-text);
}

.client-admin-tab.active {
  border-color: var(--pc-border-strong);
  background: var(--pc-surface-2);
  color: var(--pc-text);
}

.console-body .bg-light,
.console-body .bg-light-subtle,
.console-body .border.rounded-3.bg-light-subtle,
.console-body .border.rounded-3,
.console-body .form-control.bg-light {
  border-color: var(--pc-border) !important;
  background: var(--pc-surface-2) !important;
  color: var(--pc-text-soft) !important;
}

.console-body .text-bg-light {
  border-color: var(--pc-border) !important;
  background: var(--pc-surface-3) !important;
  color: var(--pc-text-soft) !important;
}

.ai-settings-dialog .border.rounded-3 {
  border-color: var(--pc-border) !important;
  background: var(--pc-surface-2) !important;
  color: var(--pc-text-soft) !important;
}

.module-signal-card {
  border-color: var(--pc-border);
  border-radius: 5px;
  background: var(--pc-surface-2);
  color: var(--pc-text-soft);
}

.module-signal-card .form-label,
.module-signal-card label {
  color: var(--pc-text-soft);
}

.module-score-hint {
  color: var(--pc-muted);
}

.module-score-hint strong {
  color: var(--pc-text-soft);
}

.policy-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.console-body .policy-builder:not(.card) {
  padding: 14px;
}

.rule-manager-panel {
  display: grid;
  gap: 16px;
}

.rule-manager-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--pc-border);
}

.rule-manager-count {
  display: grid;
  min-width: 108px;
  min-height: 78px;
  place-items: center;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--pc-cyan) 26%, var(--pc-border));
  border-radius: 7px;
  background:
    radial-gradient(circle at 100% 0, color-mix(in srgb, var(--pc-cyan) 12%, transparent), transparent 42%),
    var(--pc-surface-2);
}

.rule-manager-count strong,
.rule-manager-count span {
  display: block;
  line-height: 1;
}

.rule-manager-count strong {
  color: var(--pc-text);
  font-size: 30px;
  font-weight: 880;
}

.rule-manager-count span {
  margin-top: 6px;
  color: var(--pc-muted);
  font-size: var(--type-tiny);
  font-weight: 820;
  text-transform: uppercase;
}

.rule-command-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.rule-command-input {
  min-width: 0;
}

.rule-command-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 12px;
  align-items: end;
}

.rule-command-grid-wide {
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
}

.rule-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.rule-card {
  display: flex;
  min-width: 0;
  min-height: 94px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--pc-border);
  border-left: 2px solid color-mix(in srgb, var(--pc-cyan) 42%, var(--pc-border));
  border-radius: 7px;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--pc-cyan) 4%, transparent), transparent 40%),
    rgba(255, 255, 255, 0.018);
}

.rule-card-location {
  border-left-color: color-mix(in srgb, var(--pc-green) 34%, var(--pc-border));
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--pc-green) 3.5%, transparent), transparent 40%),
    rgba(255, 255, 255, 0.018);
}

.rule-card-bypass {
  border-left-color: color-mix(in srgb, var(--pc-violet) 34%, var(--pc-border));
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--pc-violet) 4%, transparent), transparent 40%),
    rgba(255, 255, 255, 0.018);
}

.rule-card div {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.rule-card span {
  color: var(--pc-muted);
  font-size: var(--type-tiny);
  font-weight: 820;
  text-transform: uppercase;
}

.rule-card strong {
  color: var(--pc-text);
  font-size: 15px;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.rule-card em {
  color: var(--pc-text-muted);
  font-size: var(--type-small);
  font-style: normal;
  overflow-wrap: anywhere;
}

.rule-remove-button {
  flex: 0 0 auto;
  min-height: 28px;
  padding: 5px 8px;
  border: 1px solid var(--pc-border);
  border-radius: 5px;
  background: var(--pc-control);
  color: var(--pc-text-soft);
  font-size: var(--type-caption);
  font-weight: 760;
}

.rule-remove-button:hover {
  border-color: color-mix(in srgb, var(--pc-red) 40%, var(--pc-border));
  color: var(--pc-text);
}

.rule-empty-state {
  padding: 18px;
  border: 1px dashed var(--pc-border);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.016);
  color: var(--pc-muted);
  font-size: 13px;
}

.rule-empty-state[hidden] {
  display: none;
}

.rule-raw-editor {
  background: rgba(255, 255, 255, 0.016);
}

.rule-raw-editor textarea {
  min-height: 240px;
  border: 0;
  border-radius: 0;
  background: #070808;
}

.integration-page {
  display: grid;
  gap: 18px;
}

.integration-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 18px;
  align-items: center;
}

.integration-key-form {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--pc-border);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.022);
}

.integration-token-note {
  color: var(--pc-text-muted);
  font-size: var(--type-small);
  line-height: 1.4;
}

.integration-fact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.integration-fact-card,
.integration-lookup-grid > div {
  padding: 15px;
  border: 1px solid var(--pc-border);
  border-radius: 7px;
  background:
    radial-gradient(circle at 100% 0, rgba(76, 141, 255, 0.055), transparent 40%),
    var(--pc-surface);
}

.integration-fact-card span,
.integration-lookup-grid span {
  display: block;
  color: var(--pc-muted);
  font-size: var(--type-tiny);
  font-weight: 820;
  text-transform: uppercase;
}

.integration-fact-card strong,
.integration-lookup-grid strong {
  display: block;
  margin-top: 8px;
  color: var(--pc-text);
  font-size: 15px;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.integration-fact-card p {
  margin: 10px 0 0;
  color: var(--pc-text-muted);
  font-size: 13px;
  line-height: 1.45;
}

.integration-code-panel {
  display: grid;
  gap: 16px;
}

.integration-tab-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.integration-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 62px;
  padding: 10px;
  border: 1px solid var(--pc-border);
  border-radius: 7px;
  background: var(--pc-control);
  color: var(--pc-text-soft);
  text-align: left;
}

.integration-tab:hover,
.integration-tab.active {
  border-color: color-mix(in srgb, var(--pc-cyan) 42%, var(--pc-border));
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--pc-cyan) 8%, transparent), transparent 44%),
    var(--pc-surface-2);
  color: var(--pc-text);
}

.integration-tab span:last-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.integration-tab strong,
.integration-tab em {
  display: block;
  min-width: 0;
}

.integration-tab strong {
  color: inherit;
  font-size: 13px;
  font-weight: 850;
}

.integration-tab em {
  color: var(--pc-muted);
  font-size: var(--type-caption);
  font-style: normal;
}

.integration-logo {
  display: inline-grid;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--pc-border);
  border-radius: 7px;
  background: var(--pc-surface);
  color: var(--pc-text-soft);
}

.integration-logo svg {
  width: 22px;
  height: 22px;
}

.integration-logo-javascript {
  color: #f3d33b;
}

.integration-logo-python {
  color: #6eb4ff;
}

.integration-logo-ruby {
  color: #ff6671;
}

.integration-logo-php {
  color: #9b8cff;
}

.integration-logo-terminal {
  color: var(--pc-green);
}

.integration-code-stage {
  min-width: 0;
}

.integration-code-card {
  border: 1px solid var(--pc-border);
  border-radius: 7px;
  background: var(--pc-surface);
  overflow: hidden;
}

.integration-code-card[hidden] {
  display: none;
}

.integration-code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--pc-border);
  background: rgba(255, 255, 255, 0.022);
}

.integration-code-title {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
}

.integration-code-head h4,
.integration-code-head p {
  margin: 0;
}

.integration-code-head h4 {
  color: var(--pc-text);
  font-size: 16px;
  font-weight: 850;
}

.integration-code-head p {
  color: var(--pc-muted);
  font-size: var(--type-small);
}

.integration-code-card .json-block {
  max-height: 520px;
  margin: 0;
  border: 0;
  border-radius: 0;
}

.integration-copy-button {
  min-width: 76px;
  border-color: var(--pc-border);
  color: var(--pc-text-soft);
  background: var(--pc-control);
  position: absolute;
  right: 0;
}

.integration-copy-button:hover,
.integration-copy-button.copied {
  border-color: color-mix(in srgb, var(--pc-green) 48%, var(--pc-border));
  color: var(--pc-text);
  background: color-mix(in srgb, var(--pc-green) 16%, var(--pc-control));
}

.integration-lookup-grid {
  display: grid;
  grid-template-columns: 0.5fr 1.5fr 1fr;
  gap: 10px;
}

.keys-page {
  display: grid;
  gap: 18px;
}

.keys-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.34fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.key-create-panel {
  position: sticky;
  top: 18px;
}

.origin-manager-panel {
  padding: 14px;
  border: 1px solid var(--pc-border);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.018);
}

.empty-panel {
  padding: 22px;
  border: 1px dashed var(--pc-border);
  border-radius: 7px;
  color: var(--pc-muted);
  text-align: center;
  background: rgba(255, 255, 255, 0.018);
}

.workspace-nav-details {
  display: grid;
  gap: 6px;
}

.workspace-nav-details > summary {
  list-style: none;
  cursor: pointer;
}

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

.workspace-nav-details > summary::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-left: auto;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.68;
}

.workspace-nav-details[open] > summary::after {
  transform: rotate(225deg);
}

.workspace-subnav {
  display: grid;
  gap: 5px;
  padding-left: 14px;
  border-left: 1px solid var(--pc-border);
  margin-left: 14px;
}

.workspace-subnav .workspace-nav-link {
  min-height: 36px;
  padding: 8px 10px;
  font-size: var(--type-small);
}

.workspace-subnav .workspace-nav-icon {
  width: 16px;
  height: 16px;
}

.policy-summary-card,
.policy-preset-bar,
.policy-module-group,
.policy-module-card,
.policy-empty-advanced {
  border: 1px solid var(--pc-border);
  border-radius: 5px;
  background: var(--pc-surface);
  color: var(--pc-text-soft);
}

.policy-summary-card {
  padding: 12px 14px;
}

.policy-summary-card span {
  display: block;
  margin-bottom: 4px;
  color: var(--pc-muted);
  font-size: var(--type-caption);
  font-weight: 700;
  text-transform: uppercase;
}

.policy-summary-card strong {
  color: var(--pc-text);
  font-size: 24px;
  line-height: 1;
}

.policy-preset-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  background: var(--pc-surface-2);
}

.policy-preset-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.policy-order-panel {
  padding: 14px;
  background: var(--pc-surface-2);
}

.policy-order-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.policy-order-warning {
  margin-bottom: 10px;
  padding: 8px 10px;
  border-left: 2px solid var(--pc-red);
  background: rgba(255, 121, 133, 0.08);
  font-size: var(--type-micro);
}

.policy-order-list {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.policy-order-item {
  display: grid;
  grid-template-columns: 28px 44px 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border: 1px solid var(--pc-border);
  background: var(--pc-surface);
}

.policy-order-item[hidden] {
  display: none;
}

.policy-order-position {
  font-variant-numeric: tabular-nums;
  text-align: right;
  color: #8a8a8a;
  font-size: var(--type-micro);
}

.policy-order-code {
  color: #8a8a8a;
  font-size: var(--type-micro);
}

.policy-order-cost {
  padding: 1px 7px;
  border: 1px solid var(--pc-border);
  font-size: var(--type-minimum);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.policy-order-cost-local {
  color: #46dd91;
}

.policy-order-cost-redis {
  color: #6cc7e8;
}

.policy-order-cost-db {
  color: #d7b45a;
}

/* The expensive tier — the one that starves everything behind it. */
.policy-order-cost-vendor {
  color: #ff7985;
}

.policy-order-controls {
  display: flex;
  gap: 4px;
}

.latency-glossary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.latency-glossary-item strong {
  display: block;
  margin-bottom: 4px;
  font-size: var(--type-minimum);
}

.latency-glossary-item p {
  margin: 0;
  color: #9a9a9a;
  font-size: var(--type-micro);
  line-height: 1.45;
}

@media (max-width: 900px) {
  .latency-glossary {
    grid-template-columns: 1fr;
  }
}

.policy-module-groups {
  display: grid;
  gap: 12px;
}

.policy-module-group {
  overflow: hidden;
}

.policy-module-group > summary,
.policy-module-card > summary {
  display: grid;
  list-style: none;
  cursor: pointer;
}

.policy-module-group > summary::-webkit-details-marker,
.policy-module-card > summary::-webkit-details-marker {
  display: none;
}

.policy-module-group > summary {
  padding: 14px 16px;
  background: var(--pc-surface-2);
}

.policy-module-group > summary span {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.policy-module-group > summary strong {
  color: var(--pc-text);
}

.policy-module-group > summary small {
  color: var(--pc-muted);
}

.policy-module-stack {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.policy-module-card {
  overflow: hidden;
  background: var(--pc-sidebar);
}

.policy-module-card > summary {
  grid-template-columns: minmax(280px, 1fr) minmax(150px, 190px) auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
}

.policy-module-main {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  min-width: 0;
}

.policy-module-code {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--pc-border);
  border-radius: 5px;
  background: var(--pc-surface-3);
  color: var(--pc-muted);
  font-size: var(--type-small);
  font-weight: 700;
}

.policy-module-title {
  color: var(--pc-text);
  font-weight: 700;
}

.policy-module-description {
  margin-top: 3px;
  color: var(--pc-muted);
  font-size: 13px;
  line-height: 1.35;
}

.policy-module-score {
  display: grid;
  gap: 5px;
}

.policy-module-score span,
.policy-module-score small {
  color: var(--pc-muted);
  font-size: var(--type-small);
}

.policy-module-score strong {
  color: var(--pc-text-soft);
}

.policy-module-toggles {
  display: grid;
  grid-template-columns: repeat(3, minmax(78px, 1fr));
  gap: 8px;
}

.policy-toggle {
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 8px;
  border: 1px solid var(--pc-border);
  border-radius: 5px;
  background: var(--pc-surface);
  color: var(--pc-muted);
  font-size: var(--type-small);
  font-weight: 700;
  cursor: pointer;
}

.policy-toggle input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--pc-cyan);
}

.policy-toggle:has(input:checked) {
  border-color: color-mix(in srgb, var(--pc-cyan) 48%, var(--pc-border));
  background: color-mix(in srgb, var(--pc-cyan) 10%, var(--pc-surface));
  color: var(--pc-text);
}

.policy-module-advanced {
  padding: 14px;
  border-top: 1px solid var(--pc-border);
  background: var(--pc-surface);
}

.policy-module-advanced-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.policy-empty-advanced {
  padding: 12px;
  color: var(--pc-muted);
}

.panel-title,
.metric-value,
.stats-pill-value,
.finding-fact-value,
.summary-value,
.request-summary-value,
.request-summary-meta-value,
.ai-settings-stat-value,
.finding-ai-highlight-value,
.decision-title,
.report-empty-title,
.workspace-table td strong,
.card-title,
h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--pc-text);
}

.metric-card,
.stats-pill,
.ai-settings-stat-card {
  padding: 14px 16px;
}

.metric-value,
.stats-pill-value,
.review-stat-value {
  display: block;
  color: var(--pc-text);
  font-size: 24px;
  font-weight: 680;
  line-height: 1.1;
}

.stats-grid,
.stats-grid-compact,
.request-summary-grid,
.request-summary-meta-grid,
.report-run-meta-grid,
.ai-settings-connection-grid,
.finding-ai-highlights,
.behavioral-visual-grid,
.request-findings-grid {
  gap: 10px;
}

.btn,
.btn-primary,
.btn-outline-primary,
.btn-outline-dark,
.btn-outline-secondary,
.btn-outline-danger,
.btn-outline-success,
.btn-success,
.btn-danger,
.btn-warning,
input[type="submit"],
button[type="submit"] {
  display: inline-flex;
  min-height: 34px;
  padding: 7px 13px;
  align-items: center;
  justify-content: center;
  border-radius: 5px !important;
  box-shadow: none !important;
  cursor: pointer;
  font-size: var(--type-small);
  font-weight: 720;
  line-height: 1.2;
  text-decoration: none;
}

.btn-primary,
input[type="submit"],
button[type="submit"] {
  border: 1px solid var(--pc-text) !important;
  background: var(--pc-text) !important;
  color: var(--pc-bg) !important;
}

.btn-outline-primary,
.btn-outline-dark,
.btn-outline-secondary,
.btn-outline-danger,
.btn-outline-success,
.btn-success,
.btn-danger,
.btn-warning,
.btn:not(.btn-primary) {
  border: 1px solid var(--pc-border-strong) !important;
  background: var(--pc-control) !important;
  color: var(--pc-text-soft) !important;
}

.btn:hover {
  filter: none;
  border-color: var(--pc-border-strong) !important;
  background: var(--pc-hover) !important;
  color: var(--pc-text) !important;
}

.form-control,
.form-select,
textarea,
input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
select {
  min-height: 26px;
  border: 1px solid var(--pc-border-strong);
  border-radius: 5px;
  outline: none;
  background-color: var(--pc-control);
  color: var(--pc-text);
  font: inherit;
}

.form-control:focus,
.form-select:focus,
textarea:focus,
input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]):focus,
select:focus {
  border-color: var(--pc-cyan);
  background-color: var(--pc-control);
  color: var(--pc-text);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--pc-cyan) 15%, transparent);
}

.form-label,
label,
legend {
  color: var(--pc-text-soft);
  font-size: var(--type-small);
  font-weight: 620;
}

input::placeholder,
textarea::placeholder {
  color: var(--pc-faint) !important;
}

input[type="checkbox"],
input[type="radio"],
.form-check-input {
  accent-color: var(--pc-cyan);
}

.form-check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 30px;
}

.form-check-inline {
  display: inline-flex;
  margin-right: 22px;
}

.form-switch {
  padding-left: 0;
}

.form-check .form-check-input,
.form-switch .form-check-input {
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 auto;
  width: 48px;
  height: 26px;
  min-height: 26px;
  margin: 0;
  border: 1px solid var(--pc-border-strong);
  border-radius: 999px;
  background-color: var(--pc-surface-3);
  background-image: radial-gradient(circle, #ffffff 0 42%, transparent 44%);
  background-position: 4px center;
  background-repeat: no-repeat;
  background-size: 18px 18px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  cursor: pointer;
  transition: background-color 140ms ease, background-position 140ms ease, border-color 140ms ease;
}

.form-check .form-check-input:checked,
.form-switch .form-check-input:checked {
  border-color: var(--pc-blue);
  background-color: var(--pc-blue);
  background-position: 24px center;
}

.form-check .form-check-input:focus,
.form-switch .form-check-input:focus {
  border-color: var(--pc-cyan);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--pc-cyan) 18%, transparent);
}

.form-check .form-check-input:disabled,
.form-switch .form-check-input:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.form-check .form-check-label {
  margin: 0;
}

.table,
.workspace-table,
.module-policy-table {
  --bs-table-bg: var(--pc-surface);
  --bs-table-color: var(--pc-text-soft);
  --bs-table-border-color: var(--pc-border);
  --bs-table-hover-bg: var(--pc-surface-2);
  --bs-table-hover-color: var(--pc-text);
  margin: 0;
  border-color: var(--pc-border);
  color: var(--pc-text-soft);
}

.table-responsive,
.card {
  border-color: var(--pc-border) !important;
  background: var(--pc-surface) !important;
  color: var(--pc-text-soft);
}

.workspace-table td,
.workspace-table th,
.table td,
.table th,
.module-policy-table td,
.module-policy-table th {
  padding: 10px 12px;
  border-color: var(--pc-border);
  background: transparent;
  color: var(--pc-text-soft);
  font-size: var(--type-small);
  vertical-align: middle;
}

.card-header,
.card-footer {
  border-color: var(--pc-border) !important;
  background: var(--pc-surface-2) !important;
  color: var(--pc-text);
}

.badge,
.count-pill,
.table-warning-chip,
.ai-settings-chip,
.nav-user-chip,
.status-badge {
  display: inline-flex;
  min-height: 20px;
  padding: 2px 7px;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--pc-border);
  border-radius: 999px;
  background: var(--pc-surface-2);
  color: var(--pc-text-soft);
  font-size: var(--type-micro);
  font-weight: 720;
  letter-spacing: 0;
  white-space: nowrap;
}

.bg-success,
.text-success,
.badge.bg-success,
.quality-value,
.metric-card-clear .metric-value,
.conn-ok {
  color: var(--pc-green) !important;
}

.bg-danger,
.text-danger,
.badge.bg-danger {
  color: var(--pc-red) !important;
}

.bg-warning,
.text-warning,
.badge.bg-warning {
  color: var(--pc-amber) !important;
}

.progress,
.progress-thin,
.report-run-progress-bar,
.confidence-track,
.funnel-track,
.scorecard-bar {
  background: var(--pc-surface-3);
  border-radius: 999px;
}

.progress-bar,
.report-run-progress-fill,
.funnel-fill,
.scorecard-seg,
.confidence-fill {
  background: var(--pc-cyan);
}

.report-run-pulse,
.handled-strip-icon,
.report-empty-check {
  background: var(--pc-green);
  color: var(--pc-bg);
}

.alert,
.workspace-alert,
.token-alert {
  margin-bottom: 14px;
  border: 1px solid var(--pc-border) !important;
  border-radius: 5px !important;
  background: var(--pc-surface) !important;
  color: var(--pc-text-soft) !important;
  box-shadow: none !important;
}

.alert-success {
  box-shadow: inset 3px 0 var(--pc-green) !important;
}

.alert-danger {
  box-shadow: inset 3px 0 var(--pc-red) !important;
}

.alert-warning {
  box-shadow: inset 3px 0 var(--pc-amber) !important;
}

.pagy.nav {
  gap: 5px;
}

.pagy.nav a {
  min-width: 30px;
  height: 30px;
  padding: 5px 10px;
  border: 1px solid var(--pc-border-strong);
  border-radius: 5px;
  background: var(--pc-control);
  box-shadow: none;
  color: var(--pc-text-soft);
  font-size: var(--type-caption);
}

.pagy.nav a.current,
.pagy.nav a:hover {
  border-color: var(--pc-border-strong);
  background: var(--pc-hover);
  color: var(--pc-text);
}

.modal-content,
dialog,
.ai-settings-dialog {
  border: 1px solid var(--pc-border-strong);
  border-radius: 7px;
  background: var(--pc-surface);
  box-shadow: var(--pc-shadow);
  color: var(--pc-text);
}

.modal-header,
.modal-footer,
.ai-settings-dialog-header {
  border-color: var(--pc-border);
  background: var(--pc-surface);
}

.ai-settings-dialog-body,
.ai-settings-review-body {
  background: var(--pc-surface);
}

.list-group-item,
.dropdown-menu {
  border-color: var(--pc-border);
  background: var(--pc-surface);
  color: var(--pc-text-soft);
}

.raw-details summary,
.decision-preview summary,
.tiny-link,
.auth-link,
.auth-link-inline {
  color: var(--pc-cyan);
}

.token-panel,
.handled-strip,
.report-empty-state {
  border: 1px solid var(--pc-border);
  border-radius: 5px;
  background: var(--pc-surface);
  color: var(--pc-text-soft);
  box-shadow: none;
}

.auth-body {
  background: var(--pc-bg);
}

.auth-shell {
  min-height: calc(100vh - 2rem);
}

.auth-card {
  max-width: 440px;
  border: 1px solid var(--pc-border);
  border-radius: 7px;
  background: var(--pc-surface);
  box-shadow: var(--pc-shadow);
}

.auth-heading {
  color: var(--pc-text);
  font-size: 22px;
}

.auth-subheading,
.auth-footer-copy,
.auth-hint {
  color: var(--pc-muted);
}

.auth-input {
  min-height: 38px;
  border-radius: 5px;
  border-color: var(--pc-border-strong);
  background: var(--pc-control);
  color: var(--pc-text);
}

.auth-submit {
  min-height: 38px;
  border: 1px solid var(--pc-text);
  border-radius: 5px;
  background: var(--pc-text);
  box-shadow: none;
  color: var(--pc-bg);
}

.public-report-body {
  background: var(--pc-bg);
  color: var(--pc-text);
}

.public-report-main {
  max-width: 1500px;
}

.public-report-shell {
  gap: 18px;
}

.public-report-summary,
.report-legend,
.decision-list,
.concern-group-list,
.scorecard-list,
.funnel-list,
.finding-feed,
.module-usage-list,
.api-key-stack,
.code-example-stack {
  gap: 10px;
}

@media (max-width: 991.98px) {
  .workspace-shell {
    grid-template-columns: 1fr;
  }

  .workspace-sidebar {
    position: static;
    width: 100%;
    min-height: auto;
    height: auto;
  }

  .workspace-sidebar-card,
  .admin-sidebar-card {
    min-height: auto;
    height: auto;
    border-bottom: 1px solid var(--pc-border);
  }

  .workspace-sidebar-top {
    overflow: visible;
  }

  .workspace-main,
  .admin-workspace-main {
    grid-column: 1;
  }

  .page-shell,
  .narrow-shell {
    padding: 22px 20px 64px;
  }

  .panel-grid-two,
  .panel-grid-three {
    grid-template-columns: 1fr;
  }

  .policy-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .policy-preset-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .policy-preset-actions {
    justify-content: flex-start;
  }

  .policy-order-head {
    align-items: stretch;
    flex-direction: column;
  }

  .policy-order-item {
    grid-template-columns: 28px 1fr auto;
    row-gap: 4px;
  }

  .policy-order-code {
    display: none;
  }

  .policy-module-card > summary {
    grid-template-columns: 1fr;
  }

  .policy-module-toggles {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .rule-manager-hero,
  .rule-command-bar {
    align-items: stretch;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .rule-command-grid,
  .rule-command-grid-wide,
  .rule-card-grid {
    grid-template-columns: 1fr;
  }

  .integration-hero,
  .integration-fact-grid,
  .integration-tab-list,
  .integration-lookup-grid,
  .keys-layout {
    grid-template-columns: 1fr;
  }

  .key-create-panel {
    position: static;
  }

  .connections-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .connections-stats,
  .connections-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .connections-stat:nth-child(2n) {
    border-right: 0;
  }

  .signature-tab-list {
    grid-template-columns: 1fr;
  }

  .signature-tab {
    border-right: 0;
    border-bottom: 1px solid var(--pc-border);
  }

  .signature-tab:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 575.98px) {
  .console-toolbar {
    padding: 0 12px;
  }

  .app-breadcrumb span,
  .app-breadcrumb b {
    display: none;
  }

  .page-shell,
  .narrow-shell {
    padding: 18px 14px 60px;
  }

  .page-title,
  .workspace-title,
  .public-report-title {
    font-size: 23px;
  }

  .request-summary-grid,
  .request-summary-meta-grid,
  .report-run-meta-grid,
  .finding-ai-highlights {
    grid-template-columns: 1fr;
  }

  .policy-summary-grid,
  .policy-module-toggles {
    grid-template-columns: 1fr;
  }

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

  .connections-stat {
    border-right: 0;
    border-bottom: 1px solid var(--pc-border);
  }

  .connections-stat:last-child {
    border-bottom: 0;
  }

  .connection-card {
    min-height: auto;
  }

  .client-activity-heading {
    display: none;
  }

  .client-activity-card {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .client-activity-time {
    grid-column: 1 / -1;
    justify-self: start;
    color: var(--pc-muted);
  }
}

.console-body .client-admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
  padding: 8px;
  border: 1px solid var(--pc-border);
  border-radius: 7px;
  background: var(--pc-surface);
}

.console-body a.client-admin-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid var(--pc-border);
  border-radius: 6px;
  background: var(--pc-control);
  color: var(--pc-text-soft);
  font-size: var(--type-small);
  font-weight: 760;
  line-height: 1;
  text-decoration: none;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

.console-body a.client-admin-tab:hover {
  border-color: var(--pc-border-strong);
  background: var(--pc-hover);
  color: var(--pc-text);
}

.console-body a.client-admin-tab.active {
  border-color: var(--pc-cyan);
  background: color-mix(in srgb, var(--pc-cyan) 14%, var(--pc-surface-2));
  color: var(--pc-text);
  box-shadow: inset 0 -2px var(--pc-cyan);
}

.console-body .ai-settings-connection-tile,
.console-body .ai-settings-empty-state,
.console-body .ai-settings-guidance,
.console-body .ai-settings-provider-card,
.console-body .ai-settings-builder-card,
.console-body .ai-settings-review-details,
.ai-settings-dialog .ai-settings-builder-card,
.ai-settings-dialog .ai-settings-review-details {
  border-color: var(--pc-border) !important;
  background: var(--pc-surface) !important;
  border-radius: 5px !important;
  color: var(--pc-text-soft) !important;
}

.console-body .ai-settings-review-body,
.ai-settings-dialog .ai-settings-review-body {
  border-color: var(--pc-border) !important;
  background: var(--pc-surface-2) !important;
}

.console-body .ai-settings-module-option,
.ai-settings-dialog .ai-settings-module-option,
.console-body .ai-settings-advanced-panel,
.ai-settings-dialog .ai-settings-advanced-panel {
  border-color: var(--pc-border) !important;
  background: var(--pc-surface-2) !important;
  border-radius: 5px !important;
  color: var(--pc-text-soft) !important;
}

.console-body .ai-settings-module-option:hover,
.ai-settings-dialog .ai-settings-module-option:hover {
  border-color: var(--pc-border-strong) !important;
  background: var(--pc-hover) !important;
}

.console-body .ai-settings-module-option:has(input:checked),
.ai-settings-dialog .ai-settings-module-option:has(input:checked) {
  border-color: var(--pc-blue) !important;
  background: color-mix(in srgb, var(--pc-blue) 12%, var(--pc-surface-2)) !important;
}

.console-body .ai-settings-chip,
.ai-settings-dialog .ai-settings-chip {
  border-color: var(--pc-border) !important;
  background: var(--pc-surface-3) !important;
  color: var(--pc-text-soft) !important;
}

.console-body .overview-range-shell {
  border: 1px solid var(--pc-border);
  border-radius: 6px;
  background: var(--pc-surface);
  padding: 16px;
}

.console-body .overview-range-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 14px;
  align-items: center;
}

.console-body .overview-range-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.console-body .overview-range-copy strong {
  color: var(--pc-text);
  font-size: 18px;
  line-height: 1.2;
}

.console-body .overview-range-control {
  position: relative;
}

.console-body .overview-range-input-wrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--pc-border-strong);
  border-radius: 6px;
  background: var(--pc-control);
  color: var(--pc-text);
}

.console-body .overview-range-input-wrap:focus-within,
.console-body .overview-range-input-wrap:hover {
  border-color: var(--pc-blue);
  background: color-mix(in srgb, var(--pc-blue) 12%, var(--pc-control));
}

.console-body .overview-range-input {
  min-width: 190px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--pc-text);
  font-size: 13px;
  font-weight: 760;
  line-height: 1.2;
  cursor: pointer;
}

.console-body .overview-range-icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
  color: var(--pc-cyan);
}

.console-body .overview-range-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.account-dashboard-page {
  display: grid;
  gap: 18px;
}

.account-dashboard-header {
  align-items: flex-end;
}

.account-range-shell {
  margin-bottom: 0 !important;
}

.account-value-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.account-value-card {
  display: grid;
  align-content: start;
  min-height: 154px;
  padding: 16px;
  border: 1px solid var(--pc-border);
  border-radius: 7px;
  background:
    radial-gradient(circle at 100% 0, rgba(76, 141, 255, 0.07), transparent 34%),
    linear-gradient(180deg, var(--pc-surface-2), var(--pc-surface));
  color: var(--pc-text-soft);
}

.account-value-card-primary {
  border-color: color-mix(in srgb, var(--pc-cyan) 34%, var(--pc-border));
  background:
    radial-gradient(circle at 100% 0, color-mix(in srgb, var(--pc-cyan) 14%, transparent), transparent 34%),
    linear-gradient(180deg, color-mix(in srgb, var(--pc-cyan) 7%, var(--pc-surface-2)), var(--pc-surface));
}

.account-value-card span {
  color: var(--pc-muted);
  font-size: var(--type-tiny);
  font-weight: 400;
  text-transform: uppercase;
}

.account-value-card strong {
  display: block;
  margin-top: 10px;
  color: var(--pc-text);
  font-size: clamp(26px, 2.6vw, 38px);
  font-weight: 400;
  line-height: 1;
}

.account-value-card p {
  margin: 12px 0 0;
  color: var(--pc-text-muted);
  font-size: 13px;
  line-height: 1.45;
}

.account-impact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  gap: 12px;
  align-items: stretch;
}

.account-impact-panel {
  display: grid;
  align-content: start;
  gap: 16px;
}

.account-risk-stack {
  display: grid;
  gap: 10px;
}

.account-risk-row {
  padding: 13px;
  border: 1px solid var(--pc-border);
  border-left: 2px solid color-mix(in srgb, currentColor 42%, var(--pc-border));
  border-radius: 7px;
  background:
    linear-gradient(90deg, color-mix(in srgb, currentColor 3.5%, transparent), transparent 38%),
    rgba(255, 255, 255, 0.018);
}

.account-dashboard-page .account-risk-row.risk-tone-low,
.account-dashboard-page .account-risk-row.risk-tone-medium,
.account-dashboard-page .account-risk-row.risk-tone-high {
  border-color: var(--pc-border);
  border-left-color: color-mix(in srgb, currentColor 34%, var(--pc-border));
  background:
    linear-gradient(90deg, color-mix(in srgb, currentColor 3.5%, transparent), transparent 38%),
    rgba(255, 255, 255, 0.018);
}

.account-dashboard-page .account-risk-row.risk-tone-low {
  color: color-mix(in srgb, #37d984 68%, var(--pc-text-soft));
}

.account-dashboard-page .account-risk-row.risk-tone-medium {
  color: color-mix(in srgb, #e9bd3f 62%, var(--pc-text-soft));
}

.account-dashboard-page .account-risk-row.risk-tone-high {
  color: color-mix(in srgb, #ff6671 62%, var(--pc-text-soft));
}

.account-risk-row-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.account-risk-row-head span {
  color: var(--pc-text);
  font-size: 13px;
  font-weight: 400;
}

.account-risk-row-head strong {
  color: var(--pc-text);
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
}

.account-risk-track {
  height: 6px;
  margin-top: 11px;
  border-radius: 999px;
  background: var(--pc-surface-3);
  overflow: hidden;
}

.account-risk-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: currentColor;
  opacity: 0.42;
}

.account-risk-foot {
  margin-top: 8px;
  color: var(--pc-text-muted);
  font-size: var(--type-small);
}

.account-value-list {
  display: grid;
  gap: 10px;
}

.account-value-list div {
  padding: 13px;
  border: 1px solid var(--pc-border);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.022);
}

.account-value-list strong,
.account-value-list span {
  display: block;
}

.account-value-list strong {
  color: var(--pc-text);
  font-size: 13px;
  font-weight: 850;
}

.account-value-list span {
  margin-top: 5px;
  color: var(--pc-text-muted);
  font-size: 13px;
  line-height: 1.42;
}

.account-policy-grid .account-value-card {
  min-height: 128px;
}

.compact-filter-panel {
  padding: 0;
  overflow: hidden;
}

.compact-filter-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  padding: 13px 16px;
  cursor: pointer;
  list-style: none;
}

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

.compact-filter-summary::after {
  content: "+";
  display: inline-grid;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid var(--pc-border);
  border-radius: 50%;
  color: var(--pc-text-muted);
  font-size: 16px;
  line-height: 1;
}

.compact-filter-panel[open] .compact-filter-summary {
  border-bottom: 1px solid var(--pc-border);
}

.compact-filter-panel[open] .compact-filter-summary::after {
  content: "-";
  color: var(--pc-blue);
}

.compact-filter-summary span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.compact-filter-summary strong {
  color: var(--pc-text);
  font-size: 14px;
  font-weight: 850;
}

.compact-filter-summary small {
  color: var(--pc-muted);
  font-size: var(--type-small);
}

.compact-filter-summary em {
  margin-left: auto;
  color: var(--pc-text-soft);
  font-size: var(--type-caption);
  font-style: normal;
  font-weight: 820;
  text-transform: uppercase;
  white-space: nowrap;
}

.compact-filter-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  padding: 14px 16px 16px;
}

.compact-filter-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  grid-column: 1 / -1;
}

@media (max-width: 991.98px) {
  .console-body .overview-range-form {
    grid-template-columns: 1fr;
  }

  .console-body .overview-range-control,
  .console-body .overview-range-input-wrap {
    width: 100%;
  }

  .console-body .overview-range-input {
    width: 100%;
  }

  .account-value-grid,
  .account-impact-layout {
    grid-template-columns: 1fr;
  }

  .compact-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575.98px) {
  .compact-filter-grid {
    grid-template-columns: 1fr;
  }

  .compact-filter-actions {
    justify-content: stretch;
  }

  .compact-filter-actions .btn {
    flex: 1 1 0;
  }
}

.admin-module-health-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-height: 620px;
  overflow: auto;
  padding-right: 4px;
}

.admin-module-health-card {
  display: grid;
  gap: 14px;
  min-height: 110px;
  padding: 14px;
  border: 1px solid var(--pc-border);
  border-radius: 6px;
  background: var(--pc-surface-2);
}

.admin-module-health-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--pc-text-muted);
  font-size: var(--type-caption);
  font-weight: 760;
  text-transform: uppercase;
}

.health-check-link,
.health-check-link:hover,
.health-check-link:focus {
  color: inherit;
  text-decoration: none;
}

.admin-module-health-error-link {
  color: var(--bs-danger);
  font-weight: 820;
  text-decoration: none;
}

.admin-module-health-error-link:hover,
.admin-module-health-error-link:focus {
  color: var(--bs-danger);
  text-decoration: underline;
}

.admin-module-health-warning-link {
  color: var(--bs-warning);
  font-weight: 820;
  text-decoration: none;
}

.admin-module-health-warning-link:hover,
.admin-module-health-warning-link:focus {
  color: var(--bs-warning);
  text-decoration: underline;
}

.health-error-message {
  max-width: 280px;
  white-space: normal;
  word-break: break-word;
}

.health-evidence-cell {
  min-width: 260px;
  max-width: 360px;
  white-space: normal;
}

.client-activity-list {
  display: grid;
  gap: 0;
  border: 1px solid var(--pc-border);
  border-radius: 7px;
  overflow: hidden;
  background: var(--pc-surface);
}

.client-activity-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--pc-border);
  background: rgba(255, 255, 255, 0.022);
  color: var(--pc-muted);
  font-size: var(--type-tiny);
  font-weight: 820;
  text-transform: uppercase;
}

.client-activity-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  min-height: 62px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--pc-border);
  background: transparent;
}

.client-activity-card:last-child {
  border-bottom: 0;
}

.client-activity-main {
  min-width: 0;
}

.client-activity-name {
  overflow: hidden;
  color: var(--pc-text);
  font-size: 14px;
  font-weight: 780;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-activity-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 4px;
  color: var(--pc-muted);
  font-size: var(--type-caption);
  font-weight: 720;
}

.client-activity-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--pc-muted);
}

.client-activity-dot.is-active {
  background: var(--pc-green);
}

.client-activity-dot.is-idle {
  background: var(--pc-border-strong);
}

.client-activity-count {
  display: inline-flex;
  width: max-content;
  max-width: 104px;
  align-items: baseline;
  justify-self: start;
  gap: 5px;
  padding: 7px 9px;
  border: 1px solid var(--pc-border);
  border-radius: 999px;
  background: var(--pc-control);
}

.client-activity-count strong {
  color: var(--pc-text);
  font-size: 13px;
  font-weight: 850;
  line-height: 1;
}

.client-activity-count span {
  color: var(--pc-muted);
  font-size: var(--type-micro);
  font-weight: 780;
  line-height: 1;
  text-transform: uppercase;
}

.client-activity-time {
  justify-self: end;
  color: var(--pc-text-soft);
  font-size: var(--type-small);
  font-weight: 760;
  white-space: nowrap;
}

.ranked-list {
  display: grid;
  gap: 8px;
}

.ranked-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--pc-border);
  border-radius: 7px;
  background: var(--pc-surface-2);
}

.ranked-main {
  display: grid;
  min-width: 0;
  gap: 8px;
}

.ranked-name {
  overflow: hidden;
  color: var(--pc-text-soft);
  font-size: 13px;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranked-track {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--pc-control);
}

.ranked-track span {
  display: block;
  min-width: 4px;
  height: 100%;
  border-radius: inherit;
  background: color-mix(in srgb, var(--pc-cyan) 62%, var(--pc-blue));
}

.ranked-count {
  min-width: 48px;
  padding: 6px 9px;
  border: 1px solid var(--pc-border);
  border-radius: 999px;
  background: var(--pc-control);
  color: var(--pc-text);
  font-size: 13px;
  font-weight: 850;
  line-height: 1;
  text-align: center;
}

.admin-request-inspect .request-findings-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.finding-card-ai {
  border-color: color-mix(in srgb, var(--pc-blue) 36%, var(--pc-border));
}

.admin-request-inspect {
  display: grid;
  gap: 22px;
}

.request-command-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  padding: 24px;
  border: 1px solid var(--pc-border);
  border-left-width: 4px;
  border-radius: 8px;
  background:
    radial-gradient(circle at 100% 0, color-mix(in srgb, currentColor 11%, transparent) 0 30%, transparent 42%),
    linear-gradient(180deg, var(--pc-surface-2), var(--pc-surface));
  color: var(--pc-text);
}

.request-command-main {
  min-width: 0;
}

.request-command-main .page-title {
  margin: 4px 0 10px;
  max-width: 920px;
  overflow-wrap: anywhere;
}

.request-meta-row,
.finding-meta,
.muted-inline {
  color: var(--pc-text-muted);
}

.request-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: var(--type-small);
  font-weight: 760;
}

.request-meta-row span {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 4px 9px;
  border: 1px solid var(--pc-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
}

.request-command-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.request-command-actions form {
  margin: 0;
}

.request-command-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.admin-request-inspect .request-summary-stat {
  position: relative;
  min-height: 146px;
  padding: 18px;
  border: 1px solid var(--pc-border);
  border-top-width: 3px;
  border-radius: 8px;
  background: linear-gradient(180deg, var(--pc-surface-2), var(--pc-surface));
  overflow: hidden;
}

.admin-request-inspect .request-summary-stat::after {
  content: "";
  position: absolute;
  inset: auto 16px 14px 16px;
  height: 3px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.85;
}

.admin-request-inspect .request-summary-label {
  color: var(--pc-text-muted);
  font-size: var(--type-caption);
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-request-inspect .request-summary-value {
  margin-top: 12px;
  color: var(--pc-text);
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1;
  font-weight: 900;
}

.admin-request-inspect .request-summary-footnote {
  margin-top: 12px;
  color: var(--pc-text-muted);
  font-size: 13px;
}

.risk-tone-low,
.risk-tone-none,
.risk-tone-disabled,
.risk-tone-skipped,
.risk-tone-not-run,
.risk-tone-success {
  color: #2bd47d;
  border-color: color-mix(in srgb, #2bd47d 42%, var(--pc-border));
  background-color: rgba(15, 93, 54, 0.18);
}

.risk-tone-medium,
.risk-tone-pending,
.risk-tone-warning {
  color: #e4b93b;
  border-color: color-mix(in srgb, #e4b93b 48%, var(--pc-border));
  background-color: rgba(109, 78, 12, 0.23);
}

.risk-tone-high,
.risk-tone-danger,
.risk-tone-error {
  color: #ff5a67;
  border-color: color-mix(in srgb, #ff5a67 55%, var(--pc-border));
  background-color: rgba(108, 19, 28, 0.24);
}

.state-tone-completed {
  color: #7fb4ff;
  border-color: color-mix(in srgb, #7fb4ff 38%, var(--pc-border));
}

.state-tone-pending,
.state-tone-processing {
  color: #e4b93b;
  border-color: color-mix(in srgb, #e4b93b 48%, var(--pc-border));
}

.request-inspector-layout {
  display: grid;
  grid-template-columns: minmax(260px, 330px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.request-context-rail,
.request-inspector-main {
  display: grid;
  gap: 18px;
}

.request-context-rail {
  position: static;
}

.admin-request-inspect .panel-card {
  border: 1px solid var(--pc-border);
  border-radius: 8px;
  background: linear-gradient(180deg, var(--pc-surface-2), var(--pc-surface));
  box-shadow: none;
}

.request-decision-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 18px;
  align-items: start;
}

.request-warning-band {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  min-height: 96px;
  padding: 16px;
  border: 1px solid var(--pc-border);
  border-radius: 8px;
  background: var(--pc-surface-2);
}

.request-warning-band.has-warnings {
  border-color: color-mix(in srgb, #ff5a67 50%, var(--pc-border));
  background: rgba(108, 19, 28, 0.2);
}

.request-warning-band.is-clear {
  border-color: color-mix(in srgb, #2bd47d 38%, var(--pc-border));
  background: rgba(15, 93, 54, 0.16);
}

.request-warning-title {
  color: var(--pc-text);
  font-size: 20px;
  font-weight: 880;
}

.request-warning-subtitle {
  margin-top: 4px;
  color: var(--pc-text-muted);
}

.request-warning-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.request-status-pill,
.request-count-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: var(--type-small);
  font-weight: 850;
  white-space: nowrap;
}

.request-ai-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.admin-request-inspect .metric-card {
  border: 1px solid var(--pc-border);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.025);
}

.admin-request-inspect .summary-list-row {
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--pc-border);
}

.admin-request-inspect .summary-list-row:last-child {
  border-bottom: 0;
}

.admin-request-inspect .summary-key {
  color: var(--pc-text-muted);
  font-size: var(--type-small);
}

.admin-request-inspect .summary-value {
  color: var(--pc-text);
  font-size: var(--type-small);
  font-weight: 820;
  overflow-wrap: anywhere;
}

.admin-request-inspect .request-findings-grid {
  gap: 12px;
}

.admin-request-inspect .finding-card {
  border: 1px solid var(--pc-border);
  border-left-width: 3px;
  border-radius: 8px;
  padding: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012));
}

.finding-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 12px;
}

.finding-module {
  color: var(--pc-text);
  font-weight: 850;
}

.finding-meta {
  margin-top: 3px;
  font-size: var(--type-small);
  font-weight: 700;
  text-transform: capitalize;
}

.admin-request-inspect .finding-score {
  padding: 5px 8px;
  border: 1px solid currentColor;
  border-radius: 999px;
  color: inherit;
  font-size: var(--type-small);
  white-space: nowrap;
}

.finding-warning-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.admin-request-inspect .finding-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.admin-request-inspect .finding-fact {
  padding: 9px;
  border: 1px solid var(--pc-border);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.025);
}

.admin-request-inspect .finding-fact-key {
  display: block;
  color: var(--pc-text-muted);
  font-size: var(--type-caption);
  font-weight: 820;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.admin-request-inspect .finding-fact-value {
  display: block;
  margin-top: 4px;
  color: var(--pc-text);
  font-size: var(--type-small);
  font-weight: 760;
  overflow-wrap: anywhere;
}

.admin-request-inspect .behavioral-visual-card,
.admin-request-inspect .behavioral-visual-frame,
.admin-request-inspect .finding-ai-highlight {
  border-color: var(--pc-border);
  background: rgba(255, 255, 255, 0.025);
}

.admin-request-inspect .behavioral-visual-title,
.admin-request-inspect .finding-ai-highlight-value {
  color: var(--pc-text);
}

.admin-request-inspect .behavioral-visual-meta span,
.admin-request-inspect .finding-ai-highlight-label {
  color: var(--pc-text-muted);
  border-color: var(--pc-border);
}

.payload-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.payload-drawer {
  border: 1px solid var(--pc-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
  overflow: hidden;
}

.payload-drawer.compact,
.payload-drawer.nested {
  border-radius: 6px;
}

.payload-drawer summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 12px 14px;
  color: var(--pc-text);
  cursor: pointer;
  font-weight: 850;
  list-style: none;
}

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

.payload-drawer summary::after {
  content: "+";
  display: inline-grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid var(--pc-border);
  border-radius: 50%;
  color: var(--pc-text-muted);
  font-size: 16px;
  line-height: 1;
}

.payload-drawer[open] summary {
  border-bottom: 1px solid var(--pc-border);
}

.payload-drawer[open] summary::after {
  content: "-";
  color: var(--pc-blue);
}

.admin-request-inspect .json-block {
  max-height: 520px;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: #070808;
  color: #c9d2df;
  font-size: var(--type-small);
  line-height: 1.55;
}

.admin-request-inspect .table-warning-chip {
  border-color: color-mix(in srgb, #e4b93b 42%, var(--pc-border));
  background: rgba(109, 78, 12, 0.22);
  color: #f4d36b;
}

.admin-request-inspect .risk-tone-low,
.admin-request-inspect .risk-tone-success {
  color: #37d984;
  border-color: color-mix(in srgb, #37d984 48%, var(--pc-border));
}

.admin-request-inspect .request-summary-stat.risk-tone-low,
.admin-request-inspect .request-summary-stat.risk-tone-success,
.admin-request-inspect .finding-card.risk-tone-low,
.admin-request-inspect .finding-card.risk-tone-success {
  background:
    radial-gradient(circle at 100% 0, rgba(55, 217, 132, 0.14), transparent 34%),
    linear-gradient(180deg, rgba(16, 58, 38, 0.42), rgba(12, 16, 15, 0.98));
}

.admin-request-inspect .risk-tone-none,
.admin-request-inspect .risk-tone-disabled,
.admin-request-inspect .risk-tone-skipped,
.admin-request-inspect .risk-tone-not-run {
  color: #aeb6bd;
  border-color: color-mix(in srgb, #aeb6bd 38%, var(--pc-border));
}

.admin-request-inspect .request-summary-stat.risk-tone-none,
.admin-request-inspect .request-summary-stat.risk-tone-disabled,
.admin-request-inspect .request-summary-stat.risk-tone-skipped,
.admin-request-inspect .request-summary-stat.risk-tone-not-run,
.admin-request-inspect .finding-card.risk-tone-none,
.admin-request-inspect .finding-card.risk-tone-disabled,
.admin-request-inspect .finding-card.risk-tone-skipped,
.admin-request-inspect .finding-card.risk-tone-not-run {
  background:
    radial-gradient(circle at 100% 0, rgba(174, 182, 189, 0.11), transparent 34%),
    linear-gradient(180deg, rgba(45, 50, 54, 0.44), rgba(12, 16, 15, 0.98));
}

.admin-request-inspect .risk-tone-medium,
.admin-request-inspect .risk-tone-pending,
.admin-request-inspect .risk-tone-warning {
  color: #e9bd3f;
  border-color: color-mix(in srgb, #e9bd3f 54%, var(--pc-border));
}

.admin-request-inspect .request-summary-stat.risk-tone-medium,
.admin-request-inspect .request-summary-stat.risk-tone-pending,
.admin-request-inspect .request-summary-stat.risk-tone-warning,
.admin-request-inspect .finding-card.risk-tone-medium,
.admin-request-inspect .finding-card.risk-tone-pending,
.admin-request-inspect .finding-card.risk-tone-warning {
  background:
    radial-gradient(circle at 100% 0, rgba(233, 189, 63, 0.15), transparent 34%),
    linear-gradient(180deg, rgba(78, 58, 15, 0.46), rgba(12, 16, 15, 0.98));
}

.admin-request-inspect .risk-tone-high,
.admin-request-inspect .risk-tone-danger,
.admin-request-inspect .risk-tone-error {
  color: #ff6671;
  border-color: color-mix(in srgb, #ff6671 60%, var(--pc-border));
}

.admin-request-inspect .request-command-hero.risk-tone-high,
.admin-request-inspect .request-command-hero.risk-tone-danger,
.admin-request-inspect .request-command-hero.risk-tone-error,
.admin-request-inspect .request-summary-stat.risk-tone-high,
.admin-request-inspect .request-summary-stat.risk-tone-danger,
.admin-request-inspect .request-summary-stat.risk-tone-error,
.admin-request-inspect .finding-card.risk-tone-high,
.admin-request-inspect .finding-card.risk-tone-danger,
.admin-request-inspect .finding-card.risk-tone-error {
  background:
    radial-gradient(circle at 100% 0, rgba(255, 102, 113, 0.16), transparent 36%),
    linear-gradient(180deg, rgba(83, 24, 29, 0.5), rgba(12, 16, 15, 0.98));
}

.admin-request-inspect .state-tone-completed {
  color: #81b8ff;
  border-color: color-mix(in srgb, #81b8ff 46%, var(--pc-border));
}

.admin-request-inspect .request-summary-stat.state-tone-completed {
  background:
    radial-gradient(circle at 100% 0, rgba(129, 184, 255, 0.15), transparent 34%),
    linear-gradient(180deg, rgba(22, 48, 79, 0.45), rgba(12, 16, 15, 0.98));
}

.admin-request-inspect .request-command-compact.risk-tone-high,
.admin-request-inspect .request-command-compact.risk-tone-danger,
.admin-request-inspect .request-command-compact.risk-tone-error {
  color: var(--pc-text);
  border-color: var(--pc-border);
  background:
    linear-gradient(90deg, rgba(255, 102, 113, 0.045), transparent 42%),
    transparent;
}

.admin-request-inspect .request-command-compact .request-meta-row span {
  color: var(--pc-text-soft);
}

.admin-request-inspect .request-command-strip-compact .request-summary-stat.risk-tone-high,
.admin-request-inspect .request-command-strip-compact .request-summary-stat.risk-tone-danger,
.admin-request-inspect .request-command-strip-compact .request-summary-stat.risk-tone-error {
  color: #e7838a;
  border-color: rgba(255, 102, 113, 0.28);
  background:
    radial-gradient(circle at 100% 0, rgba(255, 102, 113, 0.07), transparent 32%),
    linear-gradient(180deg, rgba(42, 24, 26, 0.56), rgba(12, 16, 15, 0.98));
}

.admin-request-inspect .request-command-strip-compact .request-summary-stat.risk-tone-high::after,
.admin-request-inspect .request-command-strip-compact .request-summary-stat.risk-tone-danger::after,
.admin-request-inspect .request-command-strip-compact .request-summary-stat.risk-tone-error::after {
  opacity: 0.45;
}

.admin-request-inspect .request-command-compact {
  align-items: center;
  min-height: 0;
  padding: 0 0 14px;
  border: 0;
  border-bottom: 1px solid var(--pc-border);
  border-radius: 0;
  background: transparent;
}

.admin-request-inspect .request-command-compact .page-title {
  margin: 2px 0 6px;
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.05;
}

.admin-request-inspect .request-command-compact .eyebrow {
  font-size: var(--type-tiny);
}

.admin-request-inspect .request-command-compact .request-meta-row span {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--pc-text-muted);
}

.admin-request-inspect .request-command-compact .request-meta-row span + span::before {
  content: "/";
  margin-right: 8px;
  color: var(--pc-border-strong);
}

.admin-request-inspect .request-command-strip-compact {
  grid-template-columns: 1.05fr 1.05fr 1fr 1fr;
  gap: 10px;
}

.admin-request-inspect .request-command-strip-compact .request-summary-stat {
  min-height: 74px;
  padding: 11px 13px 13px;
  border-radius: 6px;
}

.admin-request-inspect .request-command-strip-compact .request-summary-value {
  margin-top: 5px;
  font-size: clamp(18px, 1.6vw, 24px);
}

.admin-request-inspect .request-command-strip-compact .request-summary-footnote {
  margin-top: 4px;
  font-size: var(--type-tiny);
}

.admin-request-inspect .request-command-strip-compact .request-summary-stat::after {
  inset: auto 14px 9px 14px;
  height: 2px;
}

.admin-request-inspect .module-evidence-panel {
  overflow: hidden;
}

.module-evidence-list {
  display: grid;
  gap: 0;
  border: 1px solid var(--pc-border);
  border-radius: 6px;
  background: var(--pc-sidebar);
  overflow: hidden;
}

.module-evidence-row {
  border-bottom: 1px solid var(--pc-border);
  border-left: 3px solid currentColor;
  background: rgba(255, 255, 255, 0.018);
}

.module-evidence-row:last-child {
  border-bottom: 0;
}

.module-evidence-summary {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 72px;
  padding: 12px 14px;
}

.module-evidence-id {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.module-code-pill {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--pc-border);
  border-radius: 5px;
  background: var(--pc-surface-2);
  color: var(--pc-text-muted);
  font-size: var(--type-small);
  font-weight: 820;
}

.module-evidence-warnings {
  display: flex;
  flex-wrap: wrap;
  grid-column: 1 / -1;
  gap: 6px;
  min-width: 0;
}

.module-evidence-facts {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  min-width: 0;
}

.module-evidence-facts span {
  min-width: 0;
  padding: 6px 7px;
  border: 1px solid var(--pc-border);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.022);
  color: var(--pc-text-soft);
  font-size: var(--type-caption);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.module-evidence-facts strong {
  margin-right: 5px;
  color: var(--pc-text-muted);
  font-weight: 760;
}

.module-evidence-details {
  grid-column: 1 / -1;
  align-self: start;
  min-width: 0;
}

.module-evidence-details[open] {
  grid-column: 1 / -1;
}

.module-evidence-details[open] summary {
  border-bottom: 1px solid var(--pc-border);
}

.module-evidence-details .behavioral-visual-grid,
.module-evidence-details .finding-facts {
  margin: 12px;
}

.payload-grid {
  align-items: start;
}

.payload-drawer {
  align-self: start;
}

.payload-drawer[open] {
  height: auto;
}

@media (max-width: 991.98px) {
  .admin-module-health-grid,
  .admin-request-inspect .request-findings-grid {
    grid-template-columns: 1fr;
  }

  .request-command-hero,
  .request-decision-grid {
    grid-template-columns: 1fr;
  }

  .request-command-hero {
    display: grid;
  }

  .request-command-actions {
    justify-content: flex-start;
  }

  .request-command-strip,
  .request-inspector-layout,
  .request-ai-metrics,
  .payload-grid,
  .admin-request-inspect .finding-facts {
    grid-template-columns: 1fr;
  }

  .request-context-rail {
    position: static;
  }

  .module-evidence-summary {
    grid-template-columns: 1fr;
  }

  .module-evidence-facts {
    grid-template-columns: 1fr;
  }
}

.daterangepicker {
  border: 1px solid var(--pc-border-strong);
  border-radius: 7px;
  background: var(--pc-surface-2);
  color: var(--pc-text);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.48);
  font-family: inherit;
}

.daterangepicker:before,
.daterangepicker:after {
  border-bottom-color: var(--pc-border-strong);
}

.daterangepicker .calendar-table,
.daterangepicker .ranges li,
.daterangepicker td.off,
.daterangepicker td.off.in-range,
.daterangepicker td.off.start-date,
.daterangepicker td.off.end-date {
  background: var(--pc-surface);
  color: var(--pc-text-muted);
}

.daterangepicker .calendar-table {
  border-color: var(--pc-border);
  border-radius: 6px;
}

.daterangepicker .calendar-table th,
.daterangepicker .calendar-table td {
  border-radius: 5px;
  color: var(--pc-text-soft);
  font-weight: 720;
}

.daterangepicker .calendar-table th.month {
  color: var(--pc-text);
  font-weight: 820;
}

.daterangepicker .calendar-table .next span,
.daterangepicker .calendar-table .prev span {
  border-color: var(--pc-text-soft);
}

.daterangepicker td.available:hover,
.daterangepicker th.available:hover,
.daterangepicker .ranges li:hover {
  background: var(--pc-hover);
  color: var(--pc-text);
}

.daterangepicker td.in-range {
  background: color-mix(in srgb, var(--pc-blue) 16%, var(--pc-surface-3));
  color: var(--pc-text);
}

.daterangepicker td.active,
.daterangepicker td.active:hover,
.daterangepicker .ranges li.active {
  background: var(--pc-blue);
  color: #fff;
}

.daterangepicker .ranges {
  border-color: var(--pc-border);
}

.daterangepicker .ranges li {
  border-radius: 5px;
  color: var(--pc-text-soft);
  font-size: var(--type-small);
  font-weight: 760;
}

.daterangepicker .drp-buttons {
  border-top-color: var(--pc-border);
}

.daterangepicker .drp-selected {
  color: var(--pc-text-soft);
  font-size: var(--type-small);
}

.daterangepicker select.monthselect,
.daterangepicker select.yearselect {
  border: 1px solid var(--pc-border);
  border-radius: 5px;
  background: var(--pc-control);
  color: var(--pc-text);
}

.daterangepicker .btn-primary {
  background: var(--pc-blue);
  border-color: var(--pc-blue);
  color: #fff;
}

.daterangepicker .btn-outline-dark {
  border-color: var(--pc-border-strong);
  background: var(--pc-control);
  color: var(--pc-text-soft);
}

/* Revylta forensic console refinement. Keep this last so the whole admin/account
   shell inherits the sharper productized security-review look. */
:root {
  --pc-bg: #050505;
  --pc-sidebar: #060606;
  --pc-surface: #0a0a0a;
  --pc-surface-2: #0f0f0f;
  --pc-surface-3: #141414;
  --pc-hover: #121212;
  --pc-border: #202020;
  --pc-border-strong: #323232;
  --pc-text: #f5f5f5;
  --pc-text-soft: #d0d0d0;
  --pc-text-muted: #8b8b8b;
  --pc-muted: #8b8b8b;
  --pc-faint: #626262;
  --pc-cyan: #ededed;
  --pc-green: #34d983;
  --pc-blue: #9ebdff;
  --pc-violet: #b9a6ff;
  --pc-amber: #eab84e;
  --pc-orange: #f38a46;
  --pc-red: #ff5c69;
  --pc-control: #111111;
  --pc-shadow: none;
}

body.app-body {
  background: var(--pc-bg);
  color: var(--pc-text);
  font-size: 13px;
  line-height: 1.42;
}

.workspace-shell {
  grid-template-columns: 232px minmax(0, 1fr);
}

.workspace-sidebar {
  width: 232px;
}

.workspace-sidebar-card,
.admin-sidebar-card {
  padding-top: 0;
}

.workspace-brand {
  min-height: 58px;
  padding: 0 13px;
}

.workspace-brand img {
  width: 134px;
  max-height: 34px;
}

.workspace-sidebar-top {
  gap: 12px;
}

.workspace-profile {
  grid-template-columns: 31px minmax(0, 1fr);
  gap: 9px;
  padding: 8px 13px 0;
}

.workspace-avatar {
  width: 31px;
  height: 31px;
  border: 1px solid #252525;
  border-radius: 3px;
  background: #151515;
  color: #bbbbbb;
  font-size: var(--type-tiny);
}

.workspace-user-name {
  font-size: var(--type-caption);
}

.workspace-user-email,
.workspace-client-name {
  color: var(--pc-muted);
  font-size: var(--type-micro);
}

.workspace-nav-group {
  gap: 3px;
  padding: 0 13px;
}

.workspace-section-label {
  padding: 12px 10px 5px;
  color: var(--pc-faint);
  font-size: var(--type-micro);
  letter-spacing: 0.13em;
}

.workspace-nav-link {
  min-height: 34px;
  padding: 8px 10px;
  border-radius: 3px;
  color: #aaaaaa;
  font-size: var(--type-caption);
  font-weight: 600;
}

.workspace-nav-icon {
  width: 15px;
  height: 15px;
  color: #727272;
}

.workspace-nav-link:hover {
  background: #0e0e0e;
}

.workspace-nav-link.active {
  border-color: #202020;
  border-radius: 3px;
  background: #111111;
  box-shadow: inset 2px 0 #e7e7e7;
}

.workspace-nav-link.active .workspace-nav-icon {
  color: #ffffff;
}

.workspace-sidebar-bottom {
  padding: 10px 13px 14px;
}

.console-toolbar {
  height: 48px;
  padding: 0 30px;
  background: rgba(5, 5, 5, 0.94);
}

.app-breadcrumb {
  font-size: var(--type-tiny);
}

.app-breadcrumb strong {
  font-size: var(--type-tiny);
}

.page-shell,
.narrow-shell {
  max-width: 1480px;
  padding: 28px 30px 64px;
  gap: 10px;
}

.page-header {
  min-height: 88px;
  padding-bottom: 18px;
  gap: 28px;
}

.eyebrow,
.metric-label,
.review-stat-label,
.workspace-table thead th,
.module-policy-table th,
.request-summary-label,
.request-summary-meta-label,
.ai-settings-stat-label,
.insight-label,
.public-report-eyebrow {
  color: var(--pc-faint);
  font-size: var(--type-micro);
  font-weight: 760;
  letter-spacing: 0.1em;
}

.page-title,
.workspace-title,
.public-report-title {
  font-size: 25px;
  line-height: 1.1;
}

.page-subtitle,
.panel-subtitle,
.metric-footnote,
.request-summary-footnote {
  font-size: var(--type-tiny);
  line-height: 1.45;
}

.panel-card,
.account-card,
.metric-card,
.stats-pill,
.insight-tile,
.finding-feed-item,
.api-key-card-details,
.module-usage-item,
.code-example-card,
.empty-state-panel,
.finding-card,
.behavioral-visual-card,
.finding-ai-highlight,
.request-summary-stat,
.request-summary-warning-panel,
.request-summary-meta-card,
.ai-settings-stat-card,
.ai-settings-connection-tile,
.ai-settings-empty-state,
.ai-settings-guidance,
.ai-settings-provider-card,
.ai-settings-builder-card,
.ai-settings-review-details,
.decision-card,
.report-run-hero,
.report-run-meta-item,
.report-run-step,
.policy-builder,
.api-key-policy-panel,
.api-key-policy-default-note,
.policy-note,
.table-responsive,
.card {
  border-color: var(--pc-border) !important;
  border-radius: 3px !important;
  background: var(--pc-surface) !important;
  box-shadow: none !important;
}

/* .panel-card {
  padding: 15px 17px;
} */

.panel-header {
  margin-bottom: 12px;
  padding-bottom: 0;
}

.panel-title {
  font-size: var(--type-small);
  letter-spacing: -0.01em;
}

.panel-subtitle {
  margin-top: 4px;
}

.metric-card,
.stats-pill,
.ai-settings-stat-card {
  position: relative;
  min-height: 88px;
  padding: 13px 15px;
  overflow: hidden;
}

.metric-card::after,
.request-summary-stat::after,
.connections-stat::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: #343434;
}

.metric-value,
.stats-pill-value,
.review-stat-value {
  margin-top: 7px;
  font-size: 22px;
  font-weight: 760;
  letter-spacing: -0.02em;
}

.metric-value.small-value {
  font-size: var(--type-small);
  line-height: 1.25;
}

.connections-stats {
  gap: 0;
  margin-bottom: 10px !important;
  border-color: var(--pc-border);
  background: transparent;
}

.connections-stat {
  position: relative;
  min-height: 98px;
  padding: 15px 22px 13px;
}

.connections-stat strong {
  font-size: 24px;
  letter-spacing: -0.025em;
}

.connections-stat span {
  margin-top: 8px;
  color: var(--pc-muted);
  font-size: var(--type-micro);
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.workspace-table td,
.workspace-table th,
.table td,
.table th,
.module-policy-table td,
.module-policy-table th {
  padding: 9px 12px;
  font-size: 13px;
}

.workspace-table thead th,
.module-policy-table th {
  padding-top: 8px;
  padding-bottom: 8px;
}

.table-hover > tbody > tr:hover > * {
  --bs-table-bg-state: var(--pc-hover);
}

.btn,
.btn-primary,
.btn-outline-primary,
.btn-outline-dark,
.btn-outline-secondary,
.btn-outline-danger,
.btn-outline-success,
.btn-success,
.btn-danger,
.btn-warning,
input[type="submit"],
button[type="submit"] {
  min-height: 32px;
  padding: 7px 11px;
  border-radius: 3px !important;
  font-size: var(--type-caption);
  font-weight: 700;
}

.btn-primary,
input[type="submit"],
button[type="submit"] {
  border-color: #ededed !important;
  background: #ededed !important;
  color: #080808 !important;
}

.btn-outline-primary,
.btn-outline-dark,
.btn-outline-secondary,
.btn-outline-danger,
.btn-outline-success,
.btn-success,
.btn-danger,
.btn-warning,
.btn:not(.btn-primary) {
  border-color: var(--pc-border-strong) !important;
  background: var(--pc-control) !important;
  color: #d8d8d8 !important;
}

.btn:hover {
  border-color: #4b4b4b !important;
  background: #151515 !important;
  color: #ffffff !important;
}

.btn-primary:hover,
input[type="submit"]:hover,
button[type="submit"]:hover {
  border-color: #ffffff !important;
  background: #ffffff !important;
  color: #080808 !important;
}

.form-control,
.form-select,
textarea,
input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
select {
  min-height: 29px;
  border-radius: 3px;
  background-color: #080808;
  font-size: var(--type-tiny);
}

.form-label,
label,
legend {
  color: var(--pc-text-soft);
  font-size: var(--type-caption);
}

.badge,
.count-pill,
.table-warning-chip,
.ai-settings-chip,
.nav-user-chip,
.status-badge,
.request-status-pill,
.request-count-pill {
  min-height: 20px;
  padding: 3px 7px;
  border-radius: 3px;
  font-size: var(--type-micro);
  font-weight: 760;
}

.badge.text-bg-success,
.badge.bg-success,
.text-bg-success {
  border-color: color-mix(in srgb, var(--pc-green) 44%, var(--pc-border)) !important;
  background: rgba(52, 217, 131, 0.08) !important;
  color: #46dd91 !important;
}

.badge.text-bg-danger,
.badge.bg-danger,
.text-bg-danger {
  border-color: color-mix(in srgb, var(--pc-red) 48%, var(--pc-border)) !important;
  background: rgba(255, 92, 105, 0.09) !important;
  color: #ff7480 !important;
}

.badge.text-bg-warning,
.badge.bg-warning,
.text-bg-warning {
  border-color: color-mix(in srgb, var(--pc-amber) 48%, var(--pc-border)) !important;
  background: rgba(234, 184, 78, 0.09) !important;
  color: #f1c861 !important;
}

.badge.text-bg-secondary,
.badge.bg-secondary,
.text-bg-secondary,
.badge.text-bg-light,
.text-bg-light {
  border-color: #333333 !important;
  background: #121212 !important;
  color: #a1a1a1 !important;
}

.progress,
.progress-thin,
.report-run-progress-bar,
.confidence-track,
.funnel-track,
.scorecard-bar {
  height: 4px;
  background: #1a1a1a;
}

.progress-bar,
.report-run-progress-fill,
.funnel-fill,
.scorecard-seg,
.confidence-fill {
  background: #e5e5e5;
}

.request-command-hero {
  padding: 0 0 14px;
  border: 0;
  border-bottom: 1px solid var(--pc-border);
  border-radius: 0;
  background: transparent;
}

.request-command-actions {
  gap: 7px;
}

.request-command-strip {
  gap: 10px;
}

.admin-request-inspect .request-summary-stat,
.request-summary-stat {
  min-height: 92px;
  padding: 14px 16px 13px;
  border-width: 1px;
  border-radius: 3px !important;
  background: var(--pc-surface) !important;
}

.admin-request-inspect .request-summary-label {
  font-size: var(--type-micro);
}

.admin-request-inspect .request-summary-value,
.request-summary-value {
  margin-top: 7px;
  font-size: 22px;
  font-weight: 780;
}

.admin-request-inspect .request-summary-footnote {
  margin-top: 6px;
  font-size: var(--type-micro);
}

.admin-request-inspect .request-summary-stat.risk-tone-high,
.admin-request-inspect .request-summary-stat.risk-tone-danger,
.admin-request-inspect .request-summary-stat.risk-tone-error,
.request-summary-stat-core.risk-tone-high,
.request-summary-stat-score.risk-tone-high {
  background: linear-gradient(180deg, rgba(255, 92, 105, 0.09), var(--pc-surface) 75%) !important;
}

.admin-request-inspect .request-summary-stat.risk-tone-medium,
.admin-request-inspect .request-summary-stat.risk-tone-warning {
  background: linear-gradient(180deg, rgba(234, 184, 78, 0.09), var(--pc-surface) 75%) !important;
}

.admin-request-inspect .request-summary-stat.risk-tone-low,
.admin-request-inspect .request-summary-stat.risk-tone-success {
  background: linear-gradient(180deg, rgba(52, 217, 131, 0.08), var(--pc-surface) 75%) !important;
}

.request-inspector-layout {
  gap: 16px;
}

.request-context-rail,
.request-inspector-main {
  gap: 10px;
}

.request-decision-grid {
  gap: 14px;
}

.request-warning-band {
  min-height: 82px;
  padding: 14px;
  border-radius: 3px;
}

.request-warning-title {
  font-size: 18px;
}

.request-warning-subtitle {
  font-size: var(--type-small);
}

.summary-list-row,
.admin-request-inspect .summary-list-row {
  padding: 8px 0;
  border-bottom-color: #181818;
}

.summary-key,
.admin-request-inspect .summary-key {
  font-size: var(--type-micro);
}

.summary-value,
.admin-request-inspect .summary-value {
  font-size: var(--type-tiny);
}

.module-evidence-list,
.payload-drawer,
.admin-module-health-card,
.client-activity-list,
.client-activity-card,
.connection-card,
.policy-summary-card,
.policy-preset-bar,
.policy-module-group,
.policy-module-card,
.rule-card,
.integration-fact-card,
.integration-code-card,
.integration-tab {
  border-radius: 3px !important;
}

.module-evidence-row {
  border-left-width: 2px;
}

.module-evidence-summary {
  min-height: 58px;
  padding: 10px 11px;
}

.module-code-pill {
  min-height: 25px;
  border-radius: 3px;
  font-size: var(--type-minimum);
}

.module-evidence-facts span {
  border-radius: 3px;
  font-size: var(--type-micro);
}

.admin-module-health-grid {
  gap: 8px;
}

.admin-module-health-card {
  min-height: 88px;
  padding: 12px;
}

.admin-module-health-foot {
  font-size: var(--type-micro);
}

.client-activity-card {
  min-height: 58px;
  padding: 10px 12px;
}

.client-activity-name {
  font-size: var(--type-small);
}

.client-activity-meta,
.client-activity-time {
  font-size: var(--type-tiny);
}

.client-activity-count {
  padding: 7px 9px;
  border-radius: 3px;
}

.json-block {
  background: #060606;
  color: #aaaaaa;
  font-size: var(--type-tiny);
}

@media (max-width: 991.98px) {
  .workspace-shell {
    grid-template-columns: 1fr;
  }

  .workspace-sidebar {
    width: 100%;
  }

  .workspace-sidebar-card,
  .admin-sidebar-card {
    padding: 9px 12px;
  }

  .workspace-sidebar-top {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding-bottom: 0;
  }

  .workspace-brand {
    min-height: 34px;
    padding: 0;
  }

  .workspace-brand img {
    width: 110px;
  }

  .workspace-profile {
    margin-left: auto;
    padding: 0;
  }

  .workspace-nav-group {
    padding: 0;
  }
}

@media (max-width: 575.98px) {
  .page-shell,
  .narrow-shell {
    padding: 15px 12px 36px;
  }

  .page-header {
    min-height: 0;
    flex-direction: column;
    align-items: flex-start;
  }

  .connections-stat {
    min-height: 88px;
    padding: 14px 16px 12px;
  }

  .workspace-user-name,
  .workspace-user-email {
    display: none;
  }
}

/* Uploaded request-review layout */
.request-reference {
  max-width: 1480px;
  padding-top: 0;
}

.request-reference-header {
  position: sticky;
  top: 48px;
  z-index: 60;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 28px;
  margin: 0 -30px;
  padding: 20px 30px 18px;
  background: rgba(5, 5, 5, 0.94);
  border-bottom: 1px solid var(--pc-border);
  backdrop-filter: blur(14px);
}

.request-reference .breadcrumbs {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 9px;
  color: var(--pc-muted);
  font-size: var(--type-tiny);
}

.request-reference .breadcrumbs a {
  color: #bdbdbd;
  text-decoration: none;
}

.request-reference .title-row {
  display: flex;
  align-items: center;
  gap: 11px;
}

.request-reference .title-row h1 {
  margin: 0;
  color: var(--pc-text);
  font-size: 25px;
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.request-reference .meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 9px;
  color: var(--pc-muted);
  font-size: var(--type-tiny);
}

.request-reference .meta-line strong {
  color: #cfcfcf;
  font-weight: 500;
}

.request-reference .header-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.request-reference .header-actions form {
  margin: 0;
}

.request-reference .button {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border: 1px solid var(--pc-border-strong);
  border-radius: 3px;
  background: #111111;
  color: #d8d8d8;
  font-size: var(--type-caption);
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

.request-reference .button:hover {
  border-color: #4b4b4b;
  background: #151515;
  color: #ffffff;
}

.request-reference .button.ghost {
  background: transparent;
  color: #b8b8b8;
}

.request-reference .button.primary {
  border-color: #ededed;
  background: #ededed;
  color: #080808;
}

.request-reference .button.primary:hover {
  background: #ffffff;
}

.request-reference .button.full {
  width: 100%;
}

.request-reference .compact-button {
  padding: 7px 10px;
}

.request-reference-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 16px;
}

.request-reference-content {
  min-width: 0;
}

.request-reference .page-rail {
  position: sticky;
  top: 178px;
  display: grid;
  height: max-content;
  gap: 10px;
  margin-top: 18px;
}

.request-reference .rail-card {
  padding: 8px;
  border: 1px solid var(--pc-border);
  border-radius: 3px;
  background: var(--pc-surface);
}

.request-reference .rail-label {
  display: block;
  margin: 3px 7px 8px;
  color: var(--pc-faint);
  font-size: var(--type-micro);
  font-weight: 760;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.request-reference .rail-card a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px;
  border-radius: 3px;
  color: #8d8d8d;
  font-size: var(--type-tiny);
  text-decoration: none;
}

.request-reference .rail-card a:hover,
.request-reference .rail-card a.active {
  background: #121212;
  color: #eeeeee;
}

.request-reference .rail-card a.active {
  box-shadow: inset 2px 0 #eeeeee;
}

.request-reference .rail-card a b {
  font-size: var(--type-micro);
}

.request-reference .review-card {
  padding: 14px;
}

.request-reference .review-card .rail-label {
  margin: 0 0 10px;
}

.request-reference .review-card > strong {
  display: block;
  color: var(--pc-text);
  font-size: var(--type-small);
}

.request-reference .review-card p {
  margin: 6px 0 13px;
  color: var(--pc-muted);
  font-size: var(--type-tiny);
  line-height: 1.55;
}

.request-reference .kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0 10px;
}

.request-reference .kpi {
  position: relative;
  display: flex;
  min-height: 98px;
  flex-direction: column;
  justify-content: space-between;
  padding: 15px 16px 13px;
  border: 1px solid var(--pc-border);
  border-radius: 3px;
  background: var(--pc-surface);
  overflow: hidden;
}

.request-reference .kpi::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: #343434;
}

.request-reference .kpi.danger {
  background: linear-gradient(180deg, rgba(255, 92, 105, 0.09), var(--pc-surface) 75%);
}

.request-reference .kpi.danger::after {
  background: var(--pc-red);
}

.request-reference .kpi.warning {
  background: linear-gradient(180deg, rgba(243, 185, 31, 0.09), var(--pc-surface) 75%);
}

.request-reference .kpi.warning::after {
  background: var(--pc-amber);
}

.request-reference .kpi.success {
  background: linear-gradient(180deg, rgba(25, 201, 137, 0.09), var(--pc-surface) 75%);
}

.request-reference .kpi.success::after {
  background: var(--pc-green);
}

.request-reference .kpi span,
.request-reference .kpi small {
  display: block;
}

.request-reference .kpi span {
  color: var(--pc-muted);
  font-size: var(--type-micro);
  font-weight: 760;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.request-reference .kpi strong {
  display: block;
  margin-top: 7px;
  color: var(--pc-text);
  font-size: 22px;
  line-height: 1;
  letter-spacing: -0.025em;
}

.request-reference .kpi small {
  color: var(--pc-muted);
  font-size: var(--type-micro);
}

.request-reference .review-grid {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.request-reference .primary-grid {
  grid-template-columns: minmax(270px, 0.72fr) minmax(0, 1.6fr);
}

.request-reference .secondary-grid {
  grid-template-columns: 1fr 1.3fr;
}

.request-reference .panel {
  border: 1px solid var(--pc-border);
  border-radius: 3px;
  background: var(--pc-surface);
  overflow: hidden;
}

.request-reference .panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 17px 13px;
  border-bottom: 1px solid var(--pc-border);
}

.request-reference .panel-heading h2 {
  margin: 0;
  color: var(--pc-text);
  font-size: var(--type-small);
  letter-spacing: -0.01em;
}

.request-reference .panel-heading p {
  margin: 4px 0 0;
  color: var(--pc-muted);
  font-size: var(--type-micro);
}

.request-reference .icon-button,
.request-reference .text-button {
  border: 0;
  background: none;
  color: #9d9d9d;
  cursor: pointer;
  font-size: var(--type-tiny);
}

.request-reference .details-list {
  margin: 0;
  padding: 6px 17px 13px;
}

.request-reference .details-list > div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 9px 0;
  border-bottom: 1px solid #181818;
}

.request-reference .details-list > div:last-child {
  border-bottom: 0;
}

.request-reference .details-list.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 24px;
}

.request-reference .details-list dt {
  color: var(--pc-muted);
  font-size: var(--type-micro);
}

.request-reference .details-list dd {
  margin: 0;
  color: var(--pc-text);
  text-align: right;
  font-size: var(--type-tiny);
  font-weight: 700;
}

.request-reference .positive {
  color: var(--pc-green) !important;
}

.request-reference .negative {
  color: var(--pc-red) !important;
}

.request-reference .status-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 7px;
  border: 1px solid currentColor;
  border-radius: 3px;
  font-size: var(--type-micro);
  font-weight: 760;
  line-height: 1.25;
  white-space: nowrap;
}

.request-reference .status-pill.blocked {
  color: #ff7480;
  background: rgba(255, 92, 105, 0.09);
}

.request-reference .status-pill.passed {
  color: #46dd91;
  background: rgba(52, 217, 131, 0.08);
}

.request-reference .status-pill.neutral {
  color: #a1a1a1;
  background: #121212;
  border-color: #333333;
}

.admin-lock-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 7px;
  border: 1px solid #333333;
  border-radius: 3px;
  background: #121212;
  color: #a1a1a1;
  font-size: var(--type-micro);
  font-weight: 760;
  line-height: 1.25;
  white-space: nowrap;
}

.admin-lock-pill .workspace-nav-icon {
  width: 11px;
  height: 11px;
}

.admin-lock-row {
  margin: 10px 0 6px;
}

.request-reference .decision-hero {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 13px;
  align-items: center;
  margin: 15px 17px 8px;
  padding: 14px;
  border: 1px solid rgba(255, 92, 105, 0.25);
  border-radius: 3px;
  background: rgba(255, 92, 105, 0.09);
}

.request-reference .decision-hero.is-clear {
  border-color: rgba(52, 217, 131, 0.28);
  background: rgba(52, 217, 131, 0.08);
}

.request-reference .risk-mark {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border: 1px solid rgba(255, 92, 105, 0.35);
  border-radius: 3px;
  background: rgba(255, 92, 105, 0.12);
  color: #ff7a86;
  font-size: var(--type-tiny);
  font-weight: 800;
}

.request-reference .decision-hero.is-clear .risk-mark {
  border-color: rgba(52, 217, 131, 0.35);
  background: rgba(52, 217, 131, 0.12);
  color: #46dd91;
}

.request-reference .decision-hero .eyebrow {
  display: block;
  margin: 0 0 4px;
  color: #bdbdbd;
}

.request-reference .decision-hero > div > strong {
  display: block;
  color: var(--pc-text);
  font-size: 13px;
}

.request-reference .decision-hero p {
  margin: 4px 0 0;
  color: #bdbdbd;
  font-size: var(--type-micro);
}

.request-reference .risk-score {
  text-align: right;
}

.request-reference .risk-score span,
.request-reference .risk-score small {
  display: block;
  color: #bdbdbd;
  font-size: var(--type-minimum);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.request-reference .risk-score strong {
  display: inline-block;
  color: var(--pc-text);
  margin-top: 3px;
  font-size: 22px;
  line-height: 1;
}

.request-reference .risk-score small {
  display: inline;
}

.request-reference .warning-list {
  padding: 0 17px 7px;
}

.request-reference .warning-list > div {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 9px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--pc-border);
}

.request-reference .warning-list > div:last-child {
  border-bottom: 0;
}

.request-reference .warning-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pc-amber);
  box-shadow: 0 0 0 4px rgba(234, 184, 78, 0.09);
}

.request-reference .danger-dot {
  background: var(--pc-red);
  box-shadow: 0 0 0 4px rgba(255, 92, 105, 0.09);
}

.request-reference .clear-dot {
  background: var(--pc-green);
  box-shadow: 0 0 0 4px rgba(52, 217, 131, 0.08);
}

.request-reference .warning-list p {
  margin: 0;
}

.request-reference .warning-list p strong,
.request-reference .warning-list p small {
  display: block;
}

.request-reference .warning-list p strong {
  color: var(--pc-text);
  font-size: var(--type-tiny);
}

.request-reference .warning-list p small {
  margin-top: 2px;
  color: var(--pc-muted);
  font-size: var(--type-micro);
}

.request-reference .warning-list b {
  color: var(--pc-red);
  font-size: var(--type-micro);
}

.request-reference .warning-list b.medium {
  color: var(--pc-amber);
}

.request-reference .warning-list b.low {
  color: var(--pc-green);
}

.request-reference .decision-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  padding: 10px 17px 17px;
}

.request-reference .decision-meta > div,
.request-reference .score-row > div {
  padding: 9px 10px;
  border: 1px solid var(--pc-border);
  border-radius: 3px;
  background: var(--pc-surface-2);
}

.request-reference .decision-meta span,
.request-reference .decision-meta strong,
.request-reference .score-row span,
.request-reference .score-row strong {
  display: block;
}

.request-reference .decision-meta span,
.request-reference .score-row span {
  color: var(--pc-muted);
  font-size: var(--type-minimum);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.request-reference .decision-meta strong,
.request-reference .score-row strong {
  margin-top: 5px;
  color: var(--pc-text);
  font-size: var(--type-tiny);
}

.request-reference .score-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  padding: 14px 17px 8px;
}

.request-reference .muted-callout {
  margin: 0 17px 17px;
  padding: 9px 10px;
  border: 1px dashed #313131;
  border-radius: 3px;
  color: var(--pc-muted);
  font-size: var(--type-micro);
}

.request-reference .evidence-section,
.request-reference .notes-panel,
.request-reference .telemetry-panel,
.request-reference .payload-panel {
  margin-top: 10px;
}

.request-reference .section-heading {
  align-items: center;
}

.request-reference .section-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.request-reference .search-box {
  display: flex;
  height: 29px;
  align-items: center;
  gap: 7px;
  padding: 0 9px;
  border: 1px solid var(--pc-border);
  border-radius: 3px;
  background: #080808;
  color: #777777;
}

.request-reference .search-box span {
  font-size: var(--type-micro);
}

.request-reference .search-box input {
  width: 118px;
  min-height: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #dddddd;
  font-size: var(--type-micro);
}

.request-reference .segment-group {
  display: flex;
}

.request-reference .segmented {
  padding: 6px 8px;
  border: 1px solid var(--pc-border);
  border-right: 0;
  background: transparent;
  color: #858585;
  font-size: var(--type-micro);
  cursor: pointer;
}

.request-reference .segmented:first-child {
  border-radius: 3px 0 0 3px;
}

.request-reference .segmented:last-child {
  border-right: 1px solid var(--pc-border);
  border-radius: 0 3px 3px 0;
}

.request-reference .segmented.active {
  border-color: #393939;
  background: #171717;
  color: #f0f0f0;
}

.request-reference .segmented b {
  margin-left: 3px;
  font-size: var(--type-minimum);
}

.request-reference .evidence-summary {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--pc-border);
  background: #080808;
  color: #898989;
  font-size: var(--type-micro);
}

.request-reference .evidence-summary span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.request-reference .evidence-summary i {
  width: 15px;
  height: 3px;
  border-radius: 1px;
}

.request-reference .success-bar {
  background: var(--pc-green);
}

.request-reference .danger-bar {
  background: var(--pc-red);
}

.request-reference .neutral-bar {
  background: #4a4a4a;
}

.request-reference .evidence-summary strong {
  margin-left: auto;
  color: #bcbcbc;
  font-size: var(--type-micro);
}

.request-reference .module-list {
  display: grid;
  gap: 6px;
  padding: 9px;
}

.request-reference .module-card {
  border: 1px solid var(--pc-border);
  border-left: 2px solid var(--pc-green);
  border-radius: 3px;
  background: #080808;
  overflow: hidden;
}

.request-reference .module-card.flagged {
  border-left-color: var(--pc-red);
}

/* Produced no verdict — deliberately reads as absent rather than as a result. */
.request-reference .module-card.not-run {
  border-left-color: #4a4a4a;
  background: #060606;
}

.request-reference .module-card:hover {
  border-top-color: #363636;
  border-right-color: #363636;
  border-bottom-color: #363636;
  background: #0b0b0b;
}

.request-reference .module-card details,
.request-reference .module-evidence-details {
  display: block;
}

.request-reference .module-card summary {
  list-style: none;
}

.request-reference .module-card summary::-webkit-details-marker {
  display: none;
}

.request-reference .module-header {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 11px;
  cursor: pointer;
}

.request-reference .module-main,
.request-reference .module-status {
  display: flex;
  align-items: center;
  gap: 9px;
}

.request-reference .module-main {
  min-width: 0;
}

.request-reference .module-index {
  display: grid;
  flex: 0 0 25px;
  width: 25px;
  height: 25px;
  place-items: center;
  border: 1px solid #242424;
  border-radius: 3px;
  background: #121212;
  color: #757575;
  font-size: var(--type-minimum);
  font-weight: 760;
}

.request-reference .module-main h3 {
  margin: 0;
  color: var(--pc-text);
  font-size: var(--type-tiny);
}

.request-reference .module-main p {
  margin: 3px 0 0;
  color: var(--pc-green);
  font-size: var(--type-tiny);
}

.request-reference .module-card.flagged .module-main p {
  color: #ff7985;
}

.request-reference .module-card.not-run .module-main p {
  color: #8a8a8a;
}

.request-reference .score-chip {
  color: #7d7d7d;
  font-size: var(--type-minimum);
}

.request-reference .chevron {
  color: #777777;
  font-size: var(--type-caption);
  transition: transform 0.18s ease;
}

.request-reference .module-card details[open] .chevron {
  transform: rotate(180deg);
}

.request-reference .module-body {
  display: grid;
  grid-template-columns: repeat(3, 1fr) auto;
  gap: 6px;
  padding: 9px 11px 11px;
  border-top: 1px solid var(--pc-border);
}

.request-reference .module-body > div {
  padding: 7px 8px;
  border: 1px solid var(--pc-border);
  border-radius: 3px;
  background: #0e0e0e;
}

.request-reference .module-body span,
.request-reference .module-body strong {
  display: block;
}

.request-reference .module-body span {
  color: var(--pc-muted);
  font-size: var(--type-minimum);
}

.request-reference .module-body strong {
  margin-top: 3px;
  color: var(--pc-text);
  font-size: var(--type-micro);
}

.request-reference .evidence-button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  min-height: 31px;
  padding: 7px 9px;
  border: 1px solid var(--pc-border-strong);
  border-radius: 3px;
  background: transparent;
  color: #c2c2c2;
  font-size: var(--type-micro);
  cursor: pointer;
}

.request-reference .module-evidence-details {
  grid-column: 1 / -1;
  border: 1px solid var(--pc-border);
  border-radius: 3px;
  background: #070707;
}

.request-reference .module-evidence-details .json-block {
  margin: 0;
  max-height: 320px;
  border: 0;
  border-top: 1px solid var(--pc-border);
  border-radius: 0;
}

.request-reference .empty-state {
  padding: 35px;
  color: var(--pc-muted);
  text-align: center;
  font-size: var(--type-tiny);
}

.request-reference .notes-panel textarea {
  width: calc(100% - 34px);
  min-height: 90px;
  margin: 14px 17px 17px;
  padding: 11px;
  border: 1px solid var(--pc-border);
  border-radius: 3px;
  background: #070707;
  color: var(--pc-text);
  font-size: var(--type-tiny);
  resize: vertical;
  outline: 0;
}

.request-reference .telemetry-panel .behavioral-visual-grid {
  padding: 14px 17px 10px;
}

.request-reference .raw-details {
  margin: 0 17px 17px;
  border: 1px solid var(--pc-border);
  border-radius: 3px;
  overflow: hidden;
}

.request-reference .raw-details summary {
  display: flex;
  justify-content: space-between;
  padding: 9px 10px;
  color: var(--pc-text);
  cursor: pointer;
  font-size: var(--type-micro);
  font-weight: 700;
}

.request-reference .raw-details summary b {
  color: #777777;
  font-size: var(--type-minimum);
}

.request-reference .raw-details pre {
  margin: 0;
  padding: 11px;
  border-top: 1px solid var(--pc-border);
  background: #060606;
  color: #aaaaaa;
  font-size: var(--type-micro);
  overflow: auto;
}

.request-reference .payload-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 14px 17px 17px;
}

.request-reference .payload-button {
  display: block;
  border: 1px solid var(--pc-border);
  border-radius: 3px;
  background: #0d0d0d;
  overflow: hidden;
}

.request-reference .payload-button summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px;
  list-style: none;
  cursor: pointer;
}

.request-reference .payload-button summary::-webkit-details-marker {
  display: none;
}

.request-reference .payload-button:hover {
  border-color: #3b3b3b;
  background: #111111;
}

.request-reference .payload-button b,
.request-reference .payload-button small {
  display: block;
}

.request-reference .payload-button b {
  color: var(--pc-text);
  font-size: var(--type-tiny);
}

.request-reference .payload-button small {
  margin-top: 3px;
  color: var(--pc-muted);
  font-size: var(--type-minimum);
}

.request-reference .payload-button em {
  color: #aaaaaa;
  font-size: var(--type-micro);
  font-style: normal;
}

.request-reference .payload-button .json-block {
  max-height: 320px;
  border: 0;
  border-top: 1px solid var(--pc-border);
  border-radius: 0;
}

@media (max-width: 1180px) {
  .request-reference-layout {
    grid-template-columns: 1fr;
  }

  .request-reference .page-rail {
    display: none;
  }

  .request-reference .primary-grid,
  .request-reference .secondary-grid {
    grid-template-columns: 1fr;
  }

  .request-reference .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .workspace-sidebar-card,
  .admin-sidebar-card {
    padding: 9px 12px;
  }

  .workspace-sidebar-top {
    flex-direction: row;
    align-items: center;
    gap: 8px;
  }

  .workspace-brand {
    flex: 0 0 auto;
  }

  .workspace-brand img {
    width: 112px;
  }

  .workspace-profile {
    display: flex;
    order: 3;
    margin-left: 0;
  }

  .workspace-profile > div:not(.workspace-avatar) {
    display: none;
  }

  .workspace-nav-group {
    order: 2;
    margin-left: auto;
    padding: 0;
  }

  .workspace-section-label {
    display: none;
  }

  .workspace-nav {
    flex-direction: row;
  }

  .workspace-nav-link {
    display: none;
    min-width: 48px;
    min-height: 40px;
    justify-content: center;
    padding: 8px;
  }

  .workspace-nav-link.active {
    display: flex;
  }

  .workspace-nav-link span {
    display: none;
  }

  .workspace-nav-icon {
    width: 16px;
    height: 16px;
  }

  .workspace-sidebar-bottom {
    display: none;
  }

  .request-reference-header {
    position: static;
    margin: 0 -12px;
    padding: 15px 12px;
    align-items: flex-start;
    flex-direction: column;
  }

  .request-reference .header-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .request-reference .title-row h1 {
    font-size: 20px;
  }

  .request-reference .kpi-grid {
    grid-template-columns: 1fr 1fr;
  }

  .request-reference .decision-hero {
    grid-template-columns: auto 1fr;
  }

  .request-reference .risk-score {
    grid-column: 2;
    text-align: left;
  }

  .request-reference .decision-meta,
  .request-reference .score-row {
    grid-template-columns: 1fr 1fr;
  }

  .request-reference .details-list.two-col {
    grid-template-columns: 1fr;
  }

  .request-reference .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .request-reference .section-tools {
    justify-content: flex-start;
  }

  .request-reference .search-box {
    width: 100%;
  }

  .request-reference .search-box input {
    width: 100%;
  }

  .request-reference .module-status .score-chip {
    display: none;
  }

  .request-reference .module-body,
  .request-reference .payload-actions {
    grid-template-columns: 1fr;
  }
}
.button-with-icon,
.tab-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: nowrap;
}

.tab-with-icon {
  justify-content: flex-start;
}

.button-with-icon > span,
.tab-with-icon > span {
  min-width: 0;
  line-height: 1.1;
}

.tab-label-copy {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
}

.ui-action-icon {
  width: 0.8rem;
  height: 0.8rem;
  flex: 0 0 auto;
  stroke-width: 2.15;
}

.button-with-icon > span {
  white-space: nowrap;
}

.request-reference .button.button-with-icon,
.request-reference .icon-button.button-with-icon,
.request-reference .text-button.button-with-icon,
.request-reference .segmented.tab-with-icon {
  gap: 0.35rem;
}

.request-reference .button.button-with-icon {
  padding-left: 10px;
  padding-right: 10px;
}

.request-reference .button.button-with-icon .ui-action-icon,
.request-reference .icon-button.button-with-icon .ui-action-icon,
.request-reference .text-button.button-with-icon .ui-action-icon,
.request-reference .segmented.tab-with-icon .ui-action-icon {
  width: 0.72rem;
  height: 0.72rem;
}

.request-reference .button.button-with-icon > span,
.request-reference .icon-button.button-with-icon > span,
.request-reference .text-button.button-with-icon > span,
.request-reference .segmented.tab-with-icon > span {
  white-space: nowrap;
}

.client-admin-tab.button-with-icon,
.client-admin-tab.tab-with-icon,
.signature-tab.tab-with-icon,
.integration-tab.tab-with-icon {
  gap: 0.5rem;
}

.client-admin-tab.button-with-icon .ui-action-icon,
.client-admin-tab.tab-with-icon .ui-action-icon {
  width: 0.78rem;
  height: 0.78rem;
}

.signature-tab.tab-with-icon .ui-action-icon {
  width: 0.9rem;
  height: 0.9rem;
}

.integration-tab.tab-with-icon .ui-action-icon {
  width: 0.82rem;
  height: 0.82rem;
}

.client-admin-tab.button-with-icon > span,
.client-admin-tab.tab-with-icon > span,
.integration-tab.tab-with-icon > span,
.signature-tab.tab-with-icon > span {
  white-space: nowrap;
}

.signature-discovery-table {
  table-layout: fixed;
  min-width: 1180px;
}

.signature-discovery-table code {
  white-space: normal;
  word-break: break-word;
}

.signature-discovery-actions {
  white-space: normal;
}

.signature-discovery-actions form {
  display: inline-flex;
  margin: 2px 0 2px 4px;
  vertical-align: middle;
}

.signature-discovery-table-pending .signature-discovery-col-category,
.signature-discovery-table-observed .signature-discovery-col-category {
  width: 10%;
}

.signature-discovery-table-pending .signature-discovery-col-signature {
  width: 30%;
}

.signature-discovery-table-pending .signature-discovery-col-seen,
.signature-discovery-table-pending .signature-discovery-col-clients {
  width: 7%;
}

.signature-discovery-table-pending .signature-discovery-col-proposal {
  width: 22%;
}

.signature-discovery-table-pending .signature-discovery-col-decision {
  width: 24%;
}

.signature-discovery-table-observed .signature-discovery-col-signature {
  width: 32%;
}

.signature-discovery-table-observed .signature-discovery-col-seen,
.signature-discovery-table-observed .signature-discovery-col-clients {
  width: 5%;
}

.signature-discovery-table-observed .signature-discovery-col-last-seen {
  width: 10%;
}

.signature-discovery-table-observed .signature-discovery-col-decision {
  width: 38%;
}

.signature-discovery-table-resolved .signature-discovery-col-category,
.signature-discovery-table-resolved .signature-discovery-col-when {
  width: 12%;
}

.signature-discovery-table-resolved .signature-discovery-col-signature {
  width: 46%;
}

.signature-discovery-table-resolved .signature-discovery-col-status {
  width: 14%;
}

.signature-discovery-table-resolved .signature-discovery-col-decided-by {
  width: 16%;
}
.position-relative{position: relative !important;}

.border {
    border-color: var(--pc-border) !important;
    background: var(--pc-surface) !important;
}

.workspace-sidebar-card,
.workspace-sidebar {
  overflow-y: auto;
  scrollbar-width: none;      /* Firefox */
  -ms-overflow-style: none;   /* Legacy Edge/IE */
}

.workspace-sidebar-card::-webkit-scrollbar,
.workspace-sidebar::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}
.workspace-sidebar-card *,
.workspace-sidebar * {
  scrollbar-width: none;
}

.workspace-sidebar-card *::-webkit-scrollbar,
.workspace-sidebar *::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
