/* ============================================================================
   AUTHENTICATION PAGES STYLES
   ============================================================================ */

/* Reset and base styles for auth pages */
.auth-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.auth-container {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 420px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  overflow: hidden;
  animation: authSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes authSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Auth Header */
.auth-header {
  padding: 32px 32px 24px;
  text-align: center;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.auth-header h1 {
  font-size: 28px;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 8px 0;
  background: linear-gradient(135deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-header p {
  font-size: 16px;
  color: #6b7280;
  margin: 0;
  line-height: 1.5;
}

/* Auth Content */
.auth-content {
  padding: 32px;
}

/* Form Styles */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  margin: 0;
}

.form-input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 16px;
  font-family: inherit;
  background: white;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.form-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  transform: translateY(-1px);
}

.form-input::placeholder {
  color: #9ca3af;
}

.form-input.error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-input.success {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Password Strength Indicator */
.password-strength {
  margin-top: 12px;
  padding: 16px;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  display: none;
}

.strength-bar {
  height: 6px;
  background: #e2e8f0;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 12px;
}

.strength-fill {
  height: 100%;
  border-radius: 3px;
  transition: all 0.3s ease;
  width: 0%;
}

.strength-fill.weak {
  background: #ef4444;
  width: 25%;
}

.strength-fill.fair {
  background: #f59e0b;
  width: 50%;
}

.strength-fill.good {
  background: #3b82f6;
  width: 75%;
}

.strength-fill.strong {
  background: #10b981;
  width: 100%;
}

.strength-text {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.strength-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.strength-label.weak { color: #ef4444; }
.strength-label.fair { color: #f59e0b; }
.strength-label.good { color: #3b82f6; }
.strength-label.strong { color: #10b981; }

.strength-requirements {
  font-size: 11px;
  color: #64748b;
}

.strength-requirements ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}

.strength-requirements li {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 0;
}

.strength-requirements li::before {
  content: '○';
  color: #cbd5e1;
  font-size: 8px;
  font-weight: bold;
}

.strength-requirements li.met::before {
  content: '●';
  color: #10b981;
}

/* Submit Button */
.auth-submit-btn {
  width: 100%;
  padding: 16px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.auth-submit-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.auth-submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.btn-text {
  display: inline;
}

.btn-spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Auth Links */
.auth-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 20px 0;
  gap: 16px;
}

.auth-link {
  color: #667eea;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  padding: 8px 12px;
  border-radius: 8px;
}

.auth-link:hover {
  color: #5a6fd8;
  background: rgba(102, 126, 234, 0.1);
  text-decoration: none;
}

/* Auth Divider */
.auth-divider {
  display: flex;
  align-items: center;
  margin: 24px 0;
  color: #9ca3af;
  font-size: 14px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}

.auth-divider span {
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.95);
}

/* Google Sign-in Button */
.google-signin-btn {
  width: 100%;
  padding: 14px 20px;
  background: white;
  color: #374151;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.google-signin-btn:hover {
  background: #f9fafb;
  border-color: #d1d5db;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Auth Switch */
.auth-switch {
  text-align: center;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #e5e7eb;
}

.auth-switch p {
  color: #6b7280;
  font-size: 14px;
  margin: 0;
}

.auth-switch-link {
  color: #667eea;
  text-decoration: none;
  font-weight: 600;
  margin-left: 4px;
  transition: color 0.2s ease;
}

.auth-switch-link:hover {
  color: #5a6fd8;
  text-decoration: underline;
}

/* Verification Code Input */
.verification-input {
  text-align: center;
  font-family: 'Courier New', monospace;
  font-size: 20px;
  letter-spacing: 4px;
  font-weight: 600;
  padding: 20px 16px;
}

/* Help Text */
.auth-help {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 12px;
  padding: 16px;
  margin-top: 20px;
}

.auth-help p {
  color: #0369a1;
  font-size: 14px;
  margin: 0;
  line-height: 1.5;
}

.auth-help a {
  color: #0284c7;
  text-decoration: underline;
}

.auth-help a:hover {
  color: #0369a1;
}

/* Back Button */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #6b7280;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 24px;
  padding: 8px 12px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.back-btn:hover {
  color: #374151;
  background: rgba(107, 114, 128, 0.1);
  text-decoration: none;
}

.back-btn::before {
  content: '←';
  font-size: 16px;
}

/* Notification Styles */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  transform: translateX(100%);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 10001;
  max-width: 400px;
  border-left: 4px solid;
}

.notification.show {
  transform: translateX(0);
  opacity: 1;
}

.notification-error {
  border-left-color: #ef4444;
}

.notification-success {
  border-left-color: #10b981;
}

.notification-info {
  border-left-color: #3b82f6;
}

.notification-content {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.notification-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.notification-message {
  font-size: 14px;
  color: #374151;
  line-height: 1.4;
  flex: 1;
}

.notification-close {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  opacity: 0.6;
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  transition: opacity 0.2s ease;
}

.notification-close:hover {
  opacity: 1;
}

/* Loading States */
.loading {
  pointer-events: none;
  opacity: 0.7;
}

/* Error States */
.error-message {
  color: #ef4444;
  font-size: 12px;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.error-message::before {
  content: '⚠';
  font-size: 14px;
}

/* Success States */
.success-message {
  color: #10b981;
  font-size: 12px;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.success-message::before {
  content: '✓';
  font-size: 14px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .auth-page {
    padding: 16px;
    align-items: flex-start;
    padding-top: 40px;
  }
  
  .auth-container {
    max-width: 100%;
    border-radius: 20px;
  }
  
  .auth-header {
    padding: 24px 24px 20px;
  }
  
  .auth-header h1 {
    font-size: 24px;
  }
  
  .auth-header p {
    font-size: 14px;
  }
  
  .auth-content {
    padding: 24px;
  }
  
  .form-input {
    font-size: 16px; /* Prevents zoom on iOS */
    padding: 16px;
  }
  
  .auth-submit-btn {
    padding: 18px 20px;
    font-size: 16px;
  }
  
  .verification-input {
    font-size: 18px;
    letter-spacing: 3px;
    padding: 18px 16px;
  }
  
  .auth-links {
    flex-direction: column;
    gap: 12px;
  }
  
  .notification {
    top: 10px;
    right: 10px;
    left: 10px;
    max-width: none;
    transform: translateY(-100%);
  }
  
  .notification.show {
    transform: translateY(0);
  }
}

@media (max-width: 480px) {
  .auth-page {
    padding: 8px;
    padding-top: 20px;
  }
  
  .auth-container {
    border-radius: 16px;
  }
  
  .auth-header {
    padding: 20px 20px 16px;
  }
  
  .auth-header h1 {
    font-size: 22px;
  }
  
  .auth-content {
    padding: 20px;
  }
  
  .form-group {
    gap: 6px;
  }
  
  .form-input {
    padding: 14px;
  }
  
  .auth-submit-btn {
    padding: 16px 18px;
    font-size: 15px;
  }
  
  .verification-input {
    font-size: 16px;
    letter-spacing: 2px;
    padding: 16px 14px;
  }
  
  .strength-requirements ul {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  .auth-container {
    border: 2px solid #000;
  }
  
  .form-input {
    border-width: 2px;
  }
  
  .auth-submit-btn {
    border: 2px solid transparent;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .auth-container,
  .form-input,
  .auth-submit-btn,
  .auth-link,
  .notification {
    transition: none;
  }
  
  .auth-container {
    animation: none;
  }
  
  .btn-spinner {
    animation: none;
  }
}

/* Focus Styles for Accessibility */
.form-input:focus,
.auth-submit-btn:focus,
.auth-link:focus,
.google-signin-btn:focus {
  outline: 2px solid #667eea;
  outline-offset: 2px;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  .auth-page {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  }
  
  .auth-container {
    background: rgba(30, 41, 59, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
  }
  
  .auth-header {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.2));
    border-bottom-color: rgba(255, 255, 255, 0.1);
  }
  
  .auth-header h1 {
    color: #f1f5f9;
  }
  
  .auth-header p {
    color: #cbd5e1;
  }
  
  .form-label {
    color: #f1f5f9;
  }
  
  .form-input {
    background: #334155;
    border-color: #475569;
    color: #f1f5f9;
  }
  
  .form-input:focus {
    border-color: #667eea;
    background: #3f4b5f;
  }
  
  .form-input::placeholder {
    color: #94a3b8;
  }
  
  .password-strength {
    background: #334155;
    border-color: #475569;
  }
  
  .strength-requirements {
    color: #94a3b8;
  }
  
  .google-signin-btn {
    background: #334155;
    border-color: #475569;
    color: #f1f5f9;
  }
  
  .google-signin-btn:hover {
    background: #3f4b5f;
    border-color: #64748b;
  }
  
  .auth-divider::before,
  .auth-divider::after {
    background: #475569;
  }
  
  .auth-switch {
    border-top-color: #475569;
  }
  
  .auth-switch p {
    color: #cbd5e1;
  }
  
  .auth-help {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
  }
  
  .auth-help p {
    color: #93c5fd;
  }
  
  .notification {
    background: #334155;
    border-color: rgba(255, 255, 255, 0.1);
  }
  
  .notification-message {
    color: #f1f5f9;
  }
}
