:root {
  --ent-bg: #f8fafc;
  --ent-surface: #ffffff;
  --ent-surface-soft: #f8fafc;
  --ent-text: #0f172a;
  --ent-muted: #64748b;
  --ent-border: #e2e8f0;
  --ent-brand: #1f5f63;
  --ent-brand-dark: #17494c;
  --ent-success: #15803d;
  --ent-success-bg: #f0fdf4;
  --ent-warning: #92400e;
  --ent-warning-bg: #fffbeb;
  --ent-danger: #b91c1c;
  --ent-danger-bg: #fef2f2;
  --ent-radius-sm: 8px;
  --ent-radius-md: 12px;
  --ent-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --border: var(--ent-border);
  --muted: var(--ent-muted);
}

body.enterprise-dashboard {
  background: var(--ent-bg);
}

.enterprise-dashboard .site-header {
  padding: 14px 24px;
}

.enterprise-dashboard .page-body {
  width: 100%;
  max-width: 1180px;
  padding: 26px 24px 40px;
}

.enterprise-dashboard .page-header,
.enterprise-topline,
.enterprise-filter-row,
.definition-grid,
.enterprise-kpis,
.enterprise-grid,
.flow-compact,
.insight-grid,
.enterprise-section {
  min-width: 0;
  max-width: 100%;
}

.enterprise-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.enterprise-context {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--ent-muted);
  font-size: 13px;
}

.demo-pill,
.context-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border: 1px solid var(--ent-border);
  border-radius: 999px;
  background: var(--ent-surface);
  color: var(--ent-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.enterprise-actions,
.enterprise-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.enterprise-filter-row {
  margin-top: 16px;
  padding: 8px;
  border: 1px solid var(--ent-border);
  border-radius: var(--ent-radius-md);
  background: var(--ent-surface);
  box-shadow: var(--ent-shadow-sm);
}

.enterprise-btn-primary,
.enterprise-btn-secondary,
.enterprise-filter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 8px 12px;
  border-radius: var(--ent-radius-sm);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

.enterprise-btn-primary {
  border: 1px solid var(--ent-brand);
  background: var(--ent-brand);
  color: #ffffff;
}

.enterprise-btn-secondary,
.enterprise-filter {
  border: 1px solid var(--ent-border);
  background: var(--ent-surface);
  color: var(--ent-text);
}

.enterprise-btn-primary:hover,
.enterprise-btn-secondary:hover,
.enterprise-filter:hover {
  text-decoration: none;
}

.enterprise-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.enterprise-kpi {
  padding: 14px;
  border: 1px solid var(--ent-border);
  border-radius: var(--ent-radius-md);
  background: var(--ent-surface);
  box-shadow: var(--ent-shadow-sm);
}

.enterprise-kpi-value {
  margin: 0;
  color: var(--ent-text);
  font-size: clamp(24px, 4vw, 34px);
  font-weight: 780;
  line-height: 1;
}

.enterprise-kpi-label {
  margin: 7px 0 0;
  color: var(--ent-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.enterprise-kpi-sub {
  margin: 4px 0 0;
  color: var(--ent-muted);
  font-size: 12px;
}

.enterprise-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 14px;
}

.enterprise-section {
  padding: 18px;
  border: 1px solid var(--ent-border);
  border-radius: var(--ent-radius-md);
  background: var(--ent-surface);
  box-shadow: var(--ent-shadow-sm);
}

.enterprise-section h2 {
  margin: 0 0 14px;
  color: var(--ent-text);
  font-size: 15px;
}

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

.risk-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.risk-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--ent-border);
}

.empty-state {
  color: var(--ent-muted);
}

.bar-list {
  display: grid;
  gap: 12px;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(120px, 2fr) auto;
  align-items: center;
  gap: 10px;
  color: var(--ent-text);
  font-size: 13px;
}

.bar-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.bar-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--ent-brand);
}

.signal-stack {
  display: grid;
  gap: 12px;
}

.signal-bar {
  display: flex;
  height: 32px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.signal-segment {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  color: #0f172a;
  font-size: 11px;
  font-weight: 800;
}

.signal-low { background: #bbf7d0; }
.signal-caution { background: #fde68a; }
.signal-high { background: #fecaca; }

.signal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--ent-muted);
  font-size: 12px;
}

.flow-compact {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--ent-border);
  border-radius: var(--ent-radius-md);
  background: var(--ent-surface);
}

.flow-node {
  padding: 10px;
  border-radius: var(--ent-radius-sm);
  background: var(--ent-surface-soft);
  color: var(--ent-text);
  text-align: center;
  font-size: 13px;
  font-weight: 750;
}

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

.insight-block {
  display: grid;
  gap: 7px;
  padding: 14px;
  border: 1px solid var(--ent-border);
  border-radius: var(--ent-radius-md);
  background: var(--ent-surface);
}

.insight-kicker {
  margin: 0;
  color: var(--ent-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.insight-title {
  margin: 0;
  color: var(--ent-text);
  font-size: 16px;
  line-height: 1.35;
}

.insight-body {
  margin: 0;
  color: #475569;
  font-size: 13px;
  line-height: 1.45;
}

.enterprise-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.enterprise-table th,
.enterprise-table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--ent-border);
  text-align: left;
}

.enterprise-table th {
  color: var(--ent-muted);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

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

.definition-grid details {
  padding: 12px;
  border: 1px solid var(--ent-border);
  border-radius: var(--ent-radius-md);
  background: var(--ent-surface);
}

.definition-grid summary {
  cursor: pointer;
  color: var(--ent-text);
  font-weight: 750;
}

.definition-grid p {
  margin: 8px 0 0;
  color: var(--ent-muted);
  font-size: 13px;
  line-height: 1.45;
}

@media (max-width: 900px) {
  .enterprise-kpis,
  .definition-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

@media (max-width: 480px) {
  .enterprise-dashboard .page-body {
    padding: 20px 14px 32px;
  }

  .enterprise-kpi {
    padding: 12px;
  }

  .bar-row {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .enterprise-table,
  .enterprise-table thead,
  .enterprise-table tbody,
  .enterprise-table tr,
  .enterprise-table th,
  .enterprise-table td {
    display: block;
    width: 100%;
  }

  .enterprise-table thead {
    display: none;
  }

  .enterprise-table tr {
    padding: 10px 0;
    border-bottom: 1px solid var(--ent-border);
  }

  .enterprise-table td {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 4px 0;
    border-bottom: 0;
    text-align: right;
  }

  .enterprise-table td::before {
    flex: 0 0 auto;
    color: var(--ent-muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-align: left;
    text-transform: uppercase;
  }

  .enterprise-table td:nth-child(1)::before { content: "Team"; }
  .enterprise-table td:nth-child(2)::before { content: "Reviews"; }
  .enterprise-table td:nth-child(3)::before { content: "Caution"; }
  .enterprise-table td:nth-child(4)::before { content: "High risk"; }
  .enterprise-table td:nth-child(5)::before { content: "Top finding"; }
}
