/* Authentication Page Styles - Clean Brand Design */

* {
  box-sizing: border-box;
}

.auth-body {
  font-family: var(--font-primary);
  margin: 0;
  padding: 0;
  background: var(--background-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}

.auth-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 1200px;
  width: 100%;
  min-height: 700px;
  background: var(--background-primary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-hover);
  border: 1px solid var(--border-color);
}

/* Left Side - Testimonial */
.auth-testimonial {
  background: var(--background-secondary);
  padding: var(--space-12) var(--space-8);
  display: flex;
  align-items: center;
  position: relative;
}

.testimonial-content {
  position: relative;
  z-index: 1;
}

.testimonial-quote {
  font-size: var(--font-size-2xl);
  font-weight: 300;
  line-height: 1.4;
  margin: 0 0 var(--space-8) 0;
  color: var(--text-primary);
  position: relative;
  font-style: italic;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.author-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent-color);
}

.author-name {
  font-weight: 600;
  font-size: var(--font-size-lg);
  color: var(--text-primary);
  margin-bottom: var(--space-1);
}

.author-title {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  line-height: 1.3;
}

/* Right Side - Form */
.auth-form-container {
  padding: var(--space-12) var(--space-8);
  display: flex;
  align-items: center;
  background: var(--background-primary);
}

.auth-form-wrapper {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

.auth-brand {
  text-align: center;
  margin-bottom: var(--space-8);
}

.brand-title {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  letter-spacing: -0.5px;
}

.auth-header {
  text-align: center;
  margin-bottom: var(--space-6);
}

.auth-title {
  font-size: var(--font-size-3xl);
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 var(--space-3) 0;
  line-height: 1.2;
}

.auth-subtitle {
  font-size: var(--font-size-base);
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

/* Step Navigation */
.step-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-6);
}

.back-btn {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: var(--font-size-sm);
  transition: color 0.2s ease;
}

.back-btn:hover {
  color: var(--accent-color);
}

.back-icon {
  width: 16px;
  height: 16px;
}

.step-indicator {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
}

.step-number {
  color: var(--accent-color);
  font-weight: 600;
}

.progress-bar {
  width: 100%;
  height: 4px;
  background: var(--border-color);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: var(--space-4);
}

.progress-fill {
  height: 100%;
  background: var(--accent-color);
  transition: width 0.3s ease;
}

/* Social Login Section */
.social-login-section {
  margin-bottom: var(--space-6);
}

.social-buttons {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--background-primary);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: var(--font-size-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.social-btn:hover {
  background: var(--background-secondary);
  border-color: var(--accent-color);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.social-icon {
  width: 20px;
  height: 20px;
}

/* Divider */
.divider {
  display: flex;
  align-items: center;
  margin: var(--space-6) 0;
  text-align: center;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

.divider-text {
  padding: 0 var(--space-4);
  color: var(--text-muted);
  font-size: var(--font-size-sm);
  white-space: nowrap;
}

.divider span {
  background: var(--background-primary);
  padding: 0 var(--space-4);
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  position: relative;
}

/* Alert Messages */
.alert {
  padding: var(--space-4);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-6);
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}

.alert-info {
  background: rgba(195, 157, 67, 0.1);
  border: 1px solid rgba(195, 157, 67, 0.3);
  color: var(--accent-color);
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #dc2626;
}

.alert-success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #059669;
}

.alert-warning {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #d97706;
}

.alert-message {
  font-size: var(--font-size-sm);
  line-height: 1.4;
}

/* Provider Icon Section */
.provider-icon-section {
  text-align: center;
  margin-bottom: var(--space-6);
}

.provider-icon {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-4);
}

.verification-instruction {
  color: var(--text-secondary);
  font-size: var(--font-size-base);
  line-height: 1.5;
  margin: 0;
}

/* Form Styles */
.auth-form {
  width: 100%;
}

.form-group {
  margin-bottom: var(--space-6);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

.form-group-half {
  margin-bottom: 0;
}

.form-label {
  display: block;
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
  position: relative;
}

.form-control {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-size: var(--font-size-base);
  background: var(--background-primary);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  transition: all 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(195, 157, 67, 0.1);
}

/* Password Input Wrapper */
.password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-toggle {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.password-toggle:hover {
  background: var(--background-secondary);
  color: var(--accent-color);
}

.eye-icon {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
}

.form-control::placeholder {
  color: var(--text-muted);
}

.form-control.error {
  border-color: #dc2626;
}

/* Field Error Messages */
.field-error {
  color: #dc2626;
  font-size: 0.875rem;
  margin-top: 0.5rem;
  display: none; /* Hidden by default */
}

.checkbox-input.error + .checkbox-label .checkbox-custom {
  border-color: #dc2626;
}

/* Code Input Styles */
.code-input-container {
  position: relative;
}

.code-input {
  text-align: center;
  font-size: var(--font-size-2xl);
  font-weight: 600;
  letter-spacing: 8px;
  padding: var(--space-6) var(--space-4);
  font-family: 'Courier New', monospace;
}

.field-help {
  margin-top: var(--space-2);
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  text-align: center;
}

/* Resend Section */
.resend-section {
  text-align: center;
  margin: var(--space-4) 0;
}

.resend-text {
  margin: 0;
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
}

.resend-btn {
  background: none;
  border: none;
  color: var(--accent-color);
  cursor: pointer;
  text-decoration: underline;
  font-size: var(--font-size-sm);
}

.resend-btn:hover {
  color: #a8832b;
}

.resend-btn:disabled {
  color: var(--text-muted);
  cursor: not-allowed;
  text-decoration: none;
}

/* Password Requirements */
.password-requirements {
  margin-top: var(--space-2);
  padding: var(--space-3);
  background: var(--background-secondary);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.requirements-text {
  font-size: var(--font-size-xs);
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
  display: block;
}

.requirements-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.requirement {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  margin-bottom: var(--space-1);
  position: relative;
  padding-left: 20px;
}

.requirement::before {
  content: '✗';
  position: absolute;
  left: 0;
  color: #dc2626;
}

.requirement.valid::before {
  content: '✓';
  color: #059669;
}

/* Checkboxes */
.checkbox-group {
  margin-bottom: var(--space-4);
}

.checkbox-wrapper {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  cursor: pointer;
}

.checkbox-input {
  display: none;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  cursor: pointer;
  color: var(--text-primary);
}

.checkbox-custom {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
  margin-top: 2px;
}

.checkbox-input:checked + .checkbox-label .checkbox-custom {
  background: var(--accent-color);
  border-color: var(--accent-color);
}

.checkbox-input:checked + .checkbox-label .checkbox-custom::after {
  content: '✓';
  color: var(--brand-black);
  font-size: 12px;
  font-weight: 600;
}

.checkbox-text {
  font-size: var(--font-size-sm);
  color: var(--text-primary) !important;
  line-height: 1.5;
  opacity: 1;
}

.terms-link {
  color: var(--accent-color);
  text-decoration: none;
}

.terms-link:hover {
  text-decoration: underline;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3) var(--space-6);
  font-size: var(--font-size-base);
  font-weight: 600;
  border: 3px solid var(--text-primary);
  border-radius: var(--radius-md);
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  transition: all 0.2s ease;
  position: relative;
  color: var(--text-primary);
}

.btn-primary {
  background: var(--accent-color);
  color: var(--text-primary);
  border-color: var(--text-primary);
}

.btn-primary:hover {
  background: #a8832b;
  border-color: #a8832b;
  transform: translateY(-1px);
  box-shadow: var(--shadow-hover);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--text-primary);
}

.btn-secondary:hover {
  background: var(--background-secondary);
  border-color: var(--accent-color);
}

.btn-large {
  padding: var(--space-4) var(--space-8);
  font-size: var(--font-size-lg);
}

.btn-block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* Form Footer */
.form-footer {
  text-align: center;
  margin-top: var(--space-6);
}

.footer-text {
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
  margin: 0;
}

.auth-link {
  color: var(--accent-color);
  text-decoration: none;
  font-weight: 500;
}

.auth-link:hover {
  text-decoration: underline;
}

.auth-footer {
  text-align: center;
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border-color);
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.footer-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: var(--font-size-xs);
}

.footer-link:hover {
  color: var(--text-secondary);
}

.footer-separator {
  color: var(--border-color);
  font-size: var(--font-size-xs);
}

/* Loading Overlay Styles */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.loading-overlay.show {
  opacity: 1;
  visibility: visible;
}

.loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  background: var(--background-primary);
  padding: var(--space-8);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-hover);
  border: 1px solid var(--border-color);
  max-width: 300px;
  text-align: center;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  position: relative;
}

.spinner-large {
  width: 100%;
  height: 100%;
  animation: spin 1s linear infinite;
  color: var(--accent-color);
}

.spinner-large .spinner-circle {
  stroke-dasharray: 31.416;
  stroke-dashoffset: 31.416;
  animation: dash 2s ease-in-out infinite;
  stroke-linecap: round;
}

.loading-text {
  margin: 0;
  font-size: var(--font-size-base);
  font-weight: 500;
  color: var(--text-primary);
}

/* Spinner animations */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes dash {
  0% {
    stroke-dasharray: 1, 150;
    stroke-dashoffset: 0;
  }
  50% {
    stroke-dasharray: 90, 150;
    stroke-dashoffset: -35;
  }
  100% {
    stroke-dasharray: 90, 150;
    stroke-dashoffset: -124;
  }
}

/* Button Loading State */
.btn.loading {
  position: relative;
  color: transparent !important;
}

.btn.loading .btn-text {
  opacity: 0;
}

.btn-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.btn.loading .btn-spinner {
  opacity: 1;
}

.btn .spinner {
  width: 100%;
  height: 100%;
  animation: spin 1s linear infinite;
  color: currentColor;
}

.btn .spinner-circle {
  stroke-dasharray: 31.416;
  stroke-dashoffset: 31.416;
  animation: dash 2s ease-in-out infinite;
  stroke-linecap: round;
}

/* Apple Icon Theme Support */
.apple-icon svg,
.apple-icon-large {
  fill: var(--text-primary);
}

.apple-icon svg path,
.apple-icon-large path {
  fill: var(--text-primary);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .auth-wrapper {
    grid-template-columns: 1fr;
  }
  
  .auth-testimonial {
    padding: var(--space-8) var(--space-6);
    min-height: 200px;
  }
  
  .testimonial-quote {
    font-size: var(--font-size-xl);
  }
  
  .auth-form-container {
    padding: var(--space-8) var(--space-6);
  }
}

@media (max-width: 640px) {
  .auth-container {
    padding: var(--space-4);
  }
  
  .auth-wrapper {
    border-radius: var(--radius-md);
    min-height: auto;
  }
  
  .auth-testimonial {
    padding: var(--space-6);
    min-height: 180px;
  }
  
  .testimonial-quote {
    font-size: var(--font-size-lg);
  }
  
  .auth-form-container {
    padding: var(--space-6);
  }
  
  .auth-title {
    font-size: var(--font-size-2xl);
  }
  
  .form-row {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }
  
  .form-group-half {
    margin-bottom: var(--space-4);
  }
  
  .social-buttons {
    gap: var(--space-2);
  }
  
  .step-navigation {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-4);
  }
  
  .code-input {
    font-size: var(--font-size-xl);
    letter-spacing: 4px;
  }
}

@media (max-width: 480px) {
  .checkbox-wrapper {
    align-items: flex-start;
  }
  
  .checkbox-text {
    font-size: var(--font-size-xs);
  }
  
  .btn {
    font-size: var(--font-size-sm);
  }
  
  .btn-large {
    font-size: var(--font-size-base);
  }
  
  .social-btn {
    font-size: var(--font-size-xs);
    padding: var(--space-3);
  }
  
  .testimonial-quote {
    font-size: var(--font-size-base);
  }
  
  .auth-title {
    font-size: var(--font-size-xl);
  }
}

/* Forgot Password Link - Theme-aware Colors */
.forgot-password-link {
  color: #007bff !important; /* Blue in light theme */
}

[data-theme="dark"] .forgot-password-link {
  color: var(--satin-sheen-gold) !important; /* Gold in dark theme */
}

/* Success Modal Content Styles */
.success-modal {
  text-align: center;
  background: var(--background-color, #ffffff);
  border-radius: 12px;
  padding: 2rem;
  max-width: 400px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.success-icon {
  margin-bottom: 1.5rem;
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 1rem;
}

.modal-message {
  color: var(--text-color-muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}