:root {
  --bg: #0b0f14;
  --panel: #111923;
  --text: #d7dee9;
  --muted: #8aa0b8;
  --good: #30d158;
  --bad: #ff453a;
  --accent: #64d2ff;
  --border: #1d2a38;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px;
}

h1, h2 {
  margin: 0 0 10px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
  flex-wrap: wrap;
}

.badge {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 12px;
}

.badge.good {
  color: var(--good);
}

.badge.bad {
  color: var(--bad);
}

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

.chart-wrap {
  position: relative;
  width: 100%;
  height: 280px;
  max-height: 40vh;
}

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

.metric-label {
  color: var(--muted);
  font-size: 13px;
}

.metric-value {
  font-size: 26px;
  font-weight: 700;
}

.metric-value.good {
  color: var(--good);
}

.metric-value.bad {
  color: var(--bad);
}

.table-wrap {
  width: 100%;
  overflow: auto;
  max-height: 520px;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.table-wrap.compact {
  max-height: 320px;
}

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

th, td {
  text-align: left;
  padding: 8px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  word-break: break-word;
}

.small {
  color: var(--muted);
  font-size: 12px;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

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