.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card-body { padding: 1.25rem; }
.card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-subtle);
  font-weight: 600;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1.1rem;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, transform 0.1s;
  line-height: 1.4;
}

.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary { background: var(--brand-primary); color: white; }
.btn-primary:hover:not(:disabled) { background: var(--brand-primary-hover); }

.btn-accent { background: var(--brand-accent); color: white; }
.btn-accent:hover:not(:disabled) { background: var(--brand-accent-hover); }

.btn-secondary { background: var(--text-secondary); color: white; }
.btn-secondary:hover:not(:disabled) { background: #475569; }

.btn-outline {
  background: transparent;
  color: var(--brand-primary);
  border: 1px solid var(--brand-primary);
}
.btn-outline:hover:not(:disabled) { background: var(--brand-primary-light); }

.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover:not(:disabled) { background: #b91c1c; }

.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover:not(:disabled) { background: var(--bg-subtle); color: var(--text-primary); }

.btn-sm { padding: 0.3rem 0.65rem; font-size: 12px; }
.btn-lg { padding: 0.7rem 1.5rem; font-size: 16px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.5rem;
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.badge-dna { background: var(--info-light); color: var(--info-text); }
.badge-rna { background: var(--success-light); color: var(--success-text); }
.badge-cfdna { background: var(--warning-light); color: var(--warning-text); }

.form-group { margin-bottom: 1rem; }
.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.3rem;
  font-size: 13px;
  color: var(--text-secondary);
}

.form-control {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 14px;
  font-family: inherit;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--bg-surface);
  color: var(--text-primary);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-control:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.form-control:disabled { background: var(--bg-subtle); opacity: 0.7; }

select.form-control { cursor: pointer; }

table { width: 100%; border-collapse: collapse; }
th, td {
  padding: 0.6rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}
th { font-weight: 600; background: var(--bg-subtle); font-size: 12px; text-transform: uppercase; letter-spacing: 0.3px; color: var(--text-secondary); }
tr:hover td { background: var(--bg-subtle); }

.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

.progress-bar {
  height: 8px;
  background: var(--border-color);
  border-radius: 99px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--brand-primary);
  border-radius: 99px;
  transition: width 0.4s ease;
}

.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 9000;
  font-weight: 500;
  animation: toastIn 0.25s ease;
}

.toast-success { background: var(--success); color: white; }
.toast-error { background: var(--danger); color: white; }
.toast-info { background: var(--brand-primary); color: white; }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-color);
  border-top-color: var(--brand-primary);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  gap: 0.75rem;
  color: var(--text-secondary);
}

.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-muted);
}

.empty-state h3 { color: var(--text-secondary); margin-bottom: 0.5rem; }

.stepper {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 2rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.stepper-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.stepper-item.active { color: var(--brand-primary); }
.stepper-item.done { color: var(--success); }

.stepper-number {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  border: 2px solid var(--border-color);
  color: var(--text-muted);
  flex-shrink: 0;
}

.stepper-item.active .stepper-number {
  border-color: var(--brand-primary);
  background: var(--brand-primary);
  color: white;
}

.stepper-item.done .stepper-number {
  border-color: var(--success);
  background: var(--success);
  color: white;
}

.stepper-line {
  width: 40px;
  height: 2px;
  background: var(--border-color);
  flex-shrink: 0;
}

.stepper-item.done + .stepper-line { background: var(--success); }
