/* Component Styles */

/* Cards */
.card {
  background: white;
  border-radius: var(--radius-xl);
  border: 1px solid var(--slate-200);
  overflow: hidden;
}

.card-header {
  padding: 24px;
  border-bottom: 1px solid var(--slate-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--slate-900);
}

.card-body {
  padding: 24px;
}

/* Stat Cards */
.stat-card {
  background: white;
  border-radius: var(--radius-xl);
  padding: 24px;
  border: 1px solid var(--slate-200);
  transition: all var(--transition-base);
}

.stat-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.stat-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-icon.green {
  background: var(--primary-100);
  color: var(--primary-600);
}

.stat-icon.blue {
  background: #dbeafe;
  color: #2563eb;
}

.stat-icon.orange {
  background: #ffedd5;
  color: #ea580c;
}

.stat-icon.purple {
  background: #f3e8ff;
  color: #9333ea;
}

.stat-trend {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: var(--radius-full);
}

.stat-trend.up {
  background: var(--primary-100);
  color: var(--primary-700);
}

.stat-value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--slate-900);
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--slate-500);
}

.stat-detail {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--slate-100);
  font-size: 0.8125rem;
  color: var(--slate-600);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-lg);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary-600);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-700);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.btn-secondary {
  background: white;
  color: var(--slate-700);
  border: 1px solid var(--slate-300);
}

.btn-secondary:hover {
  background: var(--slate-50);
}

.btn-danger {
  background: var(--error);
  color: white;
}

.btn-danger:hover {
  background: #dc2626;
}

.btn-sm {
  padding: 8px 12px;
  font-size: 0.8125rem;
}

.btn-lg {
  padding: 16px 24px;
  font-size: 1rem;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-success {
  background: var(--primary-100);
  color: var(--primary-700);
}

.badge-warning {
  background: #fef3c7;
  color: #b45309;
}

.badge-error {
  background: #fee2e2;
  color: #dc2626;
}

.badge-info {
  background: #dbeafe;
  color: #1d4ed8;
}

/* Grade Badges */
.grade-badge {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
}

.grade-badge.grade-a {
  background: var(--primary-100);
  color: var(--primary-700);
}

.grade-badge.grade-b {
  background: #fef3c7;
  color: #b45309;
}

.grade-badge.grade-c {
  background: #ffedd5;
  color: #ea580c;
}

.grade-badge.grade-d {
  background: #fee2e2;
  color: #dc2626;
}

/* Forms */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--slate-700);
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--slate-300);
  border-radius: var(--radius-lg);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  transition: all var(--transition-base);
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px var(--primary-100);
}

/* Product Images */
.product-image {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-lg);
  background: var(--slate-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  flex-shrink: 0;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
}

thead {
  background: var(--slate-50);
  border-bottom: 2px solid var(--slate-200);
}

th {
  padding: 16px;
  text-align: left;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--slate-600);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

td {
  padding: 16px;
  border-bottom: 1px solid var(--slate-100);
}

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

tbody tr:hover {
  background: var(--slate-50);
}
