/* ============================================
   2026 DESIGN SYSTEM - Extended Components
   Badges, Cards, Forms, Utilities
   ============================================ */

/* ===== BADGES ===== */
.badge {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  display: inline-block;
  transition: all var(--transition-fast);
}

.badge-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: white;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.badge-success {
  background: #dcfce7;
  color: #16a34a;
  border: 1px solid #c6f6d5;
}

.badge-warning {
  background: #fed7aa;
  color: #ea580c;
  border: 1px solid #fdba74;
}

.badge-danger {
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.badge-info {
  background: #cffafe;
  color: #0a7ea4;
  border: 1px solid #a5f3fc;
}

.badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(99, 102, 241, 0.3);
}

/* ===== CARDS ===== */
.card {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xs);
  transition: all var(--transition-base);
  overflow: hidden;
  background: white;
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
  border-color: rgba(99, 102, 241, 0.2);
}

.card-header {
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
  padding: 1.5rem;
  font-weight: 600;
  color: #1f2937;
}

.card-body {
  padding: 1.5rem;
}

.card-footer {
  background: var(--color-surface-alt);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  padding: 1rem 1.5rem;
}

/* ===== FORM ELEMENTS ===== */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 0.75rem;
  display: block;
  font-size: 0.95rem;
}

.form-control,
.form-select,
textarea.form-control {
  border: 1.5px solid #d1d5db;
  border-radius: var(--radius-lg);
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  font-family: 'Inter', sans-serif;
  transition: all var(--transition-fast);
  background-color: white;
  color: #1f2937;
}

.form-control:focus,
.form-select:focus,
textarea.form-control:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
  background-color: white;
}

.form-control::placeholder {
  color: #9ca3af;
  opacity: 1;
}

.form-check {
  padding-left: 0;
}

.form-check-input {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: var(--radius-md);
  border: 2px solid #d1d5db;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.form-check-input:checked {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-check-label {
  margin-left: 0.75rem;
  cursor: pointer;
  user-select: none;
}

/* ===== ALERTS ===== */
.alert {
  border: 1px solid;
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  font-weight: 500;
  animation: slideInDown var(--transition-base);
}

.alert-success {
  background: #dcfce7;
  border-color: #c6f6d5;
  color: #15803d;
}

.alert-danger {
  background: #fee2e2;
  border-color: #fecaca;
  color: #991b1b;
}

.alert-warning {
  background: #fed7aa;
  border-color: #fdba74;
  color: #92400e;
}

.alert-info {
  background: #cffafe;
  border-color: #a5f3fc;
  color: #0c4a6e;
}

.alert-close {
  cursor: pointer;
  font-weight: 700;
  opacity: 0.7;
  transition: opacity var(--transition-fast);
}

.alert-close:hover {
  opacity: 1;
}

/* ===== TABLES ===== */
.table {
  font-size: 0.95rem;
  border-collapse: collapse;
}

.table thead th {
  background: var(--color-surface-alt);
  border-bottom: 2px solid rgba(0, 0, 0, 0.08);
  color: var(--color-text-primary);
  font-weight: 700;
  padding: 1rem;
  text-align: left;
}

.table tbody td {
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  padding: 1rem;
  vertical-align: middle;
}

.table tbody tr:hover {
  background-color: rgba(99, 102, 241, 0.02);
}

.table-striped tbody tr:nth-of-type(odd) {
  background-color: rgba(99, 102, 241, 0.02);
}

/* ===== MODALS ===== */
.modal-content {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  animation: slideUp var(--transition-base);
}

.modal-header {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(6, 182, 212, 0.05));
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  padding: 1.5rem;
}

.modal-title {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--color-text-primary);
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  background: var(--color-surface-alt);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  padding: 1.5rem;
  justify-content: flex-end;
}

.btn-close {
  width: 1.5rem;
  height: 1.5rem;
  opacity: 0.7;
  transition: opacity var(--transition-fast);
}

.btn-close:hover {
  opacity: 1;
}

/* ===== PAGINATION ===== */
.pagination {
  gap: 0.5rem;
  justify-content: center;
  margin-top: 2rem;
}

.page-link {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-md);
  padding: 0.5rem 0.75rem;
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.page-link:hover {
  background-color: rgba(99, 102, 241, 0.1);
  border-color: var(--color-primary);
  transform: translateY(-2px);
}

.page-link.active {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  border-color: var(--color-primary);
  color: white;
}

.page-link.disabled {
  color: var(--color-text-tertiary);
  cursor: not-allowed;
  opacity: 0.5;
}

/* ===== BREADCRUMBS ===== */
.breadcrumb {
  background-color: transparent;
  padding: 0;
  gap: 0.5rem;
}

.breadcrumb-item {
  color: var(--color-text-secondary);
}

.breadcrumb-item > a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.breadcrumb-item > a:hover {
  color: var(--color-primary-dark);
  text-decoration: underline;
}

.breadcrumb-item.active {
  color: var(--color-text-primary);
  font-weight: 600;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: '→';
  margin: 0 0.25rem;
  color: var(--color-text-tertiary);
}

/* ===== TOOLTIPS & POPOVERS ===== */
.tooltip-inner {
  background: var(--color-text-primary);
  border-radius: var(--radius-md);
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  box-shadow: var(--shadow-md);
}

.bs-tooltip-auto[data-popper-placement^="top"] .tooltip-arrow::before,
.bs-tooltip-top .tooltip-arrow::before {
  border-top-color: var(--color-text-primary);
}

/* ===== SPINNERS ===== */
.spinner-border {
  border-color: rgba(99, 102, 241, 0.2);
  border-right-color: var(--color-primary);
  animation: spinner-border 0.75s linear infinite;
}

.spinner-grow {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
}

/* ===== PROGRESS BARS ===== */
.progress {
  background-color: rgba(0, 0, 0, 0.05);
  border-radius: var(--radius-full);
  height: 0.5rem;
  overflow: hidden;
}

.progress-bar {
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent-cyan));
  border-radius: var(--radius-full);
  transition: width var(--transition-slow);
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.3);
}

/* ===== UTILITY CLASSES ===== */
.text-muted {
  color: var(--color-text-secondary) !important;
}

.text-light {
  color: var(--color-text-tertiary) !important;
}

.bg-light {
  background-color: var(--color-surface-alt) !important;
}

.bg-white {
  background-color: white !important;
}

.shadow {
  box-shadow: var(--shadow-md) !important;
}

.shadow-none {
  box-shadow: none !important;
}

.rounded {
  border-radius: var(--radius-lg) !important;
}

.rounded-sm {
  border-radius: var(--radius-sm) !important;
}

.rounded-lg {
  border-radius: var(--radius-xl) !important;
}

.rounded-full {
  border-radius: var(--radius-full) !important;
}

.border-0 {
  border: none !important;
}

.border {
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
}

.gap-1 { gap: var(--space-sm) !important; }
.gap-2 { gap: var(--space-md) !important; }
.gap-3 { gap: var(--space-lg) !important; }
.gap-4 { gap: var(--space-xl) !important; }

.p-1 { padding: var(--space-sm) !important; }
.p-2 { padding: var(--space-md) !important; }
.p-3 { padding: var(--space-lg) !important; }
.p-4 { padding: var(--space-xl) !important; }

.m-1 { margin: var(--space-sm) !important; }
.m-2 { margin: var(--space-md) !important; }
.m-3 { margin: var(--space-lg) !important; }
.m-4 { margin: var(--space-xl) !important; }

.flex { display: flex; }
.flex-column { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.justify-center { justify-content: center; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.content-between { align-content: space-between; }

.w-full { width: 100% !important; }
.h-full { height: 100% !important; }
.w-auto { width: auto !important; }
.h-auto { height: auto !important; }

.opacity-50 { opacity: 0.5 !important; }
.opacity-75 { opacity: 0.75 !important; }

/* ===== ANIMATIONS ===== */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.animate-fadeIn {
  animation: fadeIn 0.5s ease-out;
}
