/* Progress Dashboard Styles */
.progress-dashboard {
  max-width: 72rem;
  /* 6xl equivalent */
  margin: 0 auto;
  padding: var(--spacing-lg);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-2xl);
}

/* Header */
.progress-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.progress-title {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-semibold);
  margin: 0;
  color: var(--text-primary);
}

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

/* Progress Summary Grid */
.progress-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--spacing-lg);
}

/* Progress Cards */
.progress-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-primary);
  box-shadow: var(--shadow-sm);
}

.rounded-card {
  border-radius: var(--radius-xl);
}

.progress-card-content {
  padding: var(--spacing-lg);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.progress-card-title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-medium);
  margin: 0;
  color: var(--text-primary);
}

.progress-card-text {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  margin: 0;
}

/* Progress Bar */
.progress-bar-container {
  width: 100%;
  height: 8px;
  background-color: var(--bg-tertiary);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

/* Learning Journey */
.journey-description {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  margin: 0;
}

.journey-stages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-md);
  margin: var(--spacing-lg) 0;
}

@media (min-width: 768px) {
  .journey-stages-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.journey-stage-card {
  border-style: dashed;
  border-color: var(--border-primary);
}

.journey-stage-content {
  padding: var(--spacing-md);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.journey-stage-title {
  font-weight: var(--font-medium);
  margin: 0;
  color: var(--text-primary);
  font-size: var(--font-size-base);
}

.journey-stage-description {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  margin: 0;
}

/* Learning Map */
.learning-map {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  margin-top: var(--spacing-lg);
}

.learning-map-item {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.learning-map-header {
  display: flex;
  justify-content: space-between;
  font-size: var(--font-size-sm);
}

.learning-map-name {
  color: var(--text-primary);
}

.learning-map-percent {
  color: var(--text-muted);
}

/* Depth Progress */
.domain-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chevron-icon {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
}

.depth-progress {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.depth-item {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.depth-label {
  font-size: var(--font-size-sm);
  margin: 0;
  color: var(--text-primary);
}

/* To Be Reviewed */
.to-be-reviewed-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-md);
}

.to-be-reviewed-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.to-be-reviewed-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.to-be-reviewed-cover {
  width: 120px;
  height: 180px;
  object-fit: cover;
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.to-be-reviewed-details {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
  width: 100%;
  text-align: center;
}

.to-be-reviewed-title {
  font-size: var(--font-size-base);
  font-weight: var(--font-medium);
  color: var(--text-primary);
  text-decoration: none;
  line-height: 1.4;
}

.to-be-reviewed-title:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

.to-be-reviewed-author {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  line-height: 1.3;
}

.to-be-reviewed-date {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  margin-top: var(--spacing-xs);
}

/* Currently Reading */
.currently-reading-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-md);
}

.currently-reading-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.currently-reading-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.currently-reading-cover {
  width: 120px;
  height: 180px;
  object-fit: cover;
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.currently-reading-details {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
  width: 100%;
  text-align: center;
}

.currently-reading-title {
  font-size: var(--font-size-base);
  font-weight: var(--font-medium);
  color: var(--text-primary);
  text-decoration: none;
  line-height: 1.4;
}

.currently-reading-title:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

.currently-reading-author {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  line-height: 1.3;
}

.currently-reading-date {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  margin-top: var(--spacing-xs);
}

/* Recently Acquired */
.recently-acquired-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-md);
}

.recently-acquired-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.recently-acquired-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.recently-acquired-cover {
  width: 120px;
  height: 180px;
  object-fit: cover;
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.recently-acquired-details {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
  width: 100%;
  text-align: center;
}

.recently-acquired-title {
  font-size: var(--font-size-base);
  font-weight: var(--font-medium);
  color: var(--text-primary);
  text-decoration: none;
  line-height: 1.4;
}

.recently-acquired-title:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

.recently-acquired-author {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  line-height: 1.3;
}

.recently-acquired-date {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  margin-top: var(--spacing-xs);
}

/* Books Completed in Past 12 Months */
.books-completed-past-year-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-md);
}

.books-completed-past-year-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.books-completed-past-year-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.books-completed-past-year-cover {
  width: 120px;
  height: 180px;
  object-fit: cover;
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.books-completed-past-year-details {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
  width: 100%;
  text-align: center;
}

.books-completed-past-year-title {
  font-size: var(--font-size-base);
  font-weight: var(--font-medium);
  color: var(--text-primary);
  text-decoration: none;
  line-height: 1.4;
}

.books-completed-past-year-title:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

.books-completed-past-year-author {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  line-height: 1.3;
}

.books-completed-past-year-date {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  margin-top: var(--spacing-xs);
}

/* Total Completion Panels Container */
.total-completion-panels-container {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
  width: 100%;
}

@media (min-width: 768px) {
  .total-completion-panels-container {
    flex-direction: row;
  }
}

.total-completion-panels-container>.progress-card {
  flex: 1;
}

@media (min-width: 768px) {

  /* When both panels are present, each takes 50% */
  .total-completion-panels-container>.progress-card:only-child {
    flex: 1 1 100%;
    max-width: 100%;
  }

  /* When two panels are present, each takes 50% */
  .total-completion-panels-container>.progress-card:not(:only-child) {
    flex: 1 1 50%;
    max-width: 50%;
  }
}

/* Total Books Completed */
.total-books-completed-summary {
  font-size: var(--font-size-base);
  color: var(--text-primary);
  text-align: center;
  margin: 0;
  padding: var(--spacing-sm) 0;
  line-height: 1.6;
}

/* Total Subjects Completed */
.total-subjects-completed-summary {
  font-size: var(--font-size-base);
  color: var(--text-primary);
  text-align: center;
  margin: 0;
  padding: var(--spacing-sm) 0;
  line-height: 1.6;
}

/* Open Threads */
.open-threads {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  font-size: var(--font-size-sm);
  color: var(--text-primary);
}

.open-threads li {
  margin: 0;
}

/* Next Steps */
.next-steps {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

@media (min-width: 768px) {
  .next-steps {
    flex-direction: row;
  }
}

/* Button Outline Variant */
.btn-outline {
  background: transparent;
  border: 1px solid var(--border-primary);
  color: var(--text-primary);
  box-shadow: none;
}

.btn-outline:hover {
  background: var(--bg-secondary);
  border-color: var(--border-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* Footer */
.progress-footer {
  text-align: center;
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  margin: 0;
}

/* Legacy Progress Page Styles (for backward compatibility) */
.progress-page {
  font-family: var(--font-family-serif);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xl);
}

.progress-count {
  font-size: var(--font-size-4xl);
  font-weight: 600;
  margin: var(--spacing-sm) 0 0 0;
  color: var(--text-primary);
}

.progress-percent {
  margin: var(--spacing-xs) 0 0 0;
  color: var(--text-secondary);
  font-size: var(--font-size-lg);
}

.progress-tree-section {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  border-left: 6px solid var(--info-color);
  box-shadow: var(--shadow-sm);
}

.section-heading {
  margin-bottom: var(--spacing-md);
}

.progress-tree .subject-row {
  align-items: center;
  gap: var(--spacing-md);
}

.subject-progress-stats {
  font-size: var(--font-size-base);
  color: var(--text-secondary);
  margin-left: var(--spacing-md);
  white-space: nowrap;
}

.progress-tree .toggle-btn {
  margin-left: auto;
}

/* Responsive */
@media (max-width: 768px) {
  .progress-dashboard {
    padding: var(--spacing-md);
    gap: var(--spacing-xl);
  }

  .progress-title {
    font-size: var(--font-size-2xl);
  }

  .progress-summary-grid {
    grid-template-columns: 1fr;
  }

  .progress-tree .subject-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .progress-tree .toggle-btn {
    margin-left: 0;
  }
}