/* =========================================================
   Care Navigator — Modern Authentication Pages CSS
   Version: 1.0
   Ultra-modern, attractive auth pages with animations
   ========================================================= */

/* ============================================
   BASE & BODY
   ============================================ */

.auth-body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  background: #f8fafc;
}

/* ============================================
   ANIMATED BACKGROUND
   ============================================ */

.auth-background {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
  overflow: hidden;
}

.auth-bg-gradient {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, 
    #e0f2fe 0%, 
    #bae6fd 25%, 
    #7dd3fc 50%, 
    #38bdf8 75%, 
    #0ea5e9 100%
  );
  opacity: 1;
}

.auth-bg-shapes {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

.auth-shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.4;
  animation: float 25s ease-in-out infinite;
  mix-blend-mode: overlay;
}

.auth-shape-1 {
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, #0ea5e9 0%, #06b6d4 50%, transparent 70%);
  top: -400px;
  left: -300px;
  animation-delay: 0s;
}

.auth-shape-2 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, #3b82f6 0%, #8b5cf6 50%, transparent 70%);
  bottom: -300px;
  right: -200px;
  animation-delay: 7s;
}

.auth-shape-3 {
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, #06b6d4 0%, #0ea5e9 50%, transparent 70%);
  top: 40%;
  right: 10%;
  animation-delay: 14s;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0) translateX(0) scale(1);
  }
  33% {
    transform: translateY(-30px) translateX(30px) scale(1.05);
  }
  66% {
    transform: translateY(30px) translateX(-30px) scale(0.95);
  }
}

/* ============================================
   MAIN WRAPPER
   ============================================ */

.auth-wrapper {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

@media (max-width: 968px) {
  .auth-wrapper {
    grid-template-columns: 1fr;
  }
  
  .auth-brand-panel {
    display: none;
  }
}

/* ============================================
   BRAND PANEL (LEFT SIDE)
   ============================================ */

.auth-brand-panel {
  background: linear-gradient(135deg, 
    rgba(14, 165, 233, 0.95) 0%, 
    rgba(2, 132, 199, 0.95) 35%, 
    rgba(3, 105, 161, 0.95) 70%,
    rgba(12, 74, 110, 0.98) 100%
  );
  backdrop-filter: blur(20px);
  color: white;
  padding: 4rem 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow: inset -2px 0 20px rgba(0, 0, 0, 0.1);
}

.auth-brand-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.15) 0%, transparent 50%),
    linear-gradient(135deg, transparent 0%, rgba(255, 255, 255, 0.05) 50%, transparent 100%);
  pointer-events: none;
  animation: shimmer 15s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

.auth-brand-content {
  position: relative;
  z-index: 1;
  max-width: 500px;
  margin: 0 auto;
}

.auth-brand-logo {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 3rem;
  text-decoration: none;
  color: white;
  transition: transform 0.3s ease;
}

.auth-brand-logo:hover {
  transform: translateX(5px);
}

.auth-brand-logo img {
  width: 48px;
  height: 48px;
  filter: brightness(0) invert(1);
}

.auth-brand-logo span {
  font-size: 1.5rem;
  font-weight: 700;
}

.auth-panel-title {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 1rem 0;
}

.auth-panel-subtitle {
  font-size: 1.125rem;
  line-height: 1.7;
  opacity: 0.9;
  margin: 0 0 3rem 0;
}

/* Benefits List */
.auth-benefits {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.auth-benefit-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.15);
  padding: 1.5rem;
  border-radius: 16px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.auth-benefit-item:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateX(8px) translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  border-color: rgba(255, 255, 255, 0.4);
}

.auth-benefit-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.auth-benefit-text h4 {
  margin: 0 0 0.25rem 0;
  font-size: 1.125rem;
  font-weight: 600;
}

.auth-benefit-text p {
  margin: 0;
  font-size: 0.9375rem;
  opacity: 0.9;
}

/* Testimonial */
.auth-testimonial {
  background: rgba(255, 255, 255, 0.1);
  padding: 1.5rem;
  border-radius: 12px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.auth-testimonial-stars {
  font-size: 1.125rem;
  margin-bottom: 0.75rem;
}

.auth-testimonial-text {
  font-size: 1rem;
  line-height: 1.6;
  margin: 0 0 0.75rem 0;
  font-style: italic;
}

.auth-testimonial-author {
  font-size: 0.875rem;
  margin: 0;
  opacity: 0.9;
}

/* Stats */
.auth-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}

.auth-stat {
  text-align: center;
  padding: 1.25rem;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.auth-stat:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  background: rgba(255, 255, 255, 0.2);
}

.auth-stat-value {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.auth-stat-label {
  display: block;
  font-size: 0.875rem;
  opacity: 0.9;
}

/* ============================================
   FORM PANEL (RIGHT SIDE)
   ============================================ */

.auth-form-panel {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  padding: 3rem 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.08);
}

.auth-form-container {
  width: 100%;
  max-width: 480px;
  animation: slideInRight 0.6s ease;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Back Link */
.auth-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  color: #64748b;
  text-decoration: none;
  margin-bottom: 2rem;
  transition: all 0.3s ease;
}

.auth-back-link:hover {
  color: #0ea5e9;
  transform: translateX(-5px);
}

/* Form Header */
.auth-form-header {
  margin-bottom: 2rem;
}

.auth-form-title {
  font-size: 2rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.5rem 0;
  line-height: 1.2;
}

.auth-form-subtitle {
  font-size: 1rem;
  color: #64748b;
  margin: 0;
}

/* ============================================
   ALERTS
   ============================================ */

.auth-alert {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  animation: slideDown 0.4s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-alert svg {
  flex-shrink: 0;
  margin-top: 2px;
}

.auth-alert-content {
  flex: 1;
}

.auth-alert-title {
  font-weight: 600;
  font-size: 0.9375rem;
  margin: 0 0 0.25rem 0;
}

.auth-alert-message {
  font-size: 0.875rem;
  margin: 0;
}

.auth-alert-error {
  background: #fee2e2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.auth-alert-error svg {
  stroke: #dc2626;
}

.auth-alert-success {
  background: #dcfce7;
  border: 1px solid #bbf7d0;
  color: #166534;
}

.auth-alert-success svg {
  stroke: #22c55e;
}

/* ============================================
   SOCIAL BUTTONS
   ============================================ */

.auth-social-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.auth-social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  background: white;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #334155;
  cursor: pointer;
  transition: all 0.3s ease;
}

.auth-social-btn:not(:disabled):hover {
  border-color: #0ea5e9;
  background: #f0f9ff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.15);
}

.auth-social-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.auth-social-btn svg {
  flex-shrink: 0;
}

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.5rem 0;
  color: #94a3b8;
  font-size: 0.875rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #e2e8f0;
}

.auth-divider span {
  padding: 0 1rem;
}

/* ============================================
   FORM ELEMENTS
   ============================================ */

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.auth-form-group {
  display: flex;
  flex-direction: column;
}

.auth-form-group.is-focused .auth-input-wrapper {
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

/* Label */
.auth-label {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-bottom: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #334155;
}

.auth-label-text {
  flex: 1;
}

.auth-label-required {
  color: #ef4444;
}

/* Input Wrapper */
.auth-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  background: white;
  transition: all 0.3s ease;
}

.auth-input-wrapper:hover {
  border-color: #cbd5e1;
}

.auth-input-icon {
  position: absolute;
  left: 1rem;
  color: #94a3b8;
  pointer-events: none;
  z-index: 1;
}

/* Input */
.auth-input {
  width: 100%;
  padding: 0.875rem 1rem 0.875rem 3rem;
  border: none;
  background: transparent;
  font-size: 1rem;
  color: #0f172a;
  outline: none;
  font-family: inherit;
}

.auth-input::placeholder {
  color: #94a3b8;
}

select.auth-input {
  padding-right: 2.5rem;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
}

/* Password Toggle */
.auth-password-toggle {
  position: absolute;
  right: 1rem;
  padding: 0.5rem;
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.3s ease;
}

.auth-password-toggle:hover {
  color: #0ea5e9;
}

/* Helper Text */
.auth-helper {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: #64748b;
}

.auth-helper.is-error {
  color: #ef4444;
}

.auth-helper.is-success {
  color: #22c55e;
}

/* Password Strength */
.password-strength {
  margin-top: 0.75rem;
}

.password-strength-bar {
  height: 4px;
  background: #e2e8f0;
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.password-strength-fill {
  height: 100%;
  transition: all 0.3s ease;
  border-radius: 2px;
}

.password-strength-text {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
}

/* Checkbox */
.auth-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  user-select: none;
}

.auth-checkbox {
  margin-top: 0.25rem;
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #0ea5e9;
  flex-shrink: 0;
}

.auth-checkbox-text {
  font-size: 0.9375rem;
  color: #475569;
  line-height: 1.5;
}

/* Form Extras */
.auth-form-extras {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: -0.5rem;
}

/* Links */
.auth-link {
  color: #0ea5e9;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.auth-link:hover {
  color: #0284c7;
  text-decoration: underline;
}

.auth-link-primary {
  color: #0ea5e9;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.3s ease;
}

.auth-link-primary:hover {
  color: #0284c7;
}

/* Submit Button */
.auth-submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.auth-submit-btn:hover {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.4);
}

.auth-submit-btn:active {
  transform: translateY(0);
}

/* Form Footer */
.auth-form-footer {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid #e2e8f0;
}

.auth-footer-text {
  font-size: 0.9375rem;
  color: #64748b;
  margin: 0;
}

/* Security Badge */
.auth-security-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
  padding: 0.75rem;
  background: #f1f5f9;
  border-radius: 8px;
  font-size: 0.875rem;
  color: #64748b;
}

.auth-security-badge svg {
  stroke: #94a3b8;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 640px) {
  .auth-form-panel {
    padding: 2rem 1.5rem;
  }
  
  .auth-social-buttons {
    grid-template-columns: 1fr;
  }
  
  .auth-social-btn {
    font-size: 0.875rem;
  }
  
  .auth-form-title {
    font-size: 1.5rem;
  }
  
  .auth-stats {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}
