/* Enhanced Card Components */

/* Card Base Styles */
.card {
  background: var(--background-primary);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
}

.card--hover:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Card Variants */
.card--featured {
  background: #e7f3ff;
  border-left: 4px solid var(--primary);
}

.card--outlined {
  border: 2px solid var(--border-color);
  box-shadow: none;
}

.card--compact .card-body {
  padding: 0.75rem;
}

/* Achievement Card Variant */
.achievement-card {
  border-left: 4px solid #f59e0b;
}

.card-icon-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.achievement-icon {
  font-size: 1.5rem;
  filter: grayscale(0);
}

.achievement-value {
  font-size: 1.25rem;
  font-weight: 600;
  color: #f59e0b;
  margin-bottom: 0.25rem;
}

/* Quick Start Card Variant */
.quick-start-card {
  border-left: 3px solid #10b981;
  transition: all 0.2s ease;
}

.quick-start-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Card Header */
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1rem 1rem 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.card-title-section {
  flex: 1;
}

.card-title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.4;
}

.card-title a {
  text-decoration: none;
  color: inherit;
}

.card-title a:hover {
  color: var(--primary);
}

.card-subtitle {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
}

.card-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Card Body */
.card-body {
  padding: 1rem;
}

/* Card Footer */
.card-footer {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border-color);
  background: var(--background-secondary);
}

/* Empty State Component */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  background: var(--background-secondary);
  border: 2px dashed var(--border-color);
  border-radius: 0.5rem;
}

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

.empty-state-title {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

.empty-state-description {
  margin: 0 0 1.5rem;
  font-size: 1rem;
}

.empty-state-action {
  margin-top: 1rem;
}

/* Stat Card Component */
.stat-card {
  background: var(--background-primary);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.stat-card__value {
  margin: 0 0 0.5rem;
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
}

.stat-card__label {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Filter Components */
.filters {
  margin-bottom: 2rem;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.filter-label {
  font-weight: 600;
  color: var(--text-primary);
  margin-right: 0.5rem;
}

.filter-count {
  opacity: 0.7;
  font-size: 0.875rem;
}

/* Badge Component */
.badge {
  background-color: var(--background-secondary);
  color: var(--text-muted);
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.badge-light {
  background-color: var(--background-secondary);
  color: var(--text-muted);
}

/* Status Badge Component */
.status-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-planned {
  background-color: #e5e7eb;
  color: #374151;
}

.status-in_progress {
  background-color: #dbeafe;
  color: #1e40af;
}

.status-completed {
  background-color: #d1fae5;
  color: #065f46;
}

.status-paused {
  background-color: #fef3c7;
  color: #92400e;
}

/* Dark Theme Adjustments */
[data-theme="dark"] .card--featured {
  background: #1e3a8a;
  border-left-color: #3b82f6;
}

[data-theme="dark"] .achievement-card {
  border-left-color: #fbbf24;
}

[data-theme="dark"] .achievement-value {
  color: #fbbf24;
}

[data-theme="dark"] .quick-start-card {
  border-left-color: #34d399;
}

[data-theme="dark"] .empty-state {
  background: var(--background-secondary);
  border-color: var(--border-color);
}

[data-theme="dark"] .status-planned {
  background-color: #374151;
  color: #d1d5db;
}

[data-theme="dark"] .status-in_progress {
  background-color: #1e40af;
  color: #dbeafe;
}

[data-theme="dark"] .status-completed {
  background-color: #065f46;
  color: #d1fae5;
}

[data-theme="dark"] .status-paused {
  background-color: #92400e;
  color: #fef3c7;
}

/* Button Group Improvements */
.btn-group {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn-group--sm .btn {
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
}

.btn-toolbar {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Progress Bar Component */
.progress {
  background-color: var(--background-secondary);
  border-radius: 0.5rem;
  height: 0.5rem;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.progress-bar {
  background-color: var(--primary);
  height: 100%;
  transition: width 0.3s ease;
  border-radius: 0.5rem;
}

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

/* Responsive Grid Improvements */
.grid {
  display: grid;
  gap: 1rem;
}

.grid-auto-fit {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.grid-auto-fill {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.grid-cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 768px) {
  .grid-cols-2 {
    grid-template-columns: 1fr;
  }
  
  .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .card-header-actions {
    width: 100%;
    justify-content: space-between;
  }
  
  .btn-group,
  .btn-toolbar {
    width: 100%;
    justify-content: stretch;
  }
  
  .btn-group .btn,
  .btn-toolbar .btn {
    flex: 1;
    min-width: 0;
  }
}