/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   MAILOUTLY GLOBAL STYLES
   Professional SaaS Design System
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

:root {
  /* Brand Colors */
  --primary: #4F46E5;
  --primary-dark: #4338CA;
  --primary-light: #6366F1;
  --success: #10B981;
  --error: #EF4444;
  --warning: #F59E0B;
  
  /* Neutrals */
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;
  
  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 0.75rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  
  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  
  /* Shadows */
  --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 -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   RESET & BASE
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--gray-800);
  background-color: white;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--gray-900);
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.875rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: var(--spacing-md);
  color: #000000;
}

a {
  text-decoration: none;
  color: var(--primary);
  transition: color 0.2s;
}

a:hover {
  color: var(--primary-dark);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   BUTTONS
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-lg);
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  gap: 0.5rem;
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-secondary {
  background: white;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-secondary:hover {
  background: var(--gray-50);
}

.btn-large {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

.btn-block {
  width: 100%;
}

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

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   FORMS
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.form-group {
  margin-bottom: var(--spacing-lg);
}

.form-label {
  display: block;
  margin-bottom: var(--spacing-xs);
  font-weight: 500;
  color: var(--gray-700);
  font-size: 0.875rem;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 2px solid var(--gray-300);
  border-radius: var(--radius-md);
  transition: all 0.2s;
  background: white;
  color: var(--gray-900);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

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

.form-helper {
  display: block;
  margin-top: var(--spacing-xs);
  font-size: 0.875rem;
  color: var(--gray-500);
}

.form-error {
  color: var(--error);
  font-size: 0.875rem;
  margin-top: var(--spacing-xs);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   CARDS
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.card {
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  padding: var(--spacing-xl);
  transition: all 0.3s;
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.card-header {
  margin-bottom: var(--spacing-lg);
}

.card-title {
  font-size: 1.5rem;
  margin-bottom: var(--spacing-xs);
}

.card-subtitle {
  color: var(--gray-500);
  font-size: 0.875rem;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   ALERTS
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-lg);
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.alert-success {
  background: #D1FAE5;
  color: #065F46;
  border: 1px solid #10B981;
}

.alert-error {
  background: #FEE2E2;
  color: #991B1B;
  border: 1px solid #EF4444;
}

.alert-warning {
  background: #FEF3C7;
  color: #92400E;
  border: 1px solid #F59E0B;
}

.alert-info {
  background: #DBEAFE;
  color: #1E40AF;
  border: 1px solid #3B82F6;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   CONTAINER & LAYOUT
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

.section {
  padding: var(--spacing-2xl) 0;
}

.text-center {
  text-align: center;
}

.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }
.mb-xl { margin-bottom: var(--spacing-xl); }
.mb-2xl { margin-bottom: var(--spacing-2xl); }

.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }
.mt-xl { margin-top: var(--spacing-xl); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   UTILITY CLASSES
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.hidden {
  display: none !important;
}

.loading {
  pointer-events: none;
  opacity: 0.6;
}

.badge {
  display: inline-flex;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.badge-success {
  background: var(--success);
  color: white;
}

.badge-error {
  background: var(--error);
  color: white;
}

.badge-warning {
  background: var(--warning);
  color: white;
}

.badge-primary {
  background: var(--primary);
  color: white;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   ANIMATIONS
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { 
    opacity: 0;
    transform: translateY(20px);
  }
  to { 
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeIn 0.3s ease-in;
}

.animate-slide-up {
  animation: slideUp 0.4s ease-out;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   RESPONSIVE
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

@media (max-width: 768px) {
  h1 { font-size: 2.5rem; }
  h2 { font-size: 2rem; }
  h3 { font-size: 1.5rem; }
  
  .container {
    padding: 0 var(--spacing-md);
  }
  
  .section {
    padding: var(--spacing-xl) 0;
  }
}
