/* === AUTH LAYOUT STYLES === */

/* Global Auth Body */
body.auth-layout {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  margin: 0;
  padding: 0;
  width: 100% !important;
  height: 100% !important;
  overflow-x: hidden;
}

body.auth-layout .auth-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  width: 100vw;
  margin: 0;
  padding: 2rem;
  background: linear-gradient(135deg, 
    #0e0f12 0%, 
    #1a1d23 25%, 
    #0f1117 75%, 
    #12151b 100%);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
}

body.auth-layout .auth-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 30% 20%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
              radial-gradient(circle at 70% 80%, rgba(139, 92, 246, 0.08) 0%, transparent 50%);
  pointer-events: none;
}

body.auth-layout .auth-card {
  background: rgba(26, 29, 35, 0.95);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 3rem;
  width: 100%;
  max-width: 480px;
  box-shadow: 
    0 32px 64px rgba(0, 0, 0, 0.4),
    0 16px 32px rgba(0, 0, 0, 0.3),
    0 4px 16px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: relative;
  z-index: 1;
}

body.auth-layout .auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, 
    rgba(59, 130, 246, 0.03) 0%, 
    transparent 25%,
    transparent 75%,
    rgba(139, 92, 246, 0.03) 100%);
  border-radius: 20px;
  pointer-events: none;
}

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

body.auth-layout .auth-brand {
  position: relative;
  z-index: 2;
}

body.auth-layout .auth-logo {
  width: 48px;
  height: 48px;
  margin-bottom: 1.5rem;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

body.auth-layout .auth-title {
  font-size: 2rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 0.5rem 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

body.auth-layout .auth-subtitle {
  color: #9ca3af;
  font-size: 1rem;
  margin: 0;
  font-weight: 500;
}

body.auth-layout .auth-form {
  position: relative;
  z-index: 2;
}

body.auth-layout .auth-form-content {
  margin: 0;
}

/* === FORM STYLES === */

body.auth-layout .form-group {
  margin-bottom: 1.5rem;
}

body.auth-layout .form-label {
  display: block;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

body.auth-layout .input-wrapper {
  position: relative;
}

body.auth-layout .input-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #6b7280;
  font-size: 1.1rem;
  z-index: 10;
  pointer-events: none;
  font-weight: 500;
}

body.auth-layout .modern-input:focus + .input-icon {
  color: #3b82f6;
}

body.auth-layout .modern-input {
  width: 100%;
  padding: 0.875rem 1rem 0.875rem 2.75rem;
  background: rgba(17, 24, 39, 0.8);
  border: 1px solid rgba(75, 85, 99, 0.3);
  border-radius: 12px;
  color: #ffffff;
  font-size: 1rem;
  line-height: 1.5;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

body.auth-layout .modern-input:focus {
  outline: none;
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 
    0 0 0 3px rgba(59, 130, 246, 0.1),
    0 4px 12px rgba(59, 130, 246, 0.15);
  background: rgba(17, 24, 39, 0.95);
}

body.auth-layout .modern-input::placeholder {
  color: #6b7280;
}

body.auth-layout .modern-checkbox {
  width: 1rem;
  height: 1rem;
  background: rgba(17, 24, 39, 0.8);
  border: 1px solid rgba(75, 85, 99, 0.3);
  border-radius: 0.25rem;
  margin-right: 0.5rem;
}

body.auth-layout .modern-checkbox:checked {
  background: #3b82f6;
  border-color: #3b82f6;
}

body.auth-layout .modern-checkbox:focus {
  outline: none;
  box-shadow: 
    0 0 0 3px rgba(59, 130, 246, 0.1),
    0 4px 12px rgba(59, 130, 246, 0.15);
}

/* === AUTH OPTIONS === */

.auth-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}

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

.form-check-label {
  color: #d1d5db;
  font-size: 0.875rem;
  margin-left: 0.5rem;
}

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

.forgot-password-link:hover {
  color: #93c5fd;
}

.forgot-password-link:focus {
  outline: none;
  box-shadow: 
    0 0 0 3px rgba(59, 130, 246, 0.1),
    0 4px 12px rgba(59, 130, 246, 0.15);
}

/* === AUTH ACTIONS === */

.auth-actions {
  margin-bottom: 2rem;
}

.login-divider {
  text-align: center;
  margin: 1.5rem 0;
  position: relative;
  color: #6b7280;
  font-size: 0.875rem;
}

.login-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(75, 85, 99, 0.3);
}

.login-divider span {
  background: rgba(26, 29, 35, 0.95);
  padding: 0 1rem;
  position: relative;
  z-index: 1;
}

/* === PASSKEY STYLES === */

.passkey-flow {
  text-align: center;
}

.passkey-info {
  margin-bottom: 2rem;
}

.passkey-icon {
  font-size: 3rem;
  color: #3b82f6;
  margin-bottom: 1rem;
}

.passkey-text {
  color: #d1d5db;
  font-size: 0.875rem;
  line-height: 1.6;
}

.passkey-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* === AUTH FOOTER === */

.auth-footer {
  text-align: center;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(75, 85, 99, 0.2);
  position: relative;
  z-index: 2;
}

.auth-footer-text {
  color: #9ca3af;
  font-size: 0.875rem;
  margin: 0;
}

.auth-footer-link {
  color: #60a5fa;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.auth-footer-link:hover {
  color: #93c5fd;
}

.auth-footer-link:focus {
  outline: none;
  box-shadow: 
    0 0 0 3px rgba(59, 130, 246, 0.1),
    0 4px 12px rgba(59, 130, 246, 0.15);
}

/* === REGISTRATION PAGE STYLES === */

.auth-register .auth-title {
  color: #ffffff;
}

.auth-register .auth-subtitle {
  color: #9ca3af;
}

.auth-register .modern-input {
  background: rgba(17, 24, 39, 0.8);
  border: 1px solid rgba(75, 85, 99, 0.3);
}

/* === ENHANCED FOCUS STATES === */

.modern-input:focus,
.modern-checkbox:focus,
.auth-footer-link:focus,
.forgot-password-link:focus {
  outline: none;
  box-shadow: 
    0 0 0 3px rgba(59, 130, 246, 0.1),
    0 4px 12px rgba(59, 130, 246, 0.15);
}

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

@media (max-width: 768px) {
  .auth-container {
    padding: 1rem;
  }
  
  .auth-card {
    padding: 2rem;
    border-radius: 16px;
    margin: 0;
    max-width: calc(100vw - 2rem);
  }
  
  .auth-title {
    font-size: 1.75rem;
  }
  
  .auth-options {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .auth-container {
    padding: 0.75rem;
  }
  
  .auth-card {
    padding: 1.5rem;
    max-width: calc(100vw - 1.5rem);
    border-radius: 12px;
  }
  
  .auth-title {
    font-size: 1.5rem;
  }
  
  .modern-input {
    padding: 0.75rem 1rem 0.75rem 2.5rem;
  }
}

/* === DARK MODE ENHANCEMENTS === */

@media (prefers-color-scheme: dark) {
  .auth-container {
    background: linear-gradient(135deg, 
      #0a0b0d 0%, 
      #1a1d23 25%, 
      #0f1117 75%, 
      #12151b 100%);
  }
  
  .auth-card {
    background: rgba(20, 23, 29, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.06);
  }
  
  .modern-input {
    background: rgba(13, 20, 35, 0.9);
    border: 1px solid rgba(75, 85, 99, 0.25);
  }
}

/* === ONBOARDING SPECIFIC STYLES === */

/* Multi-step form styles */
.step-indicator {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 2rem 0;
  gap: 1rem;
}

.step-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 16px;
  transition: all 0.3s ease;
  position: relative;
}

.step-circle.active {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: white;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4);
}

.step-circle.completed {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
}

.step-circle:not(.active):not(.completed) {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.6);
}

.step-connector {
  width: 60px;
  height: 2px;
  background: rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.step-connector.completed {
  background: linear-gradient(90deg, #10b981 0%, #059669 100%);
}

.step-form-section {
  display: none;
  animation: fadeIn 0.3s ease-in-out;
}

.step-form-section.active {
  display: block;
}

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

.step-navigation {
  display: flex;
  justify-content: center !important;
  margin-top: 2rem;
  gap: 1rem;
  align-items: center;
}

/* Step navigation buttons must match sign-in button exactly */
body.auth-layout .step-navigation .btn.btn-vault-modern {
  padding: 0.75rem 1.5rem !important;
  font-size: 1rem !important;
  line-height: 1.5 !important;
  height: auto !important;
  min-height: auto !important;
  max-height: none !important;
  width: auto !important;
  max-width: none !important;
  flex-grow: 0 !important;
  flex-shrink: 0 !important;
  flex-basis: auto !important;
}

/* Button visibility control for step navigation */
body.auth-layout .step-navigation .btn.btn-hidden {
  display: none !important;
}

.step-title {
  text-align: center;
  margin-bottom: 1.5rem;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.1rem;
  font-weight: 600;
}

/* Override form styling for onboarding registration to match sign-in page */
body.auth-layout .auth-container:has(.step-indicator) .modern-input {
  background: rgba(255, 255, 255, 0.95) !important;
  border: 1px solid rgba(0, 0, 0, 0.15) !important;
  color: #1f2937 !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

body.auth-layout .auth-container:has(.step-indicator) .modern-input:focus {
  background: rgba(255, 255, 255, 1) !important;
  border: 1px solid rgba(59, 130, 246, 0.4) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
}

/* Icons in onboarding registration */
body.auth-layout .auth-container:has(.step-indicator) .input-icon {
  color: #6b7280 !important;
}

body.auth-layout .auth-container:has(.step-indicator) .input-wrapper:focus-within .input-icon {
  color: rgba(59, 130, 246, 0.8) !important;
}

/* Placeholder text for onboarding registration */
body.auth-layout .auth-container:has(.step-indicator) .modern-input::placeholder {
  color: #9ca3af !important;
}

/* Checkbox styling for onboarding registration */
body.auth-layout .auth-container:has(.step-indicator) .modern-checkbox {
  background: rgba(255, 255, 255, 0.95) !important;
  border: 1px solid rgba(0, 0, 0, 0.15) !important;
}

body.auth-layout .auth-container:has(.step-indicator) .modern-checkbox:checked {
  background: #3b82f6 !important;
  border-color: #3b82f6 !important;
}

/* Form validation styling for multi-step form */
body.auth-layout .auth-container:has(.step-indicator) .modern-input.is-invalid {
  border-color: #dc3545 !important;
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

body.auth-layout .auth-container:has(.step-indicator) .modern-input.is-valid {
  border-color: #28a745 !important;
  box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25) !important;
}

/* Responsive design for multi-step form */
@media (max-width: 768px) {
  .step-indicator {
    gap: 0.5rem;
  }
  
  .step-circle {
    width: 35px;
    height: 35px;
    font-size: 14px;
  }
  
  .step-connector {
    width: 40px;
  }
  
  .step-navigation {
    flex-direction: column;
    justify-content: center !important;
  }
  
  body.auth-layout .step-navigation .btn.btn-vault-modern {
    max-width: none;
    width: 100%;
    padding: 0.75rem 1.5rem !important;
    font-size: 1rem !important;
    line-height: 1.5 !important;
    height: auto !important;
    min-height: auto !important;
    flex-grow: 0 !important;
    flex-shrink: 0 !important;
    flex-basis: auto !important;
  }
} 