/* ═══════════════════════════════════════════
   Chart — Premium TailAdmin‑style
   ═══════════════════════════════════════════ */

.chart-section {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-normal);
}

.chart-section:hover {
  box-shadow: var(--shadow-md);
}

/* ── Header row ── */
.chart-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
  flex-wrap: wrap;
}

.chart-header-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chart-title {
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
  margin: 0;
  letter-spacing: -0.01em;
}

.chart-subtitle {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  margin: 0;
}

/* Revenue badge */
.chart-revenue-badge {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.chart-revenue-label {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.chart-revenue-value {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
  line-height: 1;
}

/* ── Date filter strip ── */
.chart-filter {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
}

.chart-filter-label {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  white-space: nowrap;
}

.chart-date-input {
  flex: 1;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-background);
  color: var(--color-text);
  font-size: var(--font-size-sm);
  font-family: var(--font-family);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}

.chart-date-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.12);
}

.chart-filter-arrow {
  color: var(--color-text-muted);
  font-size: 14px;
  line-height: 1;
  flex-shrink: 0;
}

/* ── Canvas wrapper ── */
.chart-wrapper {
  position: relative;
  height: 240px;
}

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