/* ==========================================================================
   pages/reports.css — Reports page (PDF generation + download/preview)
   BEM: .reports-page, .report-card, .reports-generate-card
   ========================================================================== */

.reports-page {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.reports-page__header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.reports-page__title {
  font-family: var(--fh);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.2px;
}

.reports-page__subtitle {
  font-size: 12px;
  color: var(--text-d);
}

/* ── Empty state ─────────────────────────────────────────── */

.reports-empty {
  text-align: center;
  padding: 80px 24px;
  color: var(--text-m);
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--rl);
  font-size: 13px;
}

/* ── Generate-new card (top, prominent) ──────────────────── */

.reports-generate-section {
  /* spacing handled by parent flex gap */
}

.reports-generate-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px;
  background: linear-gradient(135deg, var(--green-dim, rgba(34, 197, 94, 0.12)), transparent 70%);
  border: 1px solid var(--green, #22c55e);
  border-radius: var(--rl);
}

.reports-generate-card__icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  color: var(--green);
  stroke: currentColor;
  stroke-width: 1.4;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.reports-generate-card__body {
  flex: 1;
  min-width: 0;
}

.reports-generate-card__title {
  font-family: var(--fh);
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  letter-spacing: -0.1px;
}

.reports-generate-card__text {
  font-size: 12.5px;
  color: var(--text-m);
  line-height: 1.55;
  max-width: 60ch;
}

.reports-generate-card__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
  min-width: 168px;
}

/* ── Recent-reports section ──────────────────────────────── */

.reports-recent-section {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--rl);
  padding: 18px;
}

.reports-recent-section__title {
  font-family: var(--fh);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
  letter-spacing: -0.1px;
}

.reports-recent-section__hint {
  font-size: 12px;
  color: var(--text-d);
  line-height: 1.5;
}

.reports-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

/* ── Individual report card (placeholder for future history) */

.report-card {
  background: var(--surface2);
  border: 0.5px solid var(--border);
  border-radius: var(--r, 10px);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.report-card__header {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.report-card__title {
  font-family: var(--fh);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.report-card__date {
  font-size: 11px;
  color: var(--text-d);
}

.report-card__meta {
  font-size: 11px;
  color: var(--text-m);
  line-height: 1.5;
}

.report-card__actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

/* ── Buttons ─────────────────────────────────────────────── */

.report-card__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: 8px;
  font-family: var(--fh);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: opacity 0.15s, transform 0.15s, background 0.15s;
  white-space: nowrap;
}

.report-card__btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.report-card__btn:not(:disabled):hover {
  transform: translateY(-1px);
}

.report-card__btn--primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2, var(--accent)) 100%);
  color: #fff;
  box-shadow: 0 4px 12px var(--accent-glow);
}

.report-card__btn--primary:not(:disabled):hover {
  opacity: 0.92;
}

.report-card__btn--secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border-m, var(--border));
}

.report-card__btn--secondary:not(:disabled):hover {
  background: var(--surface3);
  border-color: var(--accent);
}

/* ── Inline spinner inside button ─────────────────────────── */

.report-card__spin {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-top-color: transparent;
  animation: report-card__spin 0.7s linear infinite;
  display: inline-block;
}

@keyframes report-card__spin {
  to { transform: rotate(360deg); }
}
