:root {
  --primary-color: #4d7c0f;
  --primary-hover: #3f6a0a;
  --secondary-color: #e9f7e0;
  --text-primary: #333333;
  --text-secondary: #6b7280;
  --border-color: #e5e7eb;
  --error-color: #ef4444;
  --success-color: #10b981;
  --card-bg: #ffffff;
  --input-bg: #f9fafb;
  --input-focus: #f0f9eb;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans",
    "Helvetica Neue", sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f3f4f6;
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.auth-container {
  max-width: 400px;
  margin: 0 auto;
  padding: 2rem;
  background-color: #fff;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.auth-card {
  background-color: var(--card-bg);
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  width: 100%;
  max-width: 500px;
  padding: 3.5rem;
  margin: 0 auto;
}

.auth-card.register {
  max-width: 600px;
  padding: 3.5rem;
}

.auth-header {
  text-align: center;
  margin-bottom: 3rem;
}

.auth-logo {
  width: 100px;
  height: 100px;
  margin-bottom: 2rem;
  object-fit: contain;
}

.auth-header h1 {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 1rem 0;
}

.auth-header p {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin: 0;
}

.auth-title {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: #333;
}

.messages-container {
  margin-bottom: 2rem;
}

.alert {
  padding: 1rem 1.25rem;
  border-radius: 10px;
  margin-bottom: 1.5rem;
  font-size: 1rem;
}

.alert-success {
  background-color: #ecfdf5;
  border: 1px solid #d1fae5;
  color: #065f46;
}

.alert-error,
.alert-danger {
  background-color: #fef2f2;
  border: 1px solid #fee2e2;
  color: #b91c1c;
}

.alert-warning {
  background-color: #fffbeb;
  border: 1px solid #fef3c7;
  color: #92400e;
}

.alert-info {
  background-color: #eff6ff;
  border: 1px solid #dbeafe;
  color: #1e40af;
}

.auth-form {
  margin-bottom: 2.5rem;
}

.auth-form .form-group {
  margin-bottom: 1rem;
}

.auth-form label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #4b5563;
}

.auth-form input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  font-size: 0.875rem;
}

.auth-form input:focus {
  outline: none;
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.form-row {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 0.5rem;
}

.form-row .form-group {
  flex: 1;
}

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

.form-group label {
  display: block;
  margin-bottom: 0.75rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
}

.input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.input-group i {
  position: absolute;
  left: 1.25rem;
  color: var(--text-secondary);
  font-size: 1.125rem;
}

.form-control {
  width: 100%;
  padding: 1rem 1.25rem 1rem 3rem;
  border: 1.5px solid var(--border-color);
  border-radius: 10px;
  font-size: 1rem;
  background-color: var(--input-bg);
  transition: all 0.2s ease;
  height: 3.5rem;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  background-color: var(--input-focus);
  box-shadow: 0 0 0 4px rgba(77, 124, 15, 0.1);
}

.toggle-password {
  position: absolute;
  right: 1.25rem;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0;
  font-size: 1.125rem;
}

.error-message {
  color: var(--error-color);
  font-size: 0.875rem;
  margin-top: 0.75rem;
}

.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2.5rem;
  padding: 0 0.5rem;
}

.remember-me {
  display: flex;
  align-items: center;
}

.remember-me input[type="checkbox"] {
  margin-right: 0.75rem;
  width: 1.25rem;
  height: 1.25rem;
  accent-color: var(--primary-color);
}

.remember-me label {
  font-size: 1rem;
  color: var(--text-secondary);
  margin: 0;
}

.forgot-password {
  font-size: 1rem;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

.forgot-password:hover {
  text-decoration: underline;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.75rem;
  border-radius: 10px;
  font-size: 1.125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

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

.btn-primary:hover {
  background-color: var(--primary-hover);
}

.auth-form .btn-primary {
  display: block;
  width: 100%;
  padding: 0.75rem;
  background-color: #10b981;
  color: white;
  border: none;
  border-radius: 0.375rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

.auth-form .btn-primary:hover {
  background-color: #059669;
}

.auth-form .btn-primary:disabled {
  background-color: #6ee7b7;
  cursor: not-allowed;
}

.btn-block {
  width: 100%;
  padding: 1.125rem;
  height: 3.75rem;
}

.auth-footer {
  text-align: center;
  font-size: 1rem;
  color: var(--text-secondary);
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.auth-footer a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
}

.auth-footer a:hover {
  text-decoration: underline;
}

.auth-links {
  margin-top: 1rem;
  text-align: center;
}

.auth-links a {
  color: #10b981;
  text-decoration: none;
  font-size: 0.875rem;
}

.auth-links a:hover {
  text-decoration: underline;
}

.terms-checkbox {
  display: flex;
  align-items: flex-start;
  margin-bottom: 2.5rem;
  padding: 0 0.5rem;
}

.terms-checkbox input[type="checkbox"] {
  margin-right: 0.75rem;
  margin-top: 0.25rem;
  width: 1.25rem;
  height: 1.25rem;
  accent-color: var(--primary-color);
}

.terms-checkbox label {
  font-size: 1rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

.terms-checkbox a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

.terms-checkbox a:hover {
  text-decoration: underline;
}

/* OTP Input Styling */
.otp-input {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.otp-input input {
  width: 3rem;
  height: 3rem;
  text-align: center;
  font-size: 1.25rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
}

.otp-input input:focus {
  outline: none;
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

/* Notification Styling */
.notification {
  position: fixed;
  top: 1rem;
  right: 1rem;
  padding: 1rem;
  border-radius: 0.375rem;
  background-color: #fff;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  transform: translateX(110%);
  transition: transform 0.3s ease-in-out;
  max-width: 24rem;
}

.notification.show {
  transform: translateX(0);
}

.notification.success {
  border-left: 4px solid #10b981;
}

.notification.error {
  border-left: 4px solid #ef4444;
}

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

.close-btn {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: #6b7280;
  margin-left: 0.5rem;
}

/* Loading Spinner */
.spinner {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
  margin-right: 0.5rem;
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
  .auth-card {
    padding: 2.5rem;
  }

  .auth-logo {
    width: 80px;
    height: 80px;
  }

  .auth-header h1 {
    font-size: 1.75rem;
  }

  .auth-header p {
    font-size: 1rem;
  }

  .form-control {
    padding: 0.875rem 1rem 0.875rem 2.75rem;
    height: 3.25rem;
  }

  .btn {
    font-size: 1rem;
    padding: 0.875rem 1.5rem;
  }
}

@media (max-width: 576px) {
  .auth-card {
    padding: 2rem 1.5rem;
    border-radius: 12px;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .auth-logo {
    width: 70px;
    height: 70px;
  }

  .auth-header h1 {
    font-size: 1.5rem;
  }

  .form-options {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .btn-block {
    height: 3.5rem;
  }
}
