/* ========================================
   ENTERPRISE-GRADE AUTHENTICATION STYLES
   Modern, premium authentication experience
======================================== */

/* ========================================
   AUTHENTICATION PAGE LAYOUT
======================================== */

.auth-page-container {
  min-height: 100vh;
  position: relative;
  background: linear-gradient(135deg, #0f1419 0%, #1a1f2e 50%, #0f1419 100%);
  overflow: hidden;
}

.auth-background-pattern {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 25% 25%, rgba(74, 158, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(74, 158, 255, 0.05) 0%, transparent 50%);
  background-size: 800px 800px;
  animation: backgroundFloat 20s ease-in-out infinite;
}

@keyframes backgroundFloat {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(-20px, -20px) rotate(1deg); }
  66% { transform: translate(20px, -10px) rotate(-1deg); }
}

.auth-content-wrapper {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  max-width: 1400px;
  margin: 0 auto;
}

/* ========================================
   BRANDING SECTION (LEFT SIDE)
======================================== */

.auth-branding-section {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 3rem;
  background: linear-gradient(135deg, rgba(74, 158, 255, 0.05) 0%, transparent 100%);
  border-right: 1px solid rgba(74, 158, 255, 0.1);
}

.branding-content {
  max-width: 480px;
  width: 100%;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.logo-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #4a9eff 0%, #0066cc 100%);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 32px rgba(74, 158, 255, 0.3);
}

.logo-icon i {
  font-size: 1.75rem;
  color: white;
}

.brand-logo h2 {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  background: linear-gradient(135deg, #4a9eff 0%, #ffffff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.brand-tagline h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.brand-tagline p {
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 2.5rem;
}

/* Feature Highlights */
.feature-highlights {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  transition: all 0.3s ease;
}

.feature-item:hover {
  background: rgba(74, 158, 255, 0.05);
  border-color: rgba(74, 158, 255, 0.2);
  transform: translateX(8px);
}

.feature-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, rgba(74, 158, 255, 0.2) 0%, rgba(74, 158, 255, 0.1) 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.feature-icon i {
  font-size: 1.25rem;
  color: #4a9eff;
}

.feature-text h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.feature-text p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.4;
}

/* Signup Process Steps */
.signup-process {
  margin-top: 2rem;
}

.signup-process h4 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

.process-steps {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.process-step {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  transition: all 0.3s ease;
}

.process-step:hover {
  background: rgba(74, 158, 255, 0.05);
  transform: translateX(4px);
}

.step-number {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #4a9eff 0%, #0066cc 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: white;
  flex-shrink: 0;
}

.step-content h5 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.step-content p {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin: 0;
}

/* Trust Indicators */
.trust-indicators {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.trust-item i {
  color: #4a9eff;
}

/* ========================================
   FORM SECTION (RIGHT SIDE)
======================================== */

.auth-form-section {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 3rem;
  background: var(--bg-surface);
}

.auth-form-container {
  width: 100%;
  max-width: 420px;
}

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

.auth-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.auth-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 0;
}

/* ========================================
   FORM ELEMENTS
======================================== */

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  position: relative;
}

.form-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.form-label i {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.input-wrapper {
  position: relative;
}

.input-wrapper input {
  width: 100%;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  color: var(--text-primary);
  background: var(--bg-elevated);
  border: 2px solid var(--border-primary);
  border-radius: 8px;
  transition: all 0.3s ease;
  outline: none;
}

.input-wrapper input:focus {
  border-color: #4a9eff;
  background: var(--bg-surface);
  box-shadow: 0 0 0 4px rgba(74, 158, 255, 0.1);
}

.input-wrapper input:focus + .input-focus-border {
  transform: scaleX(1);
}

.input-focus-border {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #4a9eff 0%, #0066cc 100%);
  transform: scaleX(0);
  transition: transform 0.3s ease;
  border-radius: 0 0 8px 8px;
}

/* Password Toggle */
.password-toggle {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.password-toggle:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

/* Input Validation Icons */
.input-validation-icon {
  position: absolute;
  right: 2.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  opacity: 0;
  transition: all 0.3s ease;
}

.input-validation-icon.valid {
  background: var(--success);
  color: white;
  opacity: 1;
}

.input-validation-icon.invalid {
  background: var(--error);
  color: white;
  opacity: 1;
}

.input-validation-icon.valid::before {
  content: '✓';
}

.input-validation-icon.invalid::before {
  content: '✕';
}

/* Password Strength Indicator */
.password-strength {
  margin-top: 0.5rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.password-strength.visible {
  opacity: 1;
}

.strength-bar {
  width: 100%;
  height: 4px;
  background: var(--bg-elevated);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 0.25rem;
}

.strength-fill {
  height: 100%;
  width: 0%;
  transition: all 0.3s ease;
  border-radius: 2px;
}

.strength-fill.weak {
  width: 25%;
  background: var(--error);
}

.strength-fill.fair {
  width: 50%;
  background: #fbbf24;
}

.strength-fill.good {
  width: 75%;
  background: #10b981;
}

.strength-fill.strong {
  width: 100%;
  background: var(--success);
}

.strength-text {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* Form Help Text */
.form-help {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
  line-height: 1.4;
}

/* Form Options */
.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0.5rem 0;
}

.checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.checkbox-wrapper input[type="checkbox"] {
  display: none;
}

.checkbox-custom {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-primary);
  border-radius: 4px;
  position: relative;
  transition: all 0.3s ease;
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkbox-custom {
  background: #4a9eff;
  border-color: #4a9eff;
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkbox-custom::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
}

.checkbox-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.forgot-link {
  font-size: 0.875rem;
  color: #4a9eff;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.forgot-link:hover {
  color: #0066cc;
  text-decoration: underline;
}

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

.btn-auth-primary {
  position: relative;
  width: 100%;
  padding: 1rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: white;
  background: linear-gradient(135deg, #4a9eff 0%, #0066cc 100%);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  overflow: hidden;
}

.btn-auth-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.btn-auth-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(74, 158, 255, 0.4);
}

.btn-auth-primary:hover::before {
  left: 100%;
}

.btn-auth-primary:active {
  transform: translateY(0);
}

.btn-auth-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-loading {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-auth-primary.loading .btn-text {
  display: none;
}

.btn-auth-primary.loading .btn-loading {
  display: flex;
}

.loading-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.btn-auth-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.875rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  background: transparent;
  border: 2px solid var(--border-primary);
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.btn-auth-secondary:hover {
  color: #4a9eff;
  border-color: #4a9eff;
  background: rgba(74, 158, 255, 0.05);
  text-decoration: none;
  transform: translateY(-1px);
}

/* Auth Divider */
.auth-divider {
  position: relative;
  text-align: center;
  margin: 1.5rem 0;
}

.auth-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border-primary);
}

.auth-divider span {
  background: var(--bg-surface);
  padding: 0 1rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

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

.alert {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  border: 1px solid;
}

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

.alert-success {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.3);
  color: #22c55e;
}

.alert-info {
  background: rgba(74, 158, 255, 0.1);
  border-color: rgba(74, 158, 255, 0.3);
  color: #4a9eff;
}

.alert-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.alert-content {
  flex: 1;
}

.error-item {
  font-size: 0.875rem;
  line-height: 1.4;
}

.error-item:not(:last-child) {
  margin-bottom: 0.5rem;
}

/* Access Info Card */
.access-info-card {
  background: rgba(74, 158, 255, 0.05);
  border: 1px solid rgba(74, 158, 255, 0.2);
  border-radius: 8px;
  padding: 1rem;
  margin: 1rem 0;
}

.info-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #4a9eff;
}

.info-content p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

/* ========================================
   ANIMATIONS
======================================== */

.animate-fade-in-up {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s ease-out forwards;
}

.animate-slide-in-right {
  opacity: 0;
  transform: translateX(30px);
  animation: slideInRight 0.6s ease-out forwards;
}

.animate-slide-down {
  animation: slideDown 0.4s ease-out;
}

.animate-shake {
  animation: shake 0.5s ease-in-out;
}

.delay-200 { animation-delay: 0.2s; }
.delay-400 { animation-delay: 0.4s; }
.delay-600 { animation-delay: 0.6s; }

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* ========================================
   RESPONSIVE DESIGN
======================================== */

@media (max-width: 1024px) {
  .auth-content-wrapper {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }
  
  .auth-branding-section {
    padding: 2rem 1.5rem;
    border-right: none;
    border-bottom: 1px solid rgba(74, 158, 255, 0.1);
  }
  
  .branding-content {
    max-width: 600px;
    text-align: center;
  }
  
  .feature-highlights {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .feature-item {
    flex: 1;
    min-width: 250px;
  }
  
  .process-steps {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .process-step {
    flex: 1;
    min-width: 200px;
  }
}

@media (max-width: 768px) {
  .auth-page-container {
    padding: 1rem;
  }
  
  .auth-branding-section,
  .auth-form-section {
    padding: 2rem 1rem;
  }
  
  .auth-title {
    font-size: 1.75rem;
  }
  
  .brand-logo h2 {
    font-size: 1.5rem;
  }
  
  .brand-tagline h3 {
    font-size: 1.25rem;
  }
  
  .feature-highlights {
    flex-direction: column;
  }
  
  .process-steps {
    flex-direction: column;
  }
  
  .form-options {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
}

@media (max-width: 480px) {
  .auth-content-wrapper {
    min-height: auto;
  }
  
  .auth-form-container {
    max-width: 100%;
  }
  
  .trust-indicators {
    justify-content: center;
  }
  
  .trust-item {
    font-size: 0.75rem;
  }
}

/* ========================================
   ACCESSIBILITY ENHANCEMENTS
======================================== */

@media (prefers-reduced-motion: reduce) {
  .animate-fade-in-up,
  .animate-slide-in-right,
  .animate-slide-down,
  .animate-shake {
    animation: none;
    opacity: 1;
    transform: none;
  }
  
  .auth-background-pattern {
    animation: none;
  }
  
  .btn-auth-primary::before {
    display: none;
  }
}

/* Focus styles for accessibility */
.btn-auth-primary:focus-visible,
.btn-auth-secondary:focus-visible,
.input-wrapper input:focus-visible {
  outline: 2px solid #4a9eff;
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .auth-background-pattern {
    display: none;
  }
  
  .input-wrapper input {
    border-width: 3px;
  }
  
  .btn-auth-primary {
    border: 2px solid #4a9eff;
  }
}