/* UI Collections - Complete Library (All-in-One File) */
/* Just include this one file to get everything */

/* ============================================
   RESET
   ============================================ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html, body { height: 100%; }
body { line-height: 1.5; -webkit-font-smoothing: antialiased; }
img, picture, video, canvas, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; }
button { border: none; background: none; cursor: pointer; }

/* ============================================
   VARIABLES
   ============================================ */
:root {
  --color-primary: #3B82F6;
  --color-primary-dark: #2563EB;
  --color-secondary: #8B5CF6;
  --color-success: #10B981;
  --color-danger: #EF4444;
  --color-warning: #F59E0B;
  
  --color-gray-50: #F9FAFB;
  --color-gray-100: #F3F4F6;
  --color-gray-200: #E5E7EB;
  --color-gray-500: #6B7280;
  --color-gray-600: #4B5563;
  --color-gray-900: #111827;
  
  --space-2: 0.5rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  
  --radius-md: 0.5rem;
  --radius-lg: 1rem;
  --radius-full: 9999px;
  
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
}

/* ============================================
   UTILITIES
   ============================================ */
.container { max-width: 1280px; margin: 0 auto; padding: 0 1rem; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.text-center { text-align: center; }
.hidden { display: none; }
.relative { position: relative; }
.absolute { position: absolute; }

/* ============================================
   BUTTON COMPONENT
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 12px 24px;
  font-weight: 600;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.3s ease;
}
.btn--primary {
  background: var(--color-primary);
  color: white;
}
.btn--primary:hover {
  background: var(--color-primary-dark);
  transform: translateY(-1px);
}
.btn--secondary {
  background: var(--color-gray-200);
  color: var(--color-gray-900);
}
.btn--outline {
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
  background: transparent;
}
.btn--outline:hover {
  background: var(--color-primary);
  color: white;
}

/* ============================================
   CARD COMPONENT
   ============================================ */
.card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
}
.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.card__header { margin-bottom: var(--space-4); }
.card__title { font-size: 1.25rem; font-weight: 600; margin-bottom: var(--space-2); }
.card__body { flex: 1; }
.card__footer { margin-top: var(--space-6); padding-top: var(--space-4); border-top: 1px solid var(--color-gray-200); }

/* ============================================
   FORM COMPONENTS
   ============================================ */
.form-group { margin-bottom: var(--space-4); }
.form-label { display: block; margin-bottom: var(--space-2); font-weight: 500; }
.form-input, .form-textarea, .form-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-md);
  transition: border-color 0.3s ease;
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: none;
  border-color: var(--color-primary);
}

/* ============================================
   ALERT COMPONENT
   ============================================ */
.alert {
  padding: var(--space-4);
  border-radius: var(--radius-md);
  border-left: 4px solid;
}
.alert--success {
  background: #D1FAE5;
  border-color: var(--color-success);
  color: #065F46;
}
.alert--error {
  background: #FEE2E2;
  border-color: var(--color-danger);
  color: #991B1B;
}

/* ============================================
   BADGE COMPONENT
   ============================================ */
.badge {
  display: inline-block;
  padding: 4px 12px;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius-full);
  background: var(--color-gray-200);
}
.badge--primary { background: var(--color-primary); color: white; }
.badge--success { background: var(--color-success); color: white; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (min-width: 768px) {
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .md\:flex { display: flex; }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
