/**
 * AuthentiQR Design System v2.0
 * Modern, accessible, and responsive design foundation
 */

/* ============================================================================
   CSS VARIABLES - Design Tokens
   ============================================================================ */

:root {
  /* ── Color Palette ──────────────────────────────────────────────────── */
  
  /* Primary - Blue */
  --primary-50: #e3f2fd;
  --primary-100: #bbdefb;
  --primary-200: #90caf9;
  --primary-300: #64b5f6;
  --primary-400: #42a5f5;
  --primary-500: #2196f3;
  --primary-600: #1e88e5;
  --primary-700: #1976d2;
  --primary-800: #1565c0;
  --primary-900: #0d47a1;
  
  /* Secondary - Teal */
  --secondary-50: #e0f2f1;
  --secondary-100: #b2dfdb;
  --secondary-200: #80cbc4;
  --secondary-300: #4db6ac;
  --secondary-400: #26a69a;
  --secondary-500: #009688;
  --secondary-600: #00897b;
  --secondary-700: #00796b;
  --secondary-800: #00695c;
  --secondary-900: #004d40;
  
  /* Success */
  --success-50: #e8f5e9;
  --success-100: #c8e6c9;
  --success-500: #4caf50;
  --success-700: #388e3c;
  --success-900: #1b5e20;
  
  /* Warning */
  --warning-50: #fff3e0;
  --warning-100: #ffe0b2;
  --warning-500: #ff9800;
  --warning-700: #f57c00;
  --warning-900: #e65100;
  
  /* Error */
  --error-50: #ffebee;
  --error-100: #ffcdd2;
  --error-500: #f44336;
  --error-700: #d32f2f;
  --error-900: #b71c1c;
  
  /* Info */
  --info-50: #e3f2fd;
  --info-100: #bbdefb;
  --info-500: #2196f3;
  --info-700: #1976d2;
  --info-900: #0d47a1;
  
  /* Neutral/Gray */
  --gray-50: #fafafa;
  --gray-100: #f5f5f5;
  --gray-200: #eeeeee;
  --gray-300: #e0e0e0;
  --gray-400: #bdbdbd;
  --gray-500: #9e9e9e;
  --gray-600: #757575;
  --gray-700: #616161;
  --gray-800: #424242;
  --gray-900: #212121;
  
  /* Semantic Colors */
  --color-background: #ffffff;
  --color-surface: #ffffff;
  --color-surface-variant: var(--gray-50);
  --color-on-background: var(--gray-900);
  --color-on-surface: var(--gray-900);
  --color-on-surface-variant: var(--gray-600);
  --color-outline: var(--gray-300);
  --color-outline-variant: var(--gray-200);
  
  /* ── Typography ─────────────────────────────────────────────────────── */
  
  /* Font Family */
  --font-sans: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'Fira Code', 'Courier New', monospace;
  
  /* Font Sizes */
  --text-xs: 0.75rem;      /* 12px */
  --text-sm: 0.875rem;     /* 14px */
  --text-base: 1rem;       /* 16px */
  --text-lg: 1.125rem;     /* 18px */
  --text-xl: 1.25rem;      /* 20px */
  --text-2xl: 1.5rem;      /* 24px */
  --text-3xl: 1.875rem;    /* 30px */
  --text-4xl: 2.25rem;     /* 36px */
  --text-5xl: 3rem;        /* 48px */
  
  /* Line Heights */
  --leading-none: 1;
  --leading-tight: 1.25;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;
  --leading-loose: 2;
  
  /* Font Weights */
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-extrabold: 800;
  
  /* ── Spacing ────────────────────────────────────────────────────────── */
  
  --space-0: 0;
  --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-7: 1.75rem;      /* 28px */
  --space-8: 2rem;         /* 32px */
  --space-10: 2.5rem;      /* 40px */
  --space-12: 3rem;        /* 48px */
  --space-16: 4rem;        /* 64px */
  --space-20: 5rem;        /* 80px */
  --space-24: 6rem;        /* 96px */
  
  /* ── Border Radius ──────────────────────────────────────────────────── */
  
  --radius-none: 0;
  --radius-sm: 0.25rem;    /* 4px */
  --radius-md: 0.5rem;     /* 8px */
  --radius-lg: 0.75rem;    /* 12px */
  --radius-xl: 1rem;       /* 16px */
  --radius-2xl: 1.5rem;    /* 24px */
  --radius-3xl: 2rem;      /* 32px */
  --radius-full: 9999px;
  
  /* ── Shadows ────────────────────────────────────────────────────────── */
  
  --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  --shadow-inner: inset 0 2px 4px 0 rgb(0 0 0 / 0.05);
  
  /* ── Z-Index ────────────────────────────────────────────────────────── */
  
  --z-base: 0;
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
  --z-toast: 1080;
  
  /* ── Transitions ────────────────────────────────────────────────────── */
  
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slower: 500ms cubic-bezier(0.4, 0, 0.2, 1);
  
  /* ── Breakpoints (for reference in JS) ──────────────────────────────── */
  
  --breakpoint-sm: 640px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 1024px;
  --breakpoint-xl: 1280px;
  --breakpoint-2xl: 1536px;
}

/* ============================================================================
   BASE STYLES
   ============================================================================ */

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-on-background);
  background-color: var(--color-background);
}

/* ============================================================================
   BUTTON COMPONENTS
   ============================================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  line-height: var(--leading-tight);
  text-decoration: none;
  white-space: nowrap;
  border: 2px solid transparent;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-base);
  user-select: none;
  min-height: 44px; /* Touch-friendly */
  position: relative;
  overflow: hidden;
}

.btn:focus-visible {
  outline: 2px solid var(--primary-500);
  outline-offset: 2px;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Primary Button */
.btn-primary {
  background-color: var(--primary-600);
  color: white;
  border-color: var(--primary-600);
}

.btn-primary:hover:not(:disabled) {
  background-color: var(--primary-700);
  border-color: var(--primary-700);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

/* Secondary Button */
.btn-secondary {
  background-color: var(--secondary-600);
  color: white;
  border-color: var(--secondary-600);
}

.btn-secondary:hover:not(:disabled) {
  background-color: var(--secondary-700);
  border-color: var(--secondary-700);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Outline Button */
.btn-outline {
  background-color: transparent;
  color: var(--primary-600);
  border-color: var(--primary-600);
}

.btn-outline:hover:not(:disabled) {
  background-color: var(--primary-50);
  border-color: var(--primary-700);
  color: var(--primary-700);
}

/* Ghost Button */
.btn-ghost {
  background-color: transparent;
  color: var(--color-on-surface);
  border-color: transparent;
}

.btn-ghost:hover:not(:disabled) {
  background-color: var(--gray-100);
}

/* Danger Button */
.btn-danger {
  background-color: var(--error-600);
  color: white;
  border-color: var(--error-600);
}

.btn-danger:hover:not(:disabled) {
  background-color: var(--error-700);
  border-color: var(--error-700);
}

/* Success Button */
.btn-success {
  background-color: var(--success-600);
  color: white;
  border-color: var(--success-600);
}

.btn-success:hover:not(:disabled) {
  background-color: var(--success-700);
  border-color: var(--success-700);
}

/* Button Sizes */
.btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  min-height: 36px;
}

.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-lg);
  min-height: 52px;
}

.btn-xl {
  padding: var(--space-5) var(--space-10);
  font-size: var(--text-xl);
  min-height: 60px;
}

/* Icon Button */
.btn-icon {
  padding: var(--space-3);
  min-height: 44px;
  min-width: 44px;
}

.btn-icon.btn-sm {
  padding: var(--space-2);
  min-height: 36px;
  min-width: 36px;
}

/* Button with loading state */
.btn-loading {
  position: relative;
  color: transparent;
  pointer-events: none;
}

.btn-loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid currentColor;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================================================
   CARD COMPONENTS
   ============================================================================ */

.card-v2 {
  background-color: var(--color-surface);
  border: 1px solid var(--color-outline-variant);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  overflow: hidden;
}

.card-v2:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-v2-header {
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--color-outline-variant);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.card-v2-title {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  color: var(--color-on-surface);
  margin: 0;
}

.card-v2-body {
  padding: var(--space-6);
}

.card-v2-footer {
  padding: var(--space-5) var(--space-6);
  border-top: 1px solid var(--color-outline-variant);
  background-color: var(--color-surface-variant);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-3);
}

/* Metric Card */
.metric-card {
  background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%);
  color: white;
  padding: var(--space-6);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  transition: all var(--transition-base);
}

.metric-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--shadow-xl);
}

.metric-card-value {
  font-size: var(--text-4xl);
  font-weight: var(--font-bold);
  line-height: var(--leading-none);
  margin-bottom: var(--space-2);
}

.metric-card-label {
  font-size: var(--text-sm);
  opacity: 0.9;
  font-weight: var(--font-medium);
}

.metric-card-change {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  margin-top: var(--space-2);
  padding: var(--space-1) var(--space-2);
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
}

/* ============================================================================
   INPUT COMPONENTS
   ============================================================================ */

.input-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.input-label {
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--color-on-surface);
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.input-required {
  color: var(--error-500);
}

.input-field {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-on-surface);
  background-color: var(--color-surface);
  border: 2px solid var(--color-outline);
  border-radius: var(--radius-lg);
  transition: all var(--transition-fast);
  min-height: 44px;
}

.input-field:hover:not(:disabled) {
  border-color: var(--primary-400);
}

.input-field:focus {
  outline: none;
  border-color: var(--primary-600);
  box-shadow: 0 0 0 3px var(--primary-100);
}

.input-field:disabled {
  background-color: var(--gray-100);
  cursor: not-allowed;
  opacity: 0.6;
}

.input-field.input-error {
  border-color: var(--error-500);
}

.input-field.input-error:focus {
  box-shadow: 0 0 0 3px var(--error-100);
}

.input-hint {
  font-size: var(--text-xs);
  color: var(--color-on-surface-variant);
}

.input-error-message {
  font-size: var(--text-xs);
  color: var(--error-700);
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

/* Textarea */
textarea.input-field {
  resize: vertical;
  min-height: 100px;
}

/* Select */
select.input-field {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
  background-position: right var(--space-3) center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
  padding-right: var(--space-10);
}

/* Input with icon */
.input-with-icon {
  position: relative;
}

.input-with-icon .input-field {
  padding-left: var(--space-10);
}

.input-icon {
  position: absolute;
  left: var(--space-3);
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-on-surface-variant);
  pointer-events: none;
}

/* ============================================================================
   BADGE/CHIP COMPONENTS
   ============================================================================ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  line-height: var(--leading-tight);
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.badge-primary {
  background-color: var(--primary-100);
  color: var(--primary-900);
}

.badge-secondary {
  background-color: var(--secondary-100);
  color: var(--secondary-900);
}

.badge-success {
  background-color: var(--success-100);
  color: var(--success-900);
}

.badge-warning {
  background-color: var(--warning-100);
  color: var(--warning-900);
}

.badge-error {
  background-color: var(--error-100);
  color: var(--error-900);
}

.badge-info {
  background-color: var(--info-100);
  color: var(--info-900);
}

.badge-neutral {
  background-color: var(--gray-200);
  color: var(--gray-900);
}

/* ============================================================================
   TOAST/NOTIFICATION COMPONENTS
   ============================================================================ */

.toast-container {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  max-width: 420px;
  width: 100%;
}

@media (max-width: 640px) {
  .toast-container {
    bottom: var(--space-4);
    right: var(--space-4);
    left: var(--space-4);
    max-width: none;
  }
}

.toast-v2 {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  background-color: white;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  border-left: 4px solid;
  animation: slideInRight 0.3s ease-out;
  position: relative;
  overflow: hidden;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.toast-v2::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background-color: currentColor;
  animation: toastProgress 5s linear;
}

@keyframes toastProgress {
  from { width: 100%; }
  to { width: 0%; }
}

.toast-v2.toast-success {
  border-left-color: var(--success-500);
}

.toast-v2.toast-error {
  border-left-color: var(--error-500);
}

.toast-v2.toast-warning {
  border-left-color: var(--warning-500);
}

.toast-v2.toast-info {
  border-left-color: var(--info-500);
}

.toast-icon-v2 {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.toast-success .toast-icon-v2 {
  background-color: var(--success-100);
  color: var(--success-700);
}

.toast-error .toast-icon-v2 {
  background-color: var(--error-100);
  color: var(--error-700);
}

.toast-warning .toast-icon-v2 {
  background-color: var(--warning-100);
  color: var(--warning-700);
}

.toast-info .toast-icon-v2 {
  background-color: var(--info-100);
  color: var(--info-700);
}

.toast-content-v2 {
  flex: 1;
  min-width: 0;
}

.toast-title-v2 {
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--color-on-surface);
  margin: 0 0 var(--space-1) 0;
}

.toast-message-v2 {
  font-size: var(--text-sm);
  color: var(--color-on-surface-variant);
  margin: 0;
}

.toast-close-v2 {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border: none;
  background: none;
  color: var(--color-on-surface-variant);
  cursor: pointer;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.toast-close-v2:hover {
  background-color: var(--gray-100);
  color: var(--color-on-surface);
}

/* ============================================================================
   UTILITY CLASSES
   ============================================================================ */

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-fade-in {
  animation: fadeIn var(--transition-base);
}

.animate-slide-up {
  animation: slideUp var(--transition-base);
}

.animate-scale-in {
  animation: scaleIn var(--transition-base);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}


/* ============================================================================
   ANIMATIONS - Card Grid & Interactions
   ============================================================================ */

/* Slide in animation for cards */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-slide-in {
  animation: slideIn 0.3s ease-out forwards;
  opacity: 0;
}

/* Fade in animation */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.animate-fade-in {
  animation: fadeIn 0.2s ease-out;
}

/* Scale in animation for icons */
@keyframes scaleIn {
  from {
    transform: scale(0);
  }
  to {
    transform: scale(1);
  }
}

.animate-scale-in {
  animation: scaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Pulse animation for loading */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Spin animation */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.animate-spin {
  animation: spin 1s linear infinite;
}

/* Progress bar animation */
@keyframes progress {
  from {
    width: 100%;
  }
  to {
    width: 0%;
  }
}

.animate-progress {
  animation: progress 5s linear forwards;
}

/* Bounce animation */
@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.animate-bounce {
  animation: bounce 1s ease-in-out infinite;
}

/* Shake animation for errors */
@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  10%, 30%, 50%, 70%, 90% {
    transform: translateX(-5px);
  }
  20%, 40%, 60%, 80% {
    transform: translateX(5px);
  }
}

.animate-shake {
  animation: shake 0.5s ease-in-out;
}

/* ============================================================================
   CARD HOVER EFFECTS
   ============================================================================ */

.card-hover-lift {
  transition: all 0.2s ease;
}

.card-hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

/* ============================================================================
   SKELETON LOADING
   ============================================================================ */

.skeleton {
  background: linear-gradient(
    90deg,
    #f0f0f0 25%,
    #e0e0e0 50%,
    #f0f0f0 75%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* ============================================================================
   UTILITY CLASSES
   ============================================================================ */

.transition-all {
  transition: all 0.2s ease;
}

.transition-colors {
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.transition-transform {
  transition: transform 0.2s ease;
}

.transition-opacity {
  transition: opacity 0.2s ease;
}

/* ============================================================================
   RESPONSIVE UTILITIES
   ============================================================================ */

@media (max-width: 640px) {
  /* Mobile: Stack cards vertically */
  .grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }
  
  /* Reduce padding on mobile */
  .card {
    padding: 1rem;
  }
  
  /* Smaller text on mobile */
  .text-responsive {
    font-size: 0.875rem;
  }
}

@media (min-width: 641px) and (max-width: 1024px) {
  /* Tablet: 2 columns */
  .md\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1025px) {
  /* Desktop: 3 columns */
  .lg\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ============================================================================
   ACCESSIBILITY
   ============================================================================ */

/* Focus visible for keyboard navigation */
*:focus-visible {
  outline: 2px solid var(--primary-600);
  outline-offset: 2px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .card {
    border-width: 2px;
  }
  
  button {
    border-width: 2px;
  }
}
