/* Active Dataset Panel Styles - Redesigned */

.active-dataset-panel {
  background: transparent; /* Let cards stand out */
  padding: 0;
  margin-bottom: var(--spacing-lg);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.dataset-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-md);
  padding: 0 var(--spacing-xs);
}

.dataset-panel-header h4 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, #fff, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.panel-refresh {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 8px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.panel-refresh:hover {
  color: var(--color-primary);
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.3);
  transform: rotate(180deg);
}

/* Grid Layout for Content */
.dataset-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

/* Cards */
.dashboard-card {
  background: var(--bg-secondary, #1e293b);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.dashboard-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.1);
}

.dashboard-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.card-title {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Info Card Specifics */
.dataset-title-large {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.5rem;
  line-height: 1.3;
  word-break: break-word;
}

.dataset-format-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
  margin-bottom: 1.5rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: auto;
}

.stat-item {
  background: rgba(0, 0, 0, 0.2);
  padding: 1rem;
  border-radius: 12px;
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

/* Quality Card Specifics */
.quality-layout {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.radial-progress {
  position: relative;
  width: 100px;
  height: 100px;
  flex-shrink: 0;
}

.radial-progress svg {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.radial-progress circle {
  fill: none;
  stroke-width: 8;
  stroke-linecap: round;
}

.radial-bg {
  stroke: rgba(255, 255, 255, 0.05);
}

.radial-value {
  transition: stroke-dashoffset 1s ease;
}

.radial-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text);
}

.quality-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.quality-bar-row {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.q-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.q-bar-bg {
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  overflow: hidden;
}

.q-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s ease;
}

/* Preview Table */
.preview-card {
  grid-column: 1 / -1;
  padding: 0; /* Reset padding for table */
  display: flex;
  flex-direction: column;
}

.preview-header {
  padding: 1.5rem 1.5rem 1rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.preview-table-wrapper {
  overflow-x: auto;
  width: 100%;
}

.mini-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.mini-table th {
  text-align: left;
  padding: 0.75rem 1.5rem;
  background: rgba(0, 0, 0, 0.2);
  color: var(--color-text-muted);
  font-weight: 600;
  white-space: nowrap;
}

.mini-table td {
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--color-text);
  white-space: nowrap;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-table tr:last-child td {
  border-bottom: none;
}

.mini-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* Empty State */
.dataset-panel-empty {
  background: var(--bg-secondary, #1e293b);
  border: 2px dashed rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 4rem 2rem;
  text-align: center;
  color: var(--color-text-muted);
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

/* Responsive */
@media (max-width: 768px) {
  .dataset-dashboard-grid {
    grid-template-columns: 1fr;
  }
  
  .quality-layout {
    flex-direction: column;
    text-align: center;
  }
  
  .quality-details {
    width: 100%;
  }
}
