/**
 * Authentication Styles - Dark Theme
 * Login, Registration, and Verification Pages
 */

/* ===== Auth Page Layout ===== */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  padding: 2rem 1rem;
  position: relative;
  overflow: hidden;
}

/* Background Decorations */
.auth-page::before {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  top: -200px;
  right: -150px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.auth-page::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  bottom: -150px;
  left: -100px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.12) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

/* ===== Auth Container ===== */
.auth-container {
  width: 100%;
  max-width: 480px;
  position: relative;
  z-index: 1;
  animation: slideUp 0.5s ease-out;
}

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

/* ===== Auth Card ===== */
.auth-card {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  border-radius: 24px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
  padding: 3rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
}

.auth-card::before {
  content: '';
  position: absolute;
  width: 150px;
  height: 150px;
  top: -50px;
  left: -50px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.2) 0%, transparent 70%);
  filter: blur(40px);
  pointer-events: none;
}

.auth-card::after {
  content: '';
  position: absolute;
  width: 150px;
  height: 150px;
  bottom: -50px;
  right: -50px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.2) 0%, transparent 70%);
  filter: blur(40px);
  pointer-events: none;
}

/* ===== Auth Header ===== */
.auth-header {
  text-align: center;
  margin-bottom: 2rem;
  position: relative;
  z-index: 1;
}

.auth-logo {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 2rem;
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
  animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 12px 35px rgba(99, 102, 241, 0.5);
  }
}

.auth-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
}

.auth-subtitle {
  font-size: 1rem;
  color: #94a3b8;
  margin-bottom: 0;
}

/* ===== Form Styles ===== */
.auth-card .form-label {
  color: #e2e8f0;
  font-weight: 500;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.auth-card .form-label .required {
  color: #f87171;
}

.auth-card .form-control {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.auth-card .form-control::placeholder {
  color: #64748b;
}

.auth-card .form-control:focus {
  background: rgba(15, 23, 42, 0.7);
  border-color: #6366F1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
  color: #fff;
}

.auth-card .input-group-text {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-right: none;
  color: #6366F1;
  border-radius: 12px 0 0 12px;
}

.auth-card .input-group .form-control {
  border-radius: 0 12px 12px 0;
}

.auth-card .input-group .form-control:focus {
  border-left-color: transparent;
}

.auth-card .toggle-password {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-left: none;
  color: #64748b;
  border-radius: 0 12px 12px 0;
  transition: all 0.3s ease;
}

.auth-card .toggle-password:hover {
  color: #6366F1;
  background: rgba(99, 102, 241, 0.1);
}

.auth-card .input-group:has(.toggle-password) .form-control {
  border-radius: 0;
}

/* Checkbox Styles */
.auth-card .form-check-input {
  background-color: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.2);
  width: 1.1rem;
  height: 1.1rem;
}

.auth-card .form-check-input:checked {
  background-color: #6366F1;
  border-color: #6366F1;
}

.auth-card .form-check-input:focus {
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.auth-card .form-check-label {
  color: #94a3b8;
  font-size: 0.9rem;
}

/* Form Help Text */
.auth-card .form-help,
.auth-card small.form-help {
  color: #64748b;
  font-size: 0.8rem;
  margin-top: 0.25rem;
  display: block;
}

/* Form Errors */
.auth-card .form-error {
  color: #f87171;
  font-size: 0.8rem;
  margin-top: 0.25rem;
  display: block;
}

.auth-card .form-success {
  color: #4ade80;
  font-size: 0.8rem;
  margin-top: 0.25rem;
  display: block;
}

/* ===== Buttons ===== */
.auth-card .btn-primary {
  background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
  border: none;
  color: #fff;
  padding: 0.875rem 1.5rem;
  font-weight: 600;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
  transition: all 0.3s ease;
}

.auth-card .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(99, 102, 241, 0.5);
}

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

.auth-card .btn-outline-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  padding: 0.875rem 1.5rem;
  font-weight: 600;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.auth-card .btn-outline-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* ===== Links ===== */
.auth-card a {
  color: #a5b4fc;
  text-decoration: none;
  transition: color 0.3s ease;
}

.auth-card a:hover {
  color: #c7d2fe;
  text-decoration: underline;
}

.auth-card .text-muted {
  color: #64748b !important;
}

.auth-card .text-primary {
  color: #a5b4fc !important;
}

/* ===== Multi-Step Form ===== */
.step-indicator {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
  position: relative;
  gap: 60px;
}

.step-indicator::before {
  content: '';
  position: absolute;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 2px;
  background-color: rgba(255, 255, 255, 0.1);
  z-index: 0;
}

.step-indicator .step {
  position: relative;
  z-index: 1;
  text-align: center;
}

.step-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.step.active .step-number {
  background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
}

.step.completed .step-number {
  background: linear-gradient(135deg, #10B981 0%, #34D399 100%);
  color: #fff;
}

.step-label {
  font-size: 0.8rem;
  color: #64748b;
  font-weight: 500;
}

.step.active .step-label {
  color: #a5b4fc;
  font-weight: 600;
}

.step.completed .step-label {
  color: #4ade80;
}

/* ===== Form Steps ===== */
.form-step {
  display: none;
  animation: fadeIn 0.4s ease-out;
}

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

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

.form-step h5 {
  color: #e2e8f0;
  font-weight: 600;
}

/* ===== Role Selection ===== */
.role-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.role-card {
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 1.5rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: rgba(15, 23, 42, 0.5);
}

.role-card:hover {
  border-color: #6366F1;
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.2);
  background: rgba(99, 102, 241, 0.1);
}

.role-card input[type="radio"] {
  display: none;
}

.role-card input[type="radio"]:checked + .role-content {
  color: #a5b4fc;
}

.role-card:has(input[type="radio"]:checked) {
  border-color: #6366F1;
  background: rgba(99, 102, 241, 0.15);
}

.role-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  display: block;
  transition: transform 0.3s ease;
}

.role-card:hover .role-icon {
  transform: scale(1.1);
}

.role-title {
  font-size: 1rem;
  font-weight: 600;
  color: #e2e8f0;
  margin-bottom: 0.25rem;
}

.role-description {
  font-size: 0.875rem;
  color: #64748b;
}

/* ===== Auth Footer ===== */
.auth-footer {
  text-align: center;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  z-index: 1;
}

.auth-footer p {
  color: #64748b;
  margin-bottom: 0.5rem;
}

.auth-footer a {
  color: #a5b4fc;
  font-weight: 600;
  transition: all 0.3s ease;
}

.auth-footer a:hover {
  color: #c7d2fe;
  text-decoration: underline;
}

/* ===== Password Strength Indicator ===== */
.password-strength {
  margin-top: 0.75rem;
  display: none;
}

.password-strength.show {
  display: block;
}

.password-strength-bar {
  height: 4px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

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

.password-strength-fill.weak {
  width: 33%;
  background: linear-gradient(90deg, #EF4444, #F87171);
}

.password-strength-fill.medium {
  width: 66%;
  background: linear-gradient(90deg, #F59E0B, #FBBF24);
}

.password-strength-fill.strong {
  width: 100%;
  background: linear-gradient(90deg, #10B981, #34D399);
}

.password-strength-text {
  font-size: 0.8rem;
  font-weight: 600;
}

.password-strength-text.weak { color: #f87171; }
.password-strength-text.medium { color: #fbbf24; }
.password-strength-text.strong { color: #4ade80; }

/* ===== OTP Input ===== */
.otp-input-group {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.otp-input {
  width: 50px;
  height: 50px;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 600;
  background: rgba(15, 23, 42, 0.5);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: #fff;
  transition: all 0.3s ease;
}

.otp-input:focus {
  border-color: #6366F1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
  outline: none;
}

.otp-input.filled {
  border-color: #10B981;
  background: rgba(16, 185, 129, 0.1);
}

/* ===== Resend OTP ===== */
.resend-otp {
  text-align: center;
  margin-top: 1rem;
}

.resend-btn {
  color: #64748b;
  font-size: 0.875rem;
  background: none;
  border: none;
  cursor: not-allowed;
  padding: 0;
}

.resend-btn.active {
  color: #a5b4fc;
  cursor: pointer;
  font-weight: 600;
}

.resend-btn.active:hover {
  color: #c7d2fe;
  text-decoration: underline;
}

/* ===== Success Animation ===== */
.success-animation {
  text-align: center;
  padding: 2rem;
}

.success-checkmark {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #10B981 0%, #34D399 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: successScale 0.5s ease-out;
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

@keyframes successScale {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.success-checkmark svg {
  width: 50px;
  height: 50px;
  stroke: #fff;
  stroke-width: 3;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: drawCheck 0.5s ease-out 0.3s forwards;
}

@keyframes drawCheck {
  to {
    stroke-dashoffset: 0;
  }
}

/* ===== Alert Styles ===== */
.auth-card .alert {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: #e2e8f0;
}

.auth-card .alert-danger {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.auth-card .alert-success {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
}

.auth-card .alert-warning {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.3);
  color: #fcd34d;
}

/* ===== Row/Grid Styles ===== */
.auth-card .row {
  position: relative;
  z-index: 1;
}

/* ===== Responsive Design ===== */
@media (max-width: 576px) {
  .auth-page {
    padding: 1rem;
  }

  .auth-card {
    padding: 2rem 1.5rem;
    border-radius: 20px;
  }

  .auth-title {
    font-size: 1.5rem;
  }

  .auth-logo {
    width: 70px;
    height: 70px;
    font-size: 1.75rem;
    border-radius: 16px;
  }

  .role-grid {
    grid-template-columns: 1fr;
  }

  .otp-input {
    width: 45px;
    height: 45px;
    font-size: 1.25rem;
  }

  .step-indicator {
    gap: 40px;
  }

  .step-indicator::before {
    width: 40px;
  }

  .step-number {
    width: 28px;
    height: 28px;
    font-size: 0.8rem;
  }

  .step-label {
    font-size: 0.75rem;
  }
}
