/**
 * Time Tracking - UI Components CSS
 * Composants réutilisables pour l'application Time Tracking
 * 
 * Version: 1.0
 * Date: 2026-02-12
 * Auteur: UX Designer Senior
 * 
 * Ce fichier contient tous les composants UI réutilisables pour
 * maintenir la cohérence visuelle de l'application.
 * 
 * Dépendances:
 * - Tailwind CSS (classes utilitaires)
 * - Bootstrap Icons (icônes)
 * - Police Inter (Google Fonts)
 */

/* ============================================
   TABLE DES MATIÈRES
   ============================================
   1. Variables CSS (Design Tokens)
   2. Reset & Base
   3. Typography
   4. Layout
   5. Buttons
   6. Forms
   7. Cards
   8. Tables
   9. Navigation
   10. Alerts
   11. Modals
   12. Utilities
   13. Animations
   ============================================ */

/* ============================================
   1. VARIABLES CSS (DESIGN TOKENS)
   ============================================ */
:root {
  /* Couleurs primaires */
  --color-primary-50: #eef2ff;
  --color-primary-100: #e0e7ff;
  --color-primary-200: #c7d2fe;
  --color-primary-400: #818cf8;
  --color-primary-500: #6366f1;
  --color-primary-600: #4f46e5;
  --color-primary-700: #4338ca;
  --color-primary-800: #3730a3;
  --color-primary-900: #312e81;

  /* Couleurs de surface */
  --color-bg-page: #f8fafc;
  --color-bg-card: #ffffff;
  --color-bg-hover: #f1f5f9;
  --color-bg-active: #e2e8f0;

  /* Couleurs de texte */
  --color-text-primary: #0f172a;
  --color-text-secondary: #475569;
  --color-text-tertiary: #64748b;
  --color-text-muted: #94a3b8;
  --color-text-disabled: #cbd5e1;

  /* Couleurs sémantiques */
  --color-success: #10b981;
  --color-success-light: #ecfdf5;
  --color-success-border: #a7f3d0;
  
  --color-error: #ef4444;
  --color-error-light: #fef2f2;
  --color-error-border: #fecaca;
  
  --color-warning: #f59e0b;
  --color-warning-light: #fffbeb;
  --color-warning-border: #fcd34d;
  
  --color-info: #3b82f6;
  --color-info-light: #eff6ff;
  --color-info-border: #bfdbfe;

  /* Couleurs activités */
  --activity-dev: #6366f1;
  --activity-design: #10b981;
  --activity-meeting: #f59e0b;
  --activity-test: #ef4444;
  --activity-doc: #8b5cf6;
  --activity-maint: #3b82f6;

  /* Typographie */
  --font-family-base: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-size-xs: 0.75rem;      /* 12px */
  --font-size-sm: 0.875rem;     /* 14px */
  --font-size-base: 1rem;       /* 16px */
  --font-size-lg: 1.125rem;     /* 18px */
  --font-size-xl: 1.25rem;      /* 20px */
  --font-size-2xl: 1.5rem;      /* 24px */
  --font-size-3xl: 1.875rem;    /* 30px */
  --font-size-4xl: 2.25rem;     /* 36px */

  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;

  /* Espacements */
  --space-1: 0.25rem;   /* 4px */
  --space-2: 0.5rem;    /* 8px */
  --space-3: 0.75rem;   /* 12px */
  --space-4: 1rem;      /* 16px */
  --space-5: 1.25rem;   /* 20px */
  --space-6: 1.5rem;    /* 24px */
  --space-8: 2rem;      /* 32px */
  --space-10: 2.5rem;   /* 40px */
  --space-12: 3rem;     /* 48px */
  --space-16: 4rem;     /* 64px */

  /* Border radius */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 20px;
  --radius-3xl: 24px;
  --radius-full: 9999px;

  /* Ombres */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --shadow-primary: 0 4px 14px 0 rgba(79, 70, 229, 0.35);
  --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.3);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 300ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Z-index scale */
  --z-dropdown: 100;
  --z-sticky: 500;
  --z-modal: 1000;
  --z-tooltip: 1500;
  --z-skip-link: 10000;
}

/* ============================================
   2. RESET & BASE
   ============================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family-base);
  font-size: var(--font-size-base);
  line-height: 1.5;
  color: var(--color-text-primary);
  background-color: var(--color-bg-page);
}

/* Focus visible pour accessibilité */
*:focus-visible {
  outline: 3px solid var(--color-primary-600);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

*:focus:not(:focus-visible) {
  outline: none;
}

/* Motion réduite */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================
   3. TYPOGRAPHY
   ============================================ */
.heading-1 {
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-extrabold);
  line-height: 1.2;
  letter-spacing: -0.025em;
  color: var(--color-text-primary);
}

.heading-2 {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  line-height: 1.3;
  letter-spacing: -0.025em;
  color: var(--color-text-primary);
}

.heading-3 {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  line-height: 1.4;
  color: var(--color-text-primary);
}

.heading-4 {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-semibold);
  line-height: 1.4;
  color: var(--color-text-primary);
}

.text-body {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  line-height: 1.5;
  color: var(--color-text-secondary);
}

.text-small {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-normal);
  line-height: 1.5;
  color: var(--color-text-secondary);
}

.text-caption {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  line-height: 1.4;
  letter-spacing: 0.01em;
  color: var(--color-text-tertiary);
}

/* ============================================
   4. LAYOUT
   ============================================ */
.container {
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-4);
  padding-right: var(--space-4);
}

@media (min-width: 640px) {
  .container {
    padding-left: var(--space-6);
    padding-right: var(--space-6);
  }
}

@media (min-width: 1024px) {
  .container {
    padding-left: var(--space-8);
    padding-right: var(--space-8);
  }
}

/* Skip link pour accessibilité */
.skip-link {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-primary-600);
  color: white;
  padding: var(--space-3) var(--space-6);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  font-weight: var(--font-weight-semibold);
  text-decoration: none;
  z-index: var(--z-skip-link);
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: 0;
}

/* ============================================
   5. BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: inherit;
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  text-decoration: none;
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-fast);
  min-height: 48px;
  padding: var(--space-3) var(--space-6);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Button Primary */
.btn-primary {
  background: linear-gradient(135deg, var(--color-primary-500) 0%, var(--color-primary-600) 100%);
  color: white;
  box-shadow: var(--shadow-primary);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px 0 rgba(79, 70, 229, 0.4);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0) scale(0.98);
}

/* Button Secondary */
.btn-secondary {
  background: var(--color-bg-card);
  color: var(--color-primary-600);
  border: 2px solid var(--color-primary-100);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--color-primary-50);
  border-color: var(--color-primary-400);
}

/* Button Ghost */
.btn-ghost {
  background: transparent;
  color: var(--color-text-secondary);
  min-height: 44px;
  padding: var(--space-2) var(--space-4);
}

.btn-ghost:hover:not(:disabled) {
  background: var(--color-bg-hover);
  color: var(--color-primary-700);
}

/* Button Danger */
.btn-danger {
  background: var(--color-error);
  color: white;
}

.btn-danger:hover:not(:disabled) {
  background: #dc2626;
}

/* Button Icon */
.btn-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border-radius: var(--radius-lg);
  background: transparent;
  color: var(--color-primary-600);
}

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

/* Button sizes */
.btn-sm {
  font-size: var(--font-size-sm);
  min-height: 40px;
  padding: var(--space-2) var(--space-4);
}

.btn-lg {
  font-size: var(--font-size-lg);
  min-height: 56px;
  padding: var(--space-4) var(--space-8);
}

.btn-block {
  width: 100%;
}

/* ============================================
   6. FORMS
   ============================================ */
.form-group {
  margin-bottom: var(--space-6);
}

.form-label {
  display: block;
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-sm);
  color: var(--color-text-primary);
  margin-bottom: var(--space-2);
}

.form-label-required::after {
  content: '*';
  color: var(--color-error);
  margin-left: var(--space-1);
}

.input-wrapper {
  position: relative;
}

.input-icon {
  position: absolute;
  left: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
  font-size: var(--font-size-xl);
  color: var(--color-text-muted);
  pointer-events: none;
  transition: color var(--transition-fast);
}

.input-wrapper:focus-within .input-icon {
  color: var(--color-primary-500);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  min-height: 56px;
  padding: var(--space-3) var(--space-4);
  font-family: inherit;
  font-size: var(--font-size-base); /* 16px minimum pour éviter le zoom iOS */
  color: var(--color-text-primary);
  background: var(--color-bg-card);
  border: 2px solid #e5e7eb;
  border-radius: var(--radius-lg);
  transition: all var(--transition-fast);
}

.form-input:hover,
.form-select:hover,
.form-textarea:hover {
  border-color: #cbd5e1;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--color-primary-400);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
  outline: none;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--color-text-muted);
}

.form-input.has-icon {
  padding-left: 3rem;
}

.form-select {
  appearance: none;
  cursor: pointer;
  padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

/* Form validation states */
.form-input.is-valid,
.form-select.is-valid,
.form-textarea.is-valid {
  border-color: var(--color-success);
}

.form-input.is-invalid,
.form-select.is-invalid,
.form-textarea.is-invalid {
  border-color: var(--color-error);
}

.form-error {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  margin-top: var(--space-2);
  font-size: var(--font-size-sm);
  color: #dc2626;
}

.form-help {
  display: block;
  margin-top: var(--space-2);
  font-size: var(--font-size-xs);
  color: var(--color-text-tertiary);
}

/* Checkbox & Radio */
.form-check {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
}

.form-check-input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--color-primary-600);
  cursor: pointer;
}

/* ============================================
   7. CARDS
   ============================================ */
.card {
  background: var(--color-bg-card);
  border-radius: var(--radius-xl);
  border: 1px solid #e5e7eb;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--transition-base);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-header {
  padding: var(--space-6);
  border-bottom: 1px solid #f3f4f6;
}

.card-title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
  margin: 0;
}

.card-subtitle {
  font-size: var(--font-size-sm);
  color: var(--color-text-tertiary);
  margin-top: var(--space-1);
}

.card-body {
  padding: var(--space-6);
}

.card-footer {
  padding: var(--space-4) var(--space-6);
  background: #f9fafb;
  border-top: 1px solid #f3f4f6;
}

/* Card variants */
.card-gradient .card-header {
  background: linear-gradient(135deg, var(--color-primary-600) 0%, #7c3aed 100%);
  color: white;
  text-align: center;
}

.card-gradient .card-title {
  color: white;
}

.card-gradient .card-subtitle {
  color: rgba(255, 255, 255, 0.8);
}

.card-glass {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: var(--shadow-xl);
}

/* Stats Card */
.card-stat {
  padding: var(--space-5);
}

.card-stat-value {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
  margin-top: var(--space-2);
}

.card-stat-label {
  font-size: var(--font-size-sm);
  color: var(--color-text-tertiary);
}

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

/* ============================================
   8. TABLES
   ============================================ */
.table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-xl);
  border: 1px solid #e5e7eb;
}

.table-wrapper::-webkit-scrollbar {
  height: 8px;
}

.table-wrapper::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

.table-wrapper::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.data-table {
  width: 100%;
  min-width: 600px;
  border-collapse: collapse;
  background: var(--color-bg-card);
}

.data-table thead {
  background: linear-gradient(to bottom, #f8fafc, white);
}

.data-table th {
  padding: var(--space-4) var(--space-3);
  text-align: left;
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-secondary);
  border-bottom: 2px solid #e5e7eb;
}

.data-table td {
  padding: var(--space-4) var(--space-3);
  border-bottom: 1px solid #f1f5f9;
  color: #374151;
  font-size: var(--font-size-sm);
}

.data-table tbody tr:hover {
  background: #f8fafc;
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

/* Activity cell */
.activity-cell {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.activity-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}

/* ============================================
   9. NAVIGATION
   ============================================ */
.header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(15px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 2px 10px rgba(79, 70, 229, 0.1);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: var(--space-4);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  color: var(--color-primary-700);
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-xl);
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--color-primary-500), #8b5cf6);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

/* Navigation links */
.nav-link {
  display: flex;
  align-items: center;
  padding: var(--space-2) var(--space-3);
  min-height: 44px;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  transition: all var(--transition-fast);
}

.nav-link:hover {
  color: var(--color-primary-600);
  background: rgba(99, 102, 241, 0.08);
}

.nav-link.active {
  color: var(--color-primary-900);
  background: rgba(99, 102, 241, 0.12);
}

/* Dropdown */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  border: 1px solid #e5e7eb;
  padding: var(--space-2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all var(--transition-fast);
  z-index: var(--z-dropdown);
}

.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  padding: var(--space-3) var(--space-4);
  color: var(--color-primary-700);
  font-weight: var(--font-weight-medium);
  font-size: var(--font-size-sm);
  text-decoration: none;
  border-radius: var(--radius-md);
  min-height: 44px;
  transition: all var(--transition-fast);
}

.dropdown-item:hover {
  background: var(--color-bg-hover);
  color: var(--color-primary-900);
}

/* User menu */
.user-button {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: transparent;
  border: 1px solid rgba(99, 102, 241, 0.5);
  border-radius: var(--radius-full);
  padding: var(--space-1) var(--space-3) var(--space-1) var(--space-1);
  cursor: pointer;
  color: var(--color-primary-700);
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-sm);
  min-height: 44px;
  transition: all var(--transition-fast);
}

.user-button:hover {
  background: rgba(99, 102, 241, 0.1);
  border-color: var(--color-primary-600);
}

.avatar {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #7c3aed, var(--color-primary-600));
  border-radius: var(--radius-full);
  color: white;
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================
   10. ALERTS
   ============================================ */
.alert {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-lg);
  font-size: var(--font-size-sm);
}

.alert-success {
  background: var(--color-success-light);
  color: #065f46;
  border: 1px solid var(--color-success-border);
}

.alert-error {
  background: var(--color-error-light);
  color: #991b1b;
  border: 1px solid var(--color-error-border);
}

.alert-warning {
  background: var(--color-warning-light);
  color: #92400e;
  border: 1px solid var(--color-warning-border);
}

.alert-info {
  background: var(--color-info-light);
  color: #1e40af;
  border: 1px solid var(--color-info-border);
}

.alert-icon {
  font-size: var(--font-size-xl);
  flex-shrink: 0;
}

.alert-content {
  flex: 1;
}

.alert-close {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity var(--transition-fast);
}

.alert-close:hover {
  opacity: 1;
}

/* ============================================
   11. MODALS
   ============================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal);
  padding: var(--space-4);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-fast);
}

.modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--color-bg-card);
  border-radius: var(--radius-2xl);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  transform: translateY(20px) scale(0.95);
  transition: transform var(--transition-spring);
}

.modal-overlay.is-open .modal {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-6);
  border-bottom: 1px solid #f3f4f6;
}

.modal-title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  margin: 0;
}

.modal-close {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  border: none;
  background: transparent;
  color: var(--color-text-tertiary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.modal-close:hover {
  background: var(--color-bg-hover);
  color: var(--color-text-secondary);
}

.modal-body {
  padding: var(--space-6);
  overflow-y: auto;
  max-height: calc(90vh - 200px);
}

.modal-footer {
  display: flex;
  gap: var(--space-3);
  justify-content: flex-end;
  padding: var(--space-4) var(--space-6);
  background: #f9fafb;
  border-top: 1px solid #f3f4f6;
}

/* ============================================
   12. UTILITIES
   ============================================ */

/* Text colors */
.text-primary { color: var(--color-primary-600); }
.text-success { color: var(--color-success); }
.text-error { color: var(--color-error); }
.text-warning { color: var(--color-warning); }
.text-muted { color: var(--color-text-muted); }

/* Background colors */
.bg-primary { background-color: var(--color-primary-50); }
.bg-success { background-color: var(--color-success-light); }
.bg-error { background-color: var(--color-error-light); }

/* Spacing utilities */
.mt-0 { margin-top: 0; }
.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }

.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }

.p-0 { padding: 0; }
.p-4 { padding: var(--space-4); }
.p-6 { padding: var(--space-6); }

/* Display utilities */
.hidden { display: none; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Flex utilities */
.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); }

/* Text alignment */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }

/* ============================================
   13. ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

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

.animate-fade-in-up {
  animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-slide-in {
  animation: slideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-pulse {
  animation: pulse 2s ease-in-out infinite;
}

.animate-spin {
  animation: spin 1s linear infinite;
}

/* Animation delays */
.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }

/* ============================================
   RESPONSIVE UTILITIES
   ============================================ */
@media (max-width: 768px) {
  .hide-mobile {
    display: none !important;
  }
  
  .heading-1 {
    font-size: var(--font-size-2xl);
  }
  
  .heading-2 {
    font-size: var(--font-size-xl);
  }
}

@media (min-width: 769px) {
  .show-mobile {
    display: none !important;
  }
}
