/* --- Page scaffold --- */
.content.reports-page {
  max-width: 960px;
  margin: 32px auto 64px;
  padding: 0 20px;
}

.page-header h2 {
  font-size: 2.25rem;
  line-height: 1.2;
  margin: 0 0 6px;
  font-weight: 800;
  color: #1b1f24;
}

.page-header .subtitle {
  color: #6b7280; /* gray-500 */
  margin: 0 0 18px;
  font-size: 1rem;
}

.error { color: #d92d20; font-weight: 600; }

/* --- White rounded main panel like the mock --- */
.panel {
  background: #f7f7f5;
  border-radius: 14px;
  padding: 18px 0; /* inner space for the card list */
}

/* --- Make the HTML table render as a clean card list --- */
.table-container {
  overflow-x: auto;
}

.reports-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 12px; /* vertical gaps between cards */
}

/* Hide the native table header row visually (keep for a11y) */
.reports-table thead {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); border: 0;
}

/* Each row becomes a card */
.reports-table tbody .report-row {
  background: white;
  border-radius: 10px;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

/* turn the row into a flex container via cells */
.reports-table tbody .report-row > td {
  padding: 14px 16px;
  vertical-align: middle;
}

/* First cell: icon + title block */
.report-name {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 12px;
  align-items: center;
}

.report-icon {
  width: 40px; height: 40px;
  border-radius: 8px;
  background: #7cbf9e; /* green like mock */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.04);
}

.report-text {
  display: flex;
  flex-direction: column;
  min-width: 0; /* ellipsis support */
}

.report-title {
  font-weight: 700;
  color: #111827; /* gray-900 */
  font-size: 1rem;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.report-subtitle {
  font-size: 0.875rem;
  color: #6b7280; /* gray-500 */
  margin-top: 2px;
}

/* Actions cell: right-aligned with View + Download buttons */
.report-actions {
  white-space: nowrap;
  text-align: right;
  width: 1%;
}

.view-link {
  color: #f7f7f5;
  text-decoration: none;
  margin-right: 8px;
}

.view-link:hover { text-decoration: underline; }

/* Primary CTA like the orange pill in the mock */
.btn.primary, .btn-link {
  background: #e2a45a;
  color: #f7f7f5;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 1px 0 rgba(0,0,0,0.05), inset 0 -2px 0 rgba(0,0,0,0.08);
  transition: transform 80ms ease, box-shadow 80ms ease, background 120ms ease;
}

.btn.primary:hover { background: #f59e0bcc; }
.btn.primary:active { transform: translateY(1px); }

/* Row hover elevation */
.reports-table tbody .report-row:hover {
  box-shadow: 0 6px 18px rgba(16, 24, 40, 0.08);
  transform: translateY(-1px);
}

/* Empty state cell */
.reports-table .empty {
  text-align: center;
  padding: 24px;
  color: #6b7280;
  background: #fff;
  border-radius: 10px;
}

/* Pagination styling to match the mock’s pills */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 16px 6px;
  margin: 6px 0 2px;
}

.page-btn,
.pagination .page-numbers a,
.pagination .current-page {
  border-radius: 999px;
  padding: 8px 14px;
  text-decoration: none;
  font-weight: 600;
  border: 1px solid #e5e7eb;
  color: #374151;
  background: #fff;
}

.pagination .current-page {
  background: #4a90e2; /* blue pill */
  border-color: #4a90e2;
  color: #f7f7f5;
}

.page-btn.disabled {
  opacity: 0.5;
  pointer-events: none;
}

/* Responsive: stack actions under title on small screens */
@media (max-width: 560px) {
  .reports-table tbody .report-row > td {
    display: block;
    padding: 12px 14px;
  }
  .report-actions {
    text-align: left;
    margin-top: 8px;
  }
  .btn.primary { padding: 10px 12px; }
}