/* ============================
   AUTH PAGES SCRATCH THEME
   Login, Register, Forgot Password, etc.
   ============================ */

/* Auth Container */
.auth-container {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--scratch-light-blue), var(--scratch-light-purple));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--scratch-space-lg);
}

.auth-card {
  max-width: 400px;
  width: 100%;
  background: white;
  border-radius: var(--scratch-radius-md);
  box-shadow: var(--scratch-shadow-lg);
  overflow: hidden;
  animation: scratch-float 3s ease-in-out infinite;
}

.auth-header {
  background: linear-gradient(135deg, var(--scratch-blue), var(--scratch-purple));
  color: white;
  text-align: center;
  padding: var(--scratch-space-xl);
}

.auth-header h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
}

.auth-header p {
  margin: var(--scratch-space-sm) 0 0 0;
  opacity: 0.9;
}

.auth-body {
  padding: var(--scratch-space-xl);
}

.auth-form .form-group {
  margin-bottom: var(--scratch-space-lg);
}

.auth-form .form-label {
  color: var(--scratch-text-primary);
  font-weight: 600;
  margin-bottom: var(--scratch-space-sm);
  display: block;
}

.auth-form .form-control {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid var(--scratch-dark-gray);
  border-radius: var(--scratch-radius-sm);
  font-size: 16px;
  transition: all 0.2s ease;
  background: white;
}

.auth-form .form-control:focus {
  border-color: var(--scratch-blue);
  box-shadow: 0 0 0 3px rgba(76, 151, 255, 0.2);
  outline: none;
}

.auth-form .btn-primary {
  width: 100%;
  padding: 14px;
  font-size: 16px;
  font-weight: 600;
  border-radius: var(--scratch-radius-lg);
  background: linear-gradient(135deg, var(--scratch-blue), #3D7EDB);
  border: none;
  color: white;
  transition: all 0.2s ease;
  margin-top: var(--scratch-space-md);
}

.auth-form .btn-primary:hover {
  background: linear-gradient(135deg, #3D7EDB, var(--scratch-blue));
  transform: translateY(-2px);
  box-shadow: var(--scratch-shadow-md);
}

.auth-links {
  text-align: center;
  margin-top: var(--scratch-space-lg);
  padding-top: var(--scratch-space-lg);
  border-top: 1px solid var(--scratch-dark-gray);
}

.auth-links a {
  color: var(--scratch-blue);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.auth-links a:hover {
  color: var(--scratch-purple);
  text-decoration: underline;
}

.auth-divider {
  text-align: center;
  margin: var(--scratch-space-lg) 0;
  position: relative;
}

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

.auth-divider span {
  background: white;
  padding: 0 var(--scratch-space-md);
  color: var(--scratch-text-secondary);
  font-size: 14px;
}

/* Verification Code Input */
.verification-input {
  text-align: center;
  font-size: 24px;
  letter-spacing: 8px;
  font-weight: 600;
  color: var(--scratch-blue);
}

/* Password Strength Indicator */
.password-strength {
  margin-top: var(--scratch-space-sm);
  height: 4px;
  background: var(--scratch-gray);
  border-radius: 2px;
  overflow: hidden;
}

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

.password-strength-weak { background: var(--scratch-red); width: 25%; }
.password-strength-medium { background: var(--scratch-orange); width: 50%; }
.password-strength-strong { background: var(--scratch-yellow); width: 75%; }
.password-strength-very-strong { background: var(--scratch-green); width: 100%; }

/* Error Messages */
.auth-error {
  background: rgba(255, 102, 128, 0.1);
  border: 1px solid var(--scratch-red);
  border-radius: var(--scratch-radius-sm);
  padding: var(--scratch-space-md);
  margin-bottom: var(--scratch-space-lg);
  color: var(--scratch-red);
  text-align: center;
  font-weight: 500;
}

/* Success Messages */
.auth-success {
  background: rgba(64, 191, 74, 0.1);
  border: 1px solid var(--scratch-green);
  border-radius: var(--scratch-radius-sm);
  padding: var(--scratch-space-md);
  margin-bottom: var(--scratch-space-lg);
  color: var(--scratch-green);
  text-align: center;
  font-weight: 500;
}

/* Loading State */
.auth-loading {
  position: relative;
  pointer-events: none;
}

.auth-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid transparent;
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Responsive Design */
@media (max-width: 480px) {
  .auth-container {
    padding: var(--scratch-space-md);
  }
  
  .auth-card {
    margin: 0;
  }
  
  .auth-header,
  .auth-body {
    padding: var(--scratch-space-lg);
  }
  
  .auth-header h1 {
    font-size: 24px;
  }
}

/* ============================
   DARK MODE SUPPORT
   ============================ */

html.dark .auth-container {
  background: linear-gradient(135deg, var(--scratch-light-blue), var(--scratch-light-purple));
}

html.dark .auth-card {
  background: var(--scratch-bg-primary);
  color: var(--scratch-text-primary);
}

html.dark .auth-form .form-label {
  color: var(--scratch-text-primary);
}

html.dark .auth-form .form-control {
  background: var(--scratch-dark-input);
  color: var(--scratch-text-primary);
  border-color: var(--scratch-dark-border);
}

html.dark .auth-form .form-control:focus {
  border-color: var(--scratch-blue);
  box-shadow: 0 0 0 3px rgba(76, 151, 255, 0.3);
}

html.dark .auth-links a {
  color: var(--scratch-light-blue-alt);
}

html.dark .auth-links a:hover {
  color: var(--scratch-purple);
}

html.dark .auth-divider::before {
  background: var(--scratch-dark-border);
}

html.dark .auth-divider span {
  background: var(--scratch-bg-primary);
  color: var(--scratch-text-secondary);
}

html.dark .verification-input {
  color: var(--scratch-light-blue-alt);
}