/* Reset and Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Waah Foundation Colors */
  --primary-green: #10b981;
  --primary-green-dark: #059669;
  --secondary-green: #a7f3d0;
  --warning-yellow: #fbbf24;
  --danger-red: #ef4444;
  --neutral-white: #ffffff;
  --neutral-grey: #6b7280;
  --text-dark: #1f2937;
  --text-light: #9ca3af;
  --bg-light: #f9fafb;
  --border-color: #e5e7eb;

  /* Spacing Scale */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --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);
}

/* Typography */
body {
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--bg-light);
  font-size: 16px;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 1rem;
}

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

p {
  margin-bottom: 1rem;
  color: var(--neutral-grey);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-xl);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  outline: none;
  min-height: 48px;
}

.btn:focus {
  box-shadow: 0 0 0 3px rgb(16 185 129 / 0.3);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-green), var(--primary-green-dark));
  color: var(--neutral-white);
}

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

.btn-secondary {
  background: var(--neutral-white);
  color: var(--primary-green);
  border-color: var(--primary-green);
}

.btn-secondary:hover {
  background: var(--primary-green);
  color: var(--neutral-white);
}

.btn-full {
  width: 100%;
}

/* Cards */
.card {
  background: var(--neutral-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: var(--space-xl);
  margin-bottom: var(--space-lg);
}

.card-header, .card-body, .card-footer {
  padding: var(--space-md) 0;
}

.card-header {
  border-bottom: 1px solid var(--border-color);
}

.card-footer {
  border-top: 1px solid var(--border-color);
}

/* Forms */
.form-group {
  margin-bottom: var(--space-lg);
}

.form-label {
  display: block;
  margin-bottom: var(--space-xs);
  font-weight: 500;
  color: var(--text-dark);
  font-size: 0.875rem;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: var(--space-md);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 1rem;
  transition: border-color 0.2s ease;
  outline: none;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary-green);
}

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

/* QR Code Styling */
.qr-code {
  display: block;
  margin: 0 auto;
  border: 3px solid var(--neutral-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}

.qr-code-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  background: var(--neutral-white);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  margin: var(--space-xl) 0;
}

.progress-bar {
  width: 100%;
  height: 36px;
  background: var(--border-color);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-green), var(--secondary-green));
  transition: width 0.6s ease;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: var(--space-md);
  color: var(--text-dark);
  font-weight: 700;
  font-size: 14px;
  text-shadow: none;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.flex { display: flex; }
.inline-flex { display: inline-flex; }
.block { display: block; }
.inline { display: inline; }

.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.align-center { align-items: center; }

.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

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

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

.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }

.text-bold { font-weight: 700; }
.text-semibold { font-weight: 600; }
.text-medium { font-weight: 500; }

.text-green { color: var(--primary-green); }
.text-white { color: var(--neutral-white); }
.text-grey { color: var(--neutral-grey); }

.bg-green { background: var(--primary-green); }
.bg-white { background: var(--neutral-white); }

/* Animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
}

/* Responsive Design */
@media (max-width: 768px) {
  :root {
    --space-md: 0.75rem;
    --space-lg: 1rem;
    --space-xl: 1.25rem;
    --space-2xl: 1.5rem;
  }

  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }

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

  .btn {
    min-height: 44px;
  }
}

@media (max-width: 480px) {
  :root {
    --space-md: 0.5rem;
    --space-lg: 0.75rem;
    --space-xl: 1rem;
  }

  .btn {
    min-height: 40px;
    padding: var(--space-md) var(--space-lg);
  }

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