/* =================================
   MODERN DESIGN SYSTEM
   Color Palette: #EEEEEE, #00ADB5, #393E46, #222831
==================================== */

:root {
  /* Core Colors */
  --color-darkest: #222831;
  --color-dark: #393e46;
  --color-accent: #00adb5;
  --color-light: #eeeeee;

  /* Background Colors */
  --bg-primary: #eeeeee;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f8f9fa;
  --bg-dark: #222831;
  --bg-dark-secondary: #393e46;

  /* Text Colors */
  --text-primary: #222831;
  --text-secondary: #393e46;
  --text-muted: #6c757d;
  --text-light: #ffffff;

  /* Border Colors */
  --border: #dee2e6;
  --border-light: #e9ecef;
  --border-dark: #393e46;

  /* Accent Colors */
  --accent-primary: #00adb5;
  --accent-primary-hover: #008c94;
  --accent-primary-light: rgba(0, 173, 181, 0.1);
  --accent-green: #28a745;
  --accent-red: #dc3545;
  --accent-orange: #fd7e14;
  --accent-yellow: #ffc107;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  --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);

  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 16px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
}

/* =================================
   TYPOGRAPHY
==================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 1rem;
  line-height: 1.3;
}

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

p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

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

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

hr {
  border: none;
  height: 1px;
  background-color: var(--border);
  margin: 2rem 0;
}

/* =================================
   BUTTONS
==================================== */

button,
.btn {
  background-color: var(--accent-primary);
  color: var(--text-light);
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-block;
  box-shadow: var(--shadow-sm);
  line-height: 1.5;
}

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

button:active,
.btn:active {
  transform: translateY(0);
}

button:disabled,
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background-color: var(--bg-card-hover);
  border-color: var(--border-dark);
}

.btn-danger {
  background-color: var(--accent-red);
}

.btn-danger:hover {
  background-color: #c82333;
}

.btn-success {
  background-color: var(--accent-green);
}

.btn-success:hover {
  background-color: #218838;
}

/* =================================
   FORMS
==================================== */

.form-group {
  margin-bottom: 1.5rem;
}

label {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9375rem;
  margin-bottom: 0.5rem;
  display: block;
}

input,
textarea,
select {
  width: 100%;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  transition: all 0.2s ease;
  font-family: inherit;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-primary-light);
}

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

textarea {
  resize: vertical;
  min-height: 100px;
}

.form-help-text {
  color: var(--text-muted);
  font-size: 0.8125rem;
  margin-top: 0.375rem;
  margin-bottom: 0;
}

.field-error {
  color: var(--accent-red);
  font-size: 0.8125rem;
  margin-top: 0.25rem;
  margin-bottom: 0;
}

.input-error {
  border-color: var(--accent-red) !important;
  background-color: #fef2f2 !important;
}

.input-error:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2) !important;
}

/* =================================
   CARDS
==================================== */

.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

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

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

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

/* =================================
   MESSAGES & ALERTS
==================================== */

.success-message,
.error-message,
.warning-message,
.info-message {
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  border-left: 4px solid;
  font-size: 0.9375rem;
  font-weight: 500;
}

.success-message {
  background-color: rgba(40, 167, 69, 0.1);
  border-color: var(--accent-green);
  color: #155724;
}

.error-message {
  background-color: rgba(220, 53, 69, 0.1);
  border-color: var(--accent-red);
  color: #721c24;
}

.warning-message {
  background-color: rgba(255, 193, 7, 0.1);
  border-color: var(--accent-yellow);
  color: #856404;
}

.info-message {
  background-color: var(--accent-primary-light);
  border-color: var(--accent-primary);
  color: #004d52;
}

/* =================================
   UTILITIES
==================================== */

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

.mt-1 {
  margin-top: 0.5rem;
}
.mt-2 {
  margin-top: 1rem;
}
.mt-3 {
  margin-top: 1.5rem;
}
.mt-4 {
  margin-top: 2rem;
}

.mb-1 {
  margin-bottom: 0.5rem;
}
.mb-2 {
  margin-bottom: 1rem;
}
.mb-3 {
  margin-bottom: 1.5rem;
}
.mb-4 {
  margin-bottom: 2rem;
}

.d-flex {
  display: flex;
}
.align-items-center {
  align-items: center;
}
.justify-content-between {
  justify-content: space-between;
}
.gap-1 {
  gap: 0.5rem;
}
.gap-2 {
  gap: 1rem;
}
.gap-3 {
  gap: 1.5rem;
}

/* =================================
   RESPONSIVE UTILITIES
==================================== */

/* iPad/Tablet (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
  body {
    font-size: 15.5px;
  }

  .container {
    max-width: 960px;
    padding: 1.25rem;
  }

  h1 {
    font-size: 2rem;
  }
  h2 {
    font-size: 1.625rem;
  }
  h3 {
    font-size: 1.375rem;
  }
  h4 {
    font-size: 1.125rem;
  }

  button,
  .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
  }

  .card {
    padding: 1.5rem;
  }

  input,
  textarea,
  select {
    padding: 0.75rem 1rem;
    font-size: 15px;
  }
}

/* Mobile (up to 768px) */
@media (max-width: 768px) {
  body {
    font-size: 15px;
  }

  .container {
    padding: 0.75rem;
  }

  h1 {
    font-size: 1.875rem;
  }
  h2 {
    font-size: 1.5rem;
  }
  h3 {
    font-size: 1.25rem;
  }
  h4 {
    font-size: 1.125rem;
  }

  button,
  .btn {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
  }

  .card {
    padding: 1.25rem;
  }

  input,
  textarea,
  select {
    font-size: 16px; /* Prevents zoom on iOS */
  }
}

/* Small Mobile (up to 480px) */
@media (max-width: 480px) {
  h1 {
    font-size: 1.5rem;
  }
  h2 {
    font-size: 1.25rem;
  }
  h3 {
    font-size: 1.125rem;
  }

  .card {
    padding: 1rem;
  }
}
