/* ===== MODERN CSS VARIABLES ===== */
:root {
  /* Color System - Modern Palette */
  --wcun-primary: #0073aa;
  --wcun-primary-light: #e6f2f8;
  --wcun-primary-dark: #005a87;
  
  --wcun-secondary: #6c757d;
  --wcun-secondary-light: #f8f9fa;
  --wcun-secondary-dark: #545b62;
  
  --wcun-success: #28a745;
  --wcun-success-light: #d4edda;
  --wcun-success-dark: #1e7e34;
  
  --wcun-warning: #ffc107;
  --wcun-warning-light: #fff3cd;
  --wcun-warning-dark: #d39e00;
  
  --wcun-error: #dc3545;
  --wcun-error-light: #f8d7da;
  --wcun-error-dark: #bd2130;
  
  --wcun-info: #17a2b8;
  --wcun-info-light: #d1ecf1;
  --wcun-info-dark: #138496;
  
  /* Brand Colors */
  --wcun-whatsapp: #25d366;
  --wcun-whatsapp-light: #dcf8c6;
  --wcun-whatsapp-dark: #1da851;
  
  /* Neutral Colors */
  --wcun-white: #ffffff;
  --wcun-light-gray: #f8f9fa;
  --wcun-gray: #6c757d;
  --wcun-dark: #212529;
  --wcun-darker: #1a1d20;
  
  /* Surface Colors */
  --wcun-surface-50: #f8f9fa;
  --wcun-surface-100: #e9ecef;
  --wcun-surface-200: #dee2e6;
  --wcun-surface-300: #ced4da;
  --wcun-surface-400: #adb5bd;
  
  /* Semantic Colors */
  --wcun-notification: #ff4757;
  --wcun-notification-light: #ffeaea;
  
  /* Shadows - Material Design Inspired */
  --wcun-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
  --wcun-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --wcun-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --wcun-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --wcun-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --wcun-shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --wcun-shadow-inner: inset 0 2px 4px rgba(0, 0, 0, 0.06);
  
  /* Border Radius - Modern Scale */
  --wcun-radius-sm: 0.25rem;    /* 4px */
  --wcun-radius: 0.5rem;        /* 8px */
  --wcun-radius-md: 0.75rem;    /* 12px */
  --wcun-radius-lg: 1rem;       /* 16px */
  --wcun-radius-xl: 1.5rem;     /* 24px */
  --wcun-radius-full: 9999px;   /* Fully rounded */
  
  /* Transitions - Modern Timing Functions */
  --wcun-transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --wcun-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --wcun-transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Spacing - 8-point Grid System */
  --wcun-space-1: 0.25rem;   /* 4px */
  --wcun-space-2: 0.5rem;    /* 8px */
  --wcun-space-3: 0.75rem;   /* 12px */
  --wcun-space-4: 1rem;      /* 16px */
  --wcun-space-5: 1.25rem;   /* 20px */
  --wcun-space-6: 1.5rem;    /* 24px */
  --wcun-space-8: 2rem;      /* 32px */
  --wcun-space-10: 2.5rem;   /* 40px */
  --wcun-space-12: 3rem;     /* 48px */
  
  /* Typography */
  --wcun-font-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Courier New', monospace;
  --wcun-font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
  
  /* Z-index Layers */
  --wcun-z-dropdown: 1000;
  --wcun-z-sticky: 1020;
  --wcun-z-modal: 1050;
  --wcun-z-popover: 1060;
  --wcun-z-tooltip: 1070;
}

/* Dark Mode Variables */
@media (prefers-color-scheme: dark) {
  :root {
    --wcun-primary: #58a6ff;
    --wcun-primary-light: #1a365d;
    --wcun-primary-dark: #388bfd;
    
    --wcun-secondary: #8b949e;
    --wcun-secondary-light: #21262d;
    --wcun-secondary-dark: #6e7681;
    
    --wcun-success: #238636;
    --wcun-success-light: #132f23;
    --wcun-success-dark: #2ea043;
    
    --wcun-warning: #d29922;
    --wcun-warning-light: #3d2c00;
    --wcun-warning-dark: #f0883e;
    
    --wcun-error: #f85149;
    --wcun-error-light: #490202;
    --wcun-error-dark: #da3633;
    
    --wcun-info: #58a6ff;
    --wcun-info-light: #0c2d6b;
    --wcun-info-dark: #388bfd;
    
    --wcun-whatsapp: #25d366;
    --wcun-whatsapp-light: #0d3b1e;
    --wcun-whatsapp-dark: #1da851;
    
    --wcun-white: #0d1117;
    --wcun-light-gray: #161b22;
    --wcun-gray: #8b949e;
    --wcun-dark: #f0f6fc;
    --wcun-darker: #ffffff;
    
    --wcun-surface-50: #0d1117;
    --wcun-surface-100: #161b22;
    --wcun-surface-200: #21262d;
    --wcun-surface-300: #30363d;
    --wcun-surface-400: #484f58;
    
    --wcun-notification: #ff7b72;
    --wcun-notification-light: #490202;
  }
}

/* ===== MODERN MODAL STYLES ===== */
.wcun-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.75);
  z-index: var(--wcun-z-modal);
  align-items: center;
  justify-content: center;
  padding: var(--wcun-space-4);
  overflow-y: auto;
  animation: wcun-modal-backdrop-fade 0.3s ease;
}

.wcun-modal.show {
  display: flex !important;
}

@keyframes wcun-modal-backdrop-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.wcun-modal-content {
  background: var(--wcun-white);
  border-radius: var(--wcun-radius-lg);
  box-shadow: var(--wcun-shadow-2xl);
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  animation: wcun-modal-slide-up 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  border: 1px solid var(--wcun-surface-200);
}

@keyframes wcun-modal-slide-up {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.wcun-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--wcun-space-6);
  background: var(--wcun-light-gray);
  border-bottom: 1px solid var(--wcun-surface-200);
  position: sticky;
  top: 0;
  z-index: 1;
}

.wcun-modal-header h3 {
  margin: 0;
  color: var(--wcun-dark);
  font-size: 1.5rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: var(--wcun-space-3);
}

.wcun-modal-header h3::before {
  content: '';
  width: 4px;
  height: 24px;
  background: var(--wcun-primary);
  border-radius: var(--wcun-radius-full);
}

.wcun-modal-close {
  background: none;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: var(--wcun-radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--wcun-gray);
  font-size: 1.5rem;
  transition: var(--wcun-transition-fast);
  position: relative;
  overflow: hidden;
}

.wcun-modal-close::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: var(--wcun-surface-200);
  opacity: 0;
  transition: var(--wcun-transition-fast);
}

.wcun-modal-close:hover::before {
  opacity: 1;
}

.wcun-modal-close:hover {
  color: var(--wcun-dark);
  transform: rotate(90deg);
}

.wcun-modal-body {
  padding: var(--wcun-space-6);
  max-height: 70vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--wcun-surface-300) transparent;
}

.wcun-modal-body::-webkit-scrollbar {
  width: 8px;
}

.wcun-modal-body::-webkit-scrollbar-track {
  background: transparent;
}

.wcun-modal-body::-webkit-scrollbar-thumb {
  background: var(--wcun-surface-300);
  border-radius: var(--wcun-radius-full);
}

.wcun-modal-body::-webkit-scrollbar-thumb:hover {
  background: var(--wcun-surface-400);
}

.wcun-modal-open {
  overflow: hidden;
  padding-right: 8px; /* Prevent layout shift when scrollbar disappears */
}

/* ===== MODERN LOADING STATES ===== */
.wcun-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--wcun-space-12);
  gap: var(--wcun-space-4);
}

.wcun-loading-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--wcun-surface-200);
  border-top-color: var(--wcun-primary);
  border-radius: 50%;
  animation: wcun-spin 1s linear infinite;
}

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

.wcun-loading-text {
  color: var(--wcun-gray);
  font-size: 0.875rem;
  font-weight: 500;
}

.wcun-skeleton {
  background: linear-gradient(90deg, 
    var(--wcun-surface-100) 25%, 
    var(--wcun-surface-200) 50%, 
    var(--wcun-surface-100) 75%);
  background-size: 200% 100%;
  animation: wcun-skeleton-loading 1.5s infinite;
  border-radius: var(--wcun-radius);
}

@keyframes wcun-skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ===== MODERN BUTTONS ===== */
.wcun-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--wcun-space-2);
  padding: 0.625rem 1.25rem;
  margin: var(--wcun-space-1) 0;
  text-decoration: none;
  border-radius: var(--wcun-radius);
  font-weight: 600;
  font-size: 0.875rem;
  line-height: 1.5;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: var(--wcun-transition);
  position: relative;
  overflow: hidden;
  user-select: none;
}

.wcun-button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.wcun-button:active::before {
  width: 300px;
  height: 300px;
}

/* Button Variants */
.wcun-button-primary {
  background: linear-gradient(135deg, var(--wcun-primary), var(--wcun-primary-dark));
  color: var(--wcun-white);
  box-shadow: var(--wcun-shadow-sm);
}

.wcun-button-primary:hover,
.wcun-button-primary:focus {
  background: linear-gradient(135deg, var(--wcun-primary-dark), var(--wcun-primary));
  transform: translateY(-2px);
  box-shadow: var(--wcun-shadow-md);
}

.wcun-button-secondary {
  background: linear-gradient(135deg, var(--wcun-secondary), var(--wcun-secondary-dark));
  color: var(--wcun-white);
}

.wcun-button-success {
  background: linear-gradient(135deg, var(--wcun-success), var(--wcun-success-dark));
  color: var(--wcun-white);
}

.wcun-button-error {
  background: linear-gradient(135deg, var(--wcun-error), var(--wcun-error-dark));
  color: var(--wcun-white);
}

.wcun-button-warning {
  background: linear-gradient(135deg, var(--wcun-warning), var(--wcun-warning-dark));
  color: var(--wcun-dark);
}

.wcun-button-outline {
  background: transparent;
  border: 2px solid var(--wcun-primary);
  color: var(--wcun-primary);
}

.wcun-button-outline:hover {
  background: var(--wcun-primary);
  color: var(--wcun-white);
}

.wcun-button-ghost {
  background: transparent;
  color: var(--wcun-primary);
}

.wcun-button-ghost:hover {
  background: var(--wcun-primary-light);
}

/* Button Sizes */
.wcun-button-small {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
}

.wcun-button-large {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

/* Button States */
.wcun-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.wcun-button:focus {
  outline: 2px solid var(--wcun-primary);
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.wcun-button-loading {
  pointer-events: none;
  opacity: 0.8;
}

.wcun-button-loading::after {
  content: '';
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: wcun-spin 1s linear infinite;
  margin-left: var(--wcun-space-2);
}

/* ===== MODERN NOTICE BOXES ===== */
.wcun-notice {
  border-left: 4px solid transparent;
  padding: var(--wcun-space-4);
  margin: var(--wcun-space-4) 0;
  background: var(--wcun-white);
  border-radius: var(--wcun-radius);
  box-shadow: var(--wcun-shadow-sm);
  transition: var(--wcun-transition);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--wcun-surface-200);
}

.wcun-notice::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 4px;
  background: currentColor;
}

.wcun-notice:hover {
  box-shadow: var(--wcun-shadow-md);
  transform: translateY(-2px);
}

.wcun-notice-header {
  display: flex;
  align-items: center;
  gap: var(--wcun-space-2);
  margin-bottom: var(--wcun-space-2);
  font-weight: 600;
}

.wcun-notice-header::before {
  font-size: 1.25rem;
}

.wcun-success {
  border-left-color: var(--wcun-success);
  background: var(--wcun-success-light);
}

.wcun-success .wcun-notice-header::before {
  content: '✓';
  color: var(--wcun-success);
}

.wcun-warning {
  border-left-color: var(--wcun-warning);
  background: var(--wcun-warning-light);
}

.wcun-warning .wcun-notice-header::before {
  content: '⚠';
  color: var(--wcun-warning);
}

.wcun-error {
  border-left-color: var(--wcun-error);
  background: var(--wcun-error-light);
}

.wcun-error .wcun-notice-header::before {
  content: '✗';
  color: var(--wcun-error);
}

.wcun-info {
  border-left-color: var(--wcun-info);
  background: var(--wcun-info-light);
}

.wcun-info .wcun-notice-header::before {
  content: 'ℹ';
  color: var(--wcun-info);
}

.wcun-notice-dismiss {
  position: absolute;
  top: var(--wcun-space-2);
  right: var(--wcun-space-2);
  background: none;
  border: none;
  color: var(--wcun-gray);
  cursor: pointer;
  padding: var(--wcun-space-1);
  border-radius: var(--wcun-radius-sm);
  transition: var(--wcun-transition-fast);
}

.wcun-notice-dismiss:hover {
  background: rgba(0, 0, 0, 0.1);
  color: var(--wcun-dark);
}

/* ===== MODERN BADGES ===== */
.wcun-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--wcun-space-1);
  padding: 0.25rem 0.625rem;
  border-radius: var(--wcun-radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  border: 1px solid transparent;
  transition: var(--wcun-transition-fast);
}

.wcun-badge-sm {
  padding: 0.125rem 0.375rem;
  font-size: 0.6875rem;
}

.wcun-badge-lg {
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
}

.wcun-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.wcun-badge-info {
  background: var(--wcun-info-light);
  color: var(--wcun-info-dark);
  border-color: var(--wcun-info);
}

.wcun-badge-success {
  background: var(--wcun-success-light);
  color: var(--wcun-success-dark);
  border-color: var(--wcun-success);
}

.wcun-badge-warning {
  background: var(--wcun-warning-light);
  color: var(--wcun-warning-dark);
  border-color: var(--wcun-warning);
}

.wcun-badge-error {
  background: var(--wcun-error-light);
  color: var(--wcun-error-dark);
  border-color: var(--wcun-error);
}

.wcun-badge-unread {
  background: var(--wcun-error-light);
  color: var(--wcun-error);
  border-color: var(--wcun-error);
  animation: wcun-badge-pulse 2s infinite;
}

@keyframes wcun-badge-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.wcun-badge-read {
  background: var(--wcun-success-light);
  color: var(--wcun-success);
  border-color: var(--wcun-success);
}

/* ===== MODERN WHATSAPP STYLES ===== */
.wcun-whatsapp-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--wcun-space-2);
  padding: 0.75rem 1.5rem;
  border-radius: var(--wcun-radius);
  border: 2px solid var(--wcun-whatsapp);
  text-decoration: none;
  color: var(--wcun-white);
  font-weight: 600;
  background: linear-gradient(135deg, var(--wcun-whatsapp), var(--wcun-whatsapp-dark));
  transition: var(--wcun-transition);
  position: relative;
  overflow: hidden;
}

.wcun-whatsapp-button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.wcun-whatsapp-button:hover::before {
  width: 300px;
  height: 300px;
}

.wcun-whatsapp-button:hover,
.wcun-whatsapp-button:focus {
  transform: translateY(-2px);
  box-shadow: var(--wcun-shadow-md);
}

.wcun-whatsapp-button::after {
  content: '💬';
  font-size: 1.25rem;
}

.wcun-whatsapp-copy {
  display: flex;
  align-items: center;
  gap: var(--wcun-space-3);
  margin-bottom: var(--wcun-space-4);
  flex-wrap: wrap;
  background: var(--wcun-light-gray);
  padding: var(--wcun-space-4);
  border-radius: var(--wcun-radius);
  border: 1px solid var(--wcun-surface-200);
}

.wcun-whatsapp-copy code {
  background: var(--wcun-white);
  padding: var(--wcun-space-3);
  border-radius: var(--wcun-radius-sm);
  font-family: var(--wcun-font-mono);
  font-size: 0.875rem;
  border: 1px solid var(--wcun-surface-200);
  flex: 1;
  min-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wcun-copy-feedback {
  color: var(--wcun-success);
  font-weight: 600;
  font-size: 0.875rem;
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  display: flex;
  align-items: center;
  gap: var(--wcun-space-1);
}

.wcun-copy-feedback::before {
  content: '✓';
}

.wcun-copy-feedback.show {
  opacity: 1;
  transform: translateX(0);
}

/* ===== MODERN CARDS ===== */
.cardufc {
  background: var(--wcun-white);
  border: 1px solid var(--wcun-surface-200);
  border-radius: var(--wcun-radius-lg);
  box-shadow: var(--wcun-shadow-sm);
  padding: var(--wcun-space-6);
  margin: var(--wcun-space-6) 0;
  transition: var(--wcun-transition);
  overflow: hidden;
}

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

.cardufc-header {
  margin-bottom: var(--wcun-space-4);
  padding-bottom: var(--wcun-space-4);
  border-bottom: 2px solid var(--wcun-surface-100);
  position: relative;
}

.cardufc-header::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background: var(--wcun-primary);
  border-radius: var(--wcun-radius-full);
}

.cardufc h2,
.cardufc h3,
.cardufc h4 {
  margin: 0;
  color: var(--wcun-dark);
  font-weight: 600;
}

.cardufc .description {
  color: var(--wcun-gray);
  font-size: 0.875rem;
  line-height: 1.6;
  margin: var(--wcun-space-2) 0 var(--wcun-space-4);
}

/* Card Variants */
.cardufc-primary {
  border-top: 4px solid var(--wcun-primary);
}

.cardufc-success {
  border-top: 4px solid var(--wcun-success);
}

.cardufc-warning {
  border-top: 4px solid var(--wcun-warning);
}

.cardufc-error {
  border-top: 4px solid var(--wcun-error);
}

/* ===== MODERN TABLES ===== */
.wcun-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: var(--wcun-space-6) 0;
  border-radius: var(--wcun-radius);
  overflow: hidden;
  box-shadow: var(--wcun-shadow-sm);
  background: var(--wcun-white);
}

.wcun-table th {
  background: linear-gradient(135deg, var(--wcun-surface-50), var(--wcun-surface-100));
  font-weight: 600;
  text-align: left;
  padding: var(--wcun-space-4);
  border-bottom: 2px solid var(--wcun-surface-200);
  color: var(--wcun-dark);
  white-space: nowrap;
}

.wcun-table td {
  padding: var(--wcun-space-4);
  border-bottom: 1px solid var(--wcun-surface-100);
  transition: var(--wcun-transition-fast);
}

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

.wcun-table tr:hover td {
  background: var(--wcun-surface-50);
}

.wcun-table-striped tr:nth-child(even) {
  background: var(--wcun-surface-50);
}

.wcun-table-compact th,
.wcun-table-compact td {
  padding: var(--wcun-space-2) var(--wcun-space-4);
}

.wcun-table-bordered {
  border: 1px solid var(--wcun-surface-200);
}

.wcun-table-bordered th,
.wcun-table-bordered td {
  border-right: 1px solid var(--wcun-surface-200);
}

.wcun-table-bordered th:last-child,
.wcun-table-bordered td:last-child {
  border-right: none;
}

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

.wcun-form-label {
  display: block;
  margin-bottom: var(--wcun-space-2);
  font-weight: 600;
  color: var(--wcun-dark);
  font-size: 0.875rem;
}

.wcun-form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--wcun-surface-200);
  border-radius: var(--wcun-radius);
  font-size: 0.875rem;
  transition: var(--wcun-transition-fast);
  background: var(--wcun-white);
  color: var(--wcun-dark);
}

.wcun-form-input:focus {
  border-color: var(--wcun-primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.wcun-form-input::placeholder {
  color: var(--wcun-gray);
  opacity: 0.7;
}

.wcun-form-select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--wcun-surface-200);
  border-radius: var(--wcun-radius);
  font-size: 0.875rem;
  background: var(--wcun-white);
  color: var(--wcun-dark);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236c757d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 16px;
}

.wcun-form-textarea {
  width: 100%;
  min-height: 120px;
  padding: 0.75rem 1rem;
  border: 2px solid var(--wcun-surface-200);
  border-radius: var(--wcun-radius);
  font-size: 0.875rem;
  font-family: inherit;
  resize: vertical;
  background: var(--wcun-white);
  color: var(--wcun-dark);
}

/* Form Validation States */
.wcun-form-input.wcun-is-valid {
  border-color: var(--wcun-success);
}

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

.wcun-form-feedback {
  font-size: 0.75rem;
  margin-top: var(--wcun-space-1);
  display: flex;
  align-items: center;
  gap: var(--wcun-space-1);
}

.wcun-form-feedback-valid {
  color: var(--wcun-success);
}

.wcun-form-feedback-invalid {
  color: var(--wcun-error);
}

/* Form Group Variants */
.wcun-form-group-inline {
  display: flex;
  gap: var(--wcun-space-3);
  align-items: center;
}

/* ===== MODERN UTILITIES ===== */
/* Flex Utilities */
.wcun-flex { display: flex; }
.wcun-inline-flex { display: inline-flex; }
.wcun-flex-col { flex-direction: column; }
.wcun-flex-row { flex-direction: row; }
.wcun-flex-wrap { flex-wrap: wrap; }
.wcun-flex-nowrap { flex-wrap: nowrap; }
.wcun-flex-1 { flex: 1 1 0%; }
.wcun-flex-auto { flex: 1 1 auto; }
.wcun-flex-none { flex: none; }

/* Grid Utilities */
.wcun-grid { display: grid; }
.wcun-grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.wcun-grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.wcun-grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.wcun-grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* Gap Utilities */
.wcun-gap-1 { gap: var(--wcun-space-1); }
.wcun-gap-2 { gap: var(--wcun-space-2); }
.wcun-gap-3 { gap: var(--wcun-space-3); }
.wcun-gap-4 { gap: var(--wcun-space-4); }
.wcun-gap-6 { gap: var(--wcun-space-6); }

/* Alignment Utilities */
.wcun-items-center { align-items: center; }
.wcun-items-start { align-items: flex-start; }
.wcun-items-end { align-items: flex-end; }
.wcun-items-stretch { align-items: stretch; }
.wcun-justify-center { justify-content: center; }
.wcun-justify-between { justify-content: space-between; }
.wcun-justify-start { justify-content: flex-start; }
.wcun-justify-end { justify-content: flex-end; }

/* Text Utilities */
.wcun-text-center { text-align: center; }
.wcun-text-right { text-align: right; }
.wcun-text-left { text-align: left; }
.wcun-text-justify { text-align: justify; }

.wcun-text-xs { font-size: 0.75rem; }
.wcun-text-sm { font-size: 0.875rem; }
.wcun-text-base { font-size: 1rem; }
.wcun-text-lg { font-size: 1.125rem; }
.wcun-text-xl { font-size: 1.25rem; }

.wcun-font-light { font-weight: 300; }
.wcun-font-normal { font-weight: 400; }
.wcun-font-medium { font-weight: 500; }
.wcun-font-semibold { font-weight: 600; }
.wcun-font-bold { font-weight: 700; }

/* Margin & Padding Utilities */
.wcun-mt-1 { margin-top: var(--wcun-space-1); }
.wcun-mt-2 { margin-top: var(--wcun-space-2); }
.wcun-mt-3 { margin-top: var(--wcun-space-3); }
.wcun-mt-4 { margin-top: var(--wcun-space-4); }
.wcun-mt-6 { margin-top: var(--wcun-space-6); }
.wcun-mt-8 { margin-top: var(--wcun-space-8); }

.wcun-mb-1 { margin-bottom: var(--wcun-space-1); }
.wcun-mb-2 { margin-bottom: var(--wcun-space-2); }
.wcun-mb-3 { margin-bottom: var(--wcun-space-3); }
.wcun-mb-4 { margin-bottom: var(--wcun-space-4); }
.wcun-mb-6 { margin-bottom: var(--wcun-space-6); }
.wcun-mb-8 { margin-bottom: var(--wcun-space-8); }

.wcun-ml-1 { margin-left: var(--wcun-space-1); }
.wcun-ml-2 { margin-left: var(--wcun-space-2); }
.wcun-ml-3 { margin-left: var(--wcun-space-3); }
.wcun-ml-4 { margin-left: var(--wcun-space-4); }

.wcun-mr-1 { margin-right: var(--wcun-space-1); }
.wcun-mr-2 { margin-right: var(--wcun-space-2); }
.wcun-mr-3 { margin-right: var(--wcun-space-3); }
.wcun-mr-4 { margin-right: var(--wcun-space-4); }

.wcun-pt-1 { padding-top: var(--wcun-space-1); }
.wcun-pt-2 { padding-top: var(--wcun-space-2); }
.wcun-pt-3 { padding-top: var(--wcun-space-3); }
.wcun-pt-4 { padding-top: var(--wcun-space-4); }
.wcun-pt-6 { padding-top: var(--wcun-space-6); }

.wcun-pb-1 { padding-bottom: var(--wcun-space-1); }
.wcun-pb-2 { padding-bottom: var(--wcun-space-2); }
.wcun-pb-3 { padding-bottom: var(--wcun-space-3); }
.wcun-pb-4 { padding-bottom: var(--wcun-space-4); }
.wcun-pb-6 { padding-bottom: var(--wcun-space-6); }

.wcun-pl-1 { padding-left: var(--wcun-space-1); }
.wcun-pl-2 { padding-left: var(--wcun-space-2); }
.wcun-pl-3 { padding-left: var(--wcun-space-3); }
.wcun-pl-4 { padding-left: var(--wcun-space-4); }

.wcun-pr-1 { padding-right: var(--wcun-space-1); }
.wcun-pr-2 { padding-right: var(--wcun-space-2); }
.wcun-pr-3 { padding-right: var(--wcun-space-3); }
.wcun-pr-4 { padding-right: var(--wcun-space-4); }

/* Width & Height Utilities */
.wcun-w-full { width: 100%; }
.wcun-w-auto { width: auto; }
.wcun-w-1\/2 { width: 50%; }
.wcun-w-1\/3 { width: 33.333333%; }
.wcun-w-2\/3 { width: 66.666667%; }
.wcun-w-1\/4 { width: 25%; }
.wcun-w-3\/4 { width: 75%; }

.wcun-h-full { height: 100%; }
.wcun-h-auto { height: auto; }
.wcun-h-screen { height: 100vh; }

/* Border Utilities */
.wcun-border { border: 1px solid var(--wcun-surface-200); }
.wcun-border-t { border-top: 1px solid var(--wcun-surface-200); }
.wcun-border-b { border-bottom: 1px solid var(--wcun-surface-200); }
.wcun-border-l { border-left: 1px solid var(--wcun-surface-200); }
.wcun-border-r { border-right: 1px solid var(--wcun-surface-200); }

/* Border Radius Utilities */
.wcun-rounded-sm { border-radius: var(--wcun-radius-sm); }
.wcun-rounded { border-radius: var(--wcun-radius); }
.wcun-rounded-md { border-radius: var(--wcun-radius-md); }
.wcun-rounded-lg { border-radius: var(--wcun-radius-lg); }
.wcun-rounded-xl { border-radius: var(--wcun-radius-xl); }
.wcun-rounded-full { border-radius: var(--wcun-radius-full); }

/* Shadow Utilities */
.wcun-shadow-sm { box-shadow: var(--wcun-shadow-sm); }
.wcun-shadow { box-shadow: var(--wcun-shadow-md); }
.wcun-shadow-md { box-shadow: var(--wcun-shadow-lg); }
.wcun-shadow-lg { box-shadow: var(--wcun-shadow-xl); }
.wcun-shadow-xl { box-shadow: var(--wcun-shadow-2xl); }
.wcun-shadow-inner { box-shadow: var(--wcun-shadow-inner); }

/* Display Utilities */
.wcun-block { display: block; }
.wcun-inline-block { display: inline-block; }
.wcun-inline { display: inline; }
.wcun-hidden { display: none !important; }

.wcun-clearfix::after {
  content: "";
  display: table;
  clear: both;
}

/* ===== ACCESSIBILITY ===== */
.wcun-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;
}

/* Focus Visible Polyfill */
.wcun-focus-visible {
  outline: 2px solid var(--wcun-primary);
  outline-offset: 2px;
}

/* ===== RESPONSIVE BREAKPOINTS ===== */
/* Mobile First Approach */

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) {
  .wcun-sm-flex { display: flex; }
  .wcun-sm-grid { display: grid; }
  .wcun-sm-hidden { display: none !important; }
  .wcun-sm-text-center { text-align: center; }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
  .wcun-md-flex { display: flex; }
  .wcun-md-grid { display: grid; }
  .wcun-md-hidden { display: none !important; }
  .wcun-md-text-center { text-align: center; }
  .wcun-grid-cols-md-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wcun-grid-cols-md-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .wcun-grid-cols-md-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
  .wcun-lg-flex { display: flex; }
  .wcun-lg-grid { display: grid; }
  .wcun-lg-hidden { display: none !important; }
  .wcun-lg-text-center { text-align: center; }
  .wcun-grid-cols-lg-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wcun-grid-cols-lg-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .wcun-grid-cols-lg-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
  .wcun-xl-flex { display: flex; }
  .wcun-xl-grid { display: grid; }
  .wcun-xl-hidden { display: none !important; }
  .wcun-xl-text-center { text-align: center; }
  .wcun-grid-cols-xl-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wcun-grid-cols-xl-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .wcun-grid-cols-xl-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .wcun-grid-cols-xl-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

/* ===== PRINT STYLES ===== */
@media print {
  .wcun-no-print {
    display: none !important;
  }
  
  .wcun-print-only {
    display: block !important;
  }
  
  .wcun-notice {
    break-inside: avoid;
    border: 1px solid #000 !important;
    box-shadow: none !important;
    background: white !important;
    color: black !important;
  }
  
  .wcun-button,
  .wcun-whatsapp-button,
  .wcun-modal {
    display: none !important;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.5;
  }
  
  a {
    color: #000 !important;
    text-decoration: underline !important;
  }
}

/* ===== REDUCED MOTION ===== */
@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;
  }
}

/* ===== TOUCH DEVICE OPTIMIZATIONS ===== */
@media (hover: none) and (pointer: coarse) {
  .wcun-button,
  .wcun-whatsapp-button {
    min-height: 44px;
    min-width: 44px;
  }
  
  .wcun-form-input,
  .wcun-form-select,
  .wcun-form-textarea {
    font-size: 16px; /* Prevents iOS zoom on focus */
  }
  
  .wcun-button:hover,
  .wcun-whatsapp-button:hover {
    transform: none;
  }
  
  .wcun-button:active,
  .wcun-whatsapp-button:active {
    transform: scale(0.98);
  }
}

/* ===== HIGH CONTRAST MODE SUPPORT ===== */
@media (prefers-contrast: high) {
  :root {
    --wcun-primary: #004466;
    --wcun-success: #006600;
    --wcun-error: #990000;
    --wcun-warning: #996600;
    --wcun-info: #006699;
  }
  
  .wcun-button {
    border: 2px solid currentColor;
  }
  
  .wcun-notice {
    border: 2px solid currentColor;
  }
}