* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, Segoe UI, Roboto, sans-serif;
  background: #0b0f19;
  color: #d9e1f2;
}

.dashboard-shell {
  display: grid;
  grid-template-columns: 320px 1fr;
  min-height: 100vh;
}

.sidebar {
  border-right: 1px solid #1f2a44;
  padding: 20px;
  background: #0f1524;
}

.sidebar h1 {
  margin: 0;
  font-size: 1.35rem;
}

.subtitle {
  margin-top: 6px;
  color: #95a3c9;
}

label {
  display: block;
  margin-top: 18px;
  margin-bottom: 8px;
  font-size: 0.92rem;
  color: #9fb0db;
}

select {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #2b3a5f;
  background: #111a2d;
  color: #d9e1f2;
}

.kpi-card,
.audit-log,
.mcp-note {
  margin-top: 18px;
  background: #121c31;
  border: 1px solid #1d2b4f;
  border-radius: 10px;
  padding: 14px;
}

.kpi-card h3,
.audit-log h3,
.mcp-note h3 {
  margin-top: 0;
}

.safe {
  color: #00c6a2;
  font-weight: 600;
}

.danger {
  color: #ff5b5b;
  font-weight: 600;
}

.warning {
  color: #f7b731;
}

.primary {
  margin-top: 18px;
  width: 100%;
  padding: 11px;
  border: none;
  border-radius: 8px;
  background: #00c6a2;
  color: #061018;
  font-weight: 700;
  cursor: pointer;
}

.primary:hover {
  filter: brightness(1.08);
}

#auditSteps {
  margin: 0;
  padding-left: 18px;
}

.main-content {
  padding: 20px 24px;
}

.top-header h2 {
  margin-bottom: 6px;
}

.top-header p {
  margin-top: 0;
  color: #90a0c7;
}

.tabs {
  display: flex;
  gap: 10px;
  margin: 14px 0 20px;
}

.tab-link {
  border: 1px solid #24365e;
  background: #101a31;
  color: #bdd0ff;
  border-radius: 8px;
  padding: 9px 13px;
  cursor: pointer;
}

.tab-link.active {
  background: #17305a;
  color: #ffffff;
  border-color: #2f5cab;
}

.tab-panel {
  display: none;
  background: #0f172b;
  border: 1px solid #1a2a49;
  border-radius: 12px;
  padding: 14px;
}

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

.panel-header h3 {
  margin-bottom: 6px;
}

.panel-header p {
  margin-top: 0;
  color: #91a3cb;
}

.graph-surface {
  width: 100%;
  height: 460px;
  border-radius: 10px;
  border: 1px solid #1f2f54;
  background: #0a1120;
}

.legend {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  color: #aebee5;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
}

.legend-dot.safe {
  background: #00c6a2;
}

.legend-dot.warning {
  background: #f7b731;
}

.legend-dot.danger {
  background: #ff5b5b;
}

.chart-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 14px;
}

.chart-card {
  background: #0a1223;
  border: 1px solid #1f3056;
  border-radius: 10px;
  padding: 10px;
  min-height: 330px;
}

.table-wrap {
  overflow-x: auto;
}

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

th,
td {
  border-bottom: 1px solid #1e2f55;
  text-align: left;
  padding: 10px 8px;
  font-size: 0.92rem;
}

th {
  color: #a9bce8;
  background: #121f3a;
}

td:last-child {
  font-weight: 600;
}

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

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