/* ==========================================================================
   Dataset Detail Page — Clean Unified Styles
   ========================================================================== */

/* ==========================================================================
   1. Dataset Header
   ========================================================================== */

.dataset-header {
  padding: 1.5rem;
}

.dataset-title {
  margin-bottom: 1rem;
  font-size: 1.75rem;
  font-weight: 700;
}

.dataset-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 2rem;
}

.meta-item {
  display: flex;
  flex-direction: column;
}

.meta-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.meta-value {
  font-size: 1rem;
  color: #111;
}

.meta-description {
  grid-column: 1 / -1;
}

/* ==========================================================================
   2. Dataset Profile (Health Checks)
   ========================================================================== */

.dataset-profile {
  padding: 1.5rem;
}

.profile-group {
  margin-bottom: 1.5rem;
}

.profile-subtitle {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: #374151;
}

.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 2rem;
}

.profile-item {
  display: flex;
  flex-direction: column;
}

.profile-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.profile-value {
  font-size: 1rem;
  color: #111;
}

.profile-subsection {
  margin-bottom: 1rem;
}

.profile-list {
  margin: 0.5rem 0 0 1rem;
  padding: 0;
  list-style: disc;
}

/* ==========================================================================
   3. Dataset Preview + Missing Data Tables
   ========================================================================== */

.dataset-preview-container {
  padding: 1rem;
  overflow-x: auto;
}

.dataset-preview-table {
    width: max-content;
    table-layout: auto;
  border-collapse: collapse;
  font-size: 0.95rem;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

/* Header */
.dataset-preview-table thead th {
  background: #f3f4f6;
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid #e5e7eb;
  white-space: nowrap;
}

/* Cells */
.dataset-preview-table th,
.dataset-preview-table td {
  border: 1px solid var(--color-border-subtle);
  padding: 0.75rem 1rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Zebra striping */
.dataset-preview-table tbody tr:nth-child(even) {
  background: #fafafa;
}

/* Hover */
.dataset-preview-table tbody tr:hover {
  background: #f0f9ff;
}

/* Column widths for Missing Data table */
.dataset-preview-table th:nth-child(1),
.dataset-preview-table td:nth-child(1) {
  width: 40%;
}

.dataset-preview-table th:nth-child(2),
.dataset-preview-table td:nth-child(2) {
  width: 30%;
}

.dataset-preview-table th:nth-child(3),
.dataset-preview-table td:nth-child(3) {
  width: 30%;
}


.dataset-health-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 1.25rem 1.5rem;
}

/* ==========================================================================
   4. Section Spacing
   ========================================================================== */

.section {
  margin-bottom: 2rem;
}

/* ==========================================================================
   5. Actions Section
   ========================================================================== */

.actions-grid {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem;
}

.action-btn {
  display: inline-block;
  padding: 0.75rem 1.25rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  background: #f3f4f6;
  color: #111;
  transition: background 0.15s ease, transform 0.1s ease;
}

.action-btn:hover {
  background: #e5e7eb;
  transform: translateY(-1px);
}

.action-btn.primary {
  background: #2563eb;
  color: white;
}

.action-btn.primary:hover {
  background: #1d4ed8;
}

.action-btn.danger {
  background: #dc2626;
  color: white;
}

.action-btn.danger:hover {
  background: #b91c1c;
}

/* ==========================================================================
   6. Dataset List Table (Index Page)
   ========================================================================== */

.dataset-list-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  font-size: 0.9rem;
}

.dataset-list-table th,
.dataset-list-table td {
  border: 1px solid var(--color-border-subtle);
  padding: var(--space-2) var(--space-3);
  vertical-align: middle;
}

.dataset-list-table th {
  background: #f3f4f6;
  font-weight: 600;
  color: #111827;
}

.dataset-list-table tr:nth-child(even) {
  background: #fafafa;
}

.dataset-actions a {
  color: var(--color-primary);
  text-decoration: none;
}

.dataset-actions a:hover {
  text-decoration: underline;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #111;
}

.card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 1.25rem 1.5rem;
}
