:root {
  --bg-canvas: #000000;
  --bg-surface: #1d2026;
  --bg-elevated: #15181d;
  --border-default: #2c313a;
  --text-primary: #ffffff;
  --text-muted: #d5d8de;
  --text-subtle: #9aa1ad;
  --accent: #7b109a;
  --radius-lg: 12px;
  --gap: 16px;
  --gap-sm: 8px;
}

body {
  margin: 0;
  background: var(--bg-canvas);
  color: var(--text-primary);
  font-family: system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.43;
}

#root {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  padding: var(--gap);
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

h1, h2, h3 {
  font-family: system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: var(--gap-sm);
}

h1 {
  font-size: 24px;
}

h2 {
  font-size: 20px;
}

h3 {
  font-size: 18px;
}

p {
  color: var(--text-muted);
  margin-bottom: var(--gap-sm);
}

.card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: var(--gap);
  border: 1px solid var(--border-default);
  margin-bottom: var(--gap);
}

.kpi-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 120px;
}

.kpi-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.kpi-label {
  font-size: 14px;
  color: var(--text-subtle);
  margin: 0;
}

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

.table th,
.table td {
  padding: var(--gap-sm);
  text-align: left;
  border-bottom: 1px solid var(--border-default);
}

.table th {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.table tr:last-child td {
  border-bottom: none;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
}

.badge.up {
  background: rgba(123, 16, 154, 0.1);
  color: var(--accent);
}

.badge.down {
  background: rgba(123, 16, 154, 0.1);
  color: var(--accent);
}

.badge.stable {
  background: rgba(123, 16, 154, 0.1);
  color: var(--accent);
}

.chart-container {
  height: 200px;
  position: relative;
}

.chart-bar {
  position: absolute;
  bottom: 0;
  width: 24px;
  background: var(--accent);
  border-radius: 4px 4px 0 0;
  transition: height 0.3s ease;
}

.chart-bar:hover {
  opacity: 0.8;
}

.chart-label {
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  color: var(--text-subtle);
}

.flex-row {
  display: flex;
  gap: var(--gap);
  margin-bottom: var(--gap);
}

.flex-col {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

.text-accent {
  color: var(--accent);
}

.button {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.button-primary {
  background: var(--accent);
  color: white;
}

.button-primary:hover {
  background: #6a0e87;
}

.button-secondary {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-default);
}

.button-secondary:hover {
  background: rgba(123, 16, 154, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
  main {
    padding: 12px;
  }
  .flex-row {
    flex-direction: column;
  }
  .kpi-card {
    height: 100px;
  }
}