/* Reset mínimo */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  background: #f4f6f8;
  color: #1f2937;
  padding: 24px;
}

/* Contenedor general */
.dashboard {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  gap: 24px;
}

/* Header */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dashboard-header h1 {
  font-size: 1.4rem;
  font-weight: 600;
}

/* Botones */
button {
  border-radius: 6px;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 0.9rem;
}

button:hover {
  background: #889fdd;
}

/* Zona de charts */
.charts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.chart-card {
  background: white;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

.chart-card h2 {
  font-size: 1rem;
  margin-bottom: 12px;
  font-weight: 500;
}

/* Canvas responsive */
.chart-card canvas {
  display: block;
  max-width: 100%;
}

/* Editor JSON */
.data-editor {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.editor-card {
  background: white;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

.editor-card h3 {
  font-size: 0.95rem;
  margin-bottom: 8px;
  font-weight: 500;
}

textarea {
  width: 100%;
  min-height: 180px;
  font-family: monospace;
  font-size: 0.85rem;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  resize: vertical;
  margin-bottom: 8px;
}

textarea:focus {
  outline: none;
  border-color: #2563eb;
}

/* Responsive */
@media (max-width: 900px) {
  .charts,
  .data-editor {
    grid-template-columns: 1fr;
  }
}
