/* Authentication Templates CSS - Centralized styles for all auth pages */

/* Auth Container Styles */
.auth-container {
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 0;
}

.auth-card {
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  max-width: 450px;
  width: 100%;
  margin: 0 1rem;
}

/* Auth Header Styles */
.auth-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  text-align: center;
  padding: 3rem 2rem 2rem;
  position: relative;
}

.auth-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.1'%3E%3Ccircle cx='30' cy='30' r='4'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E")
    repeat;
}

.auth-header h1 {
  font-size: 2rem;
  font-weight: 600;
  margin: 0;
  position: relative;
  z-index: 1;
}

.auth-header p {
  margin: 0.5rem 0 0;
  opacity: 0.9;
  position: relative;
  z-index: 1;
}

/* Success Icon Styles */
.success-icon {
  font-size: 4rem;
  color: #28a745;
  margin-bottom: 1rem;
}

/* Auth Body Styles */
.auth-body {
  padding: 2.5rem;
}

/* Form Styles */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  font-weight: 600;
  color: #4a5568;
  margin-bottom: 0.5rem;
  display: block;
}

.form-control {
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: #f8fafc;
  width: 100%;
  box-sizing: border-box;
}

.form-control:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
  background: white;
  outline: none;
}

/* Django form field styling */
.field-error {
  margin-top: 0.5rem;
}

.text-danger {
  color: #e53e3e;
  font-size: 0.875rem;
}

/* Django form field classes */
#id_username,
#id_password,
input[name="username"],
input[name="password"],
input[type="text"],
input[type="password"],
input[type="email"] {
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: #f8fafc;
  width: 100%;
  box-sizing: border-box;
  font-family: inherit;
}

#id_username:focus,
#id_password:focus,
input[name="username"]:focus,
input[name="password"]:focus,
input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
  background: white;
  outline: none;
}

/* Form field placeholder styling */
#id_username::placeholder,
#id_password::placeholder,
input[name="username"]::placeholder,
input[name="password"]::placeholder,
input[type="text"]::placeholder,
input[type="password"]::placeholder,
input[type="email"]::placeholder {
  color: #a0aec0;
  opacity: 1;
}

/* Form field autofill styling */
#id_username:-webkit-autofill,
#id_password:-webkit-autofill,
input[name="username"]:-webkit-autofill,
input[name="password"]:-webkit-autofill,
input[type="text"]:-webkit-autofill,
input[type="password"]:-webkit-autofill,
input[type="email"]:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 30px #f8fafc inset;
  -webkit-text-fill-color: #4a5568;
}

/* Form field hover state */
#id_username:hover,
#id_password:hover,
input[name="username"]:hover,
input[name="password"]:hover,
input[type="text"]:hover,
input[type="password"]:hover,
input[type="email"]:hover {
  border-color: #cbd5e0;
  background: #edf2f7;
}

/* Button Styles */
.btn-login {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 12px;
  padding: 0.875rem 2rem;
  font-weight: 600;
  font-size: 1rem;
  color: white;
  width: 100%;
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn-register {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%) !important;
  border: none !important;
  border-radius: 12px !important;
  padding: 0.875rem 2rem !important;
  font-weight: 600 !important;
  font-size: 1rem !important;
  color: white !important;
  width: 100% !important;
  transition: all 0.3s ease !important;
  cursor: pointer !important;
  display: inline-block !important;
  text-align: center !important;
  text-decoration: none !important;
  line-height: 1.5 !important;
  vertical-align: middle !important;
  -webkit-user-select: none !important;
  user-select: none !important;
}

.btn-register:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(79, 172, 254, 0.3);
  color: white;
}

.btn-register:focus {
  box-shadow: 0 0 0 0.2rem rgba(79, 172, 254, 0.5);
  color: white;
  outline: none;
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

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

/* Alert Styles */
.alert-custom {
  padding: 1rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  font-weight: 500;
  display: flex;
  align-items: center;
}

.alert-error {
  background: #fed7d7;
  color: #c53030;
  border: 1px solid #feb2b2;
}

.alert-success {
  background: #c6f6d5;
  color: #2f855a;
  border: 1px solid #9ae6b4;
}

.alert-info {
  background: #bee3f8;
  color: #2b6cb0;
  border: 1px solid #90cdf4;
}

/* Auth Links Styles */
.auth-links {
  margin-top: 2rem;
  text-align: center;
}

.auth-links a {
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
  display: block;
  margin-bottom: 0.75rem;
}

.auth-links a:hover {
  color: #5a67d8;
  text-decoration: underline;
}

/* Success Message Styles */
.success-message {
  background: #f0fff4;
  border: 1px solid #9ae6b4;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.success-message h3 {
  color: #2f855a;
  margin-bottom: 1rem;
}

.success-message p {
  color: #4a5568;
  line-height: 1.6;
}

/* Info Box Styles */
.info-box {
  background: #f7fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.info-box h4 {
  color: #4a5568;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.info-box ul {
  color: #4a5568;
  line-height: 1.8;
  margin: 0;
  padding-left: 1.5rem;
}

/* Action Buttons Styles */
.action-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 0.875rem 2rem;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
  color: white;
  text-decoration: none;
}

.btn-secondary {
  background: #e2e8f0 !important;
  color: #4a5568 !important;
  padding: 0.875rem 2rem !important;
  border-radius: 12px !important;
  text-decoration: none !important;
  font-weight: 600 !important;
  transition: all 0.3s ease !important;
  border: none !important;
  cursor: pointer !important;
  width: 100% !important;
  display: inline-block !important;
  text-align: center !important;
  line-height: 1.5 !important;
  vertical-align: middle !important;
  -webkit-user-select: none !important;
  user-select: none !important;
}

.btn-secondary:hover {
  background: #cbd5e0 !important;
  color: #2d3748 !important;
  text-decoration: none !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1) !important;
}

/* Error Messages */
.error-messages {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.error-messages ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.error-messages li {
  color: #dc2626;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.error-messages li:last-child {
  margin-bottom: 0;
}

.error-messages i {
  color: #dc2626;
  font-size: 0.875rem;
}

/* Button Spacing */
.button-spacing {
  height: 1rem;
  margin: 1rem 0;
}

/* Hidden Class */
.hidden {
  display: none;
}

/* Password Reset Specific Styles */
.btn-reset {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%) !important;
  border: none !important;
  border-radius: 12px !important;
  padding: 0.875rem 2rem !important;
  font-weight: 600 !important;
  font-size: 1rem !important;
  color: white !important;
  width: 100% !important;
  transition: all 0.3s ease !important;
  cursor: pointer !important;
  display: inline-block !important;
  text-align: center !important;
  text-decoration: none !important;
  line-height: 1.5 !important;
  vertical-align: middle !important;
  -webkit-user-select: none !important;
  user-select: none !important;
}

.btn-reset:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(240, 147, 251, 0.3);
}

.btn-reset:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.step-content {
  display: none;
  animation: fadeIn 0.5s ease;
}

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

.step-title {
  text-align: center;
  margin-bottom: 2rem;
  color: #4a5568;
}

.step-title-small {
  text-align: center;
  margin-bottom: 1rem;
  color: #4a5568;
}

.step-message {
  text-align: center;
  color: #666;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.step-list {
  margin: 10px 0;
  padding-left: 20px;
  color: #666;
}

/* Animation Keyframes */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

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

/* Success Icon with Animation */
.success-icon {
  background: linear-gradient(135deg, #f093fb, #f5576c);
  color: white;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 2rem;
  font-size: 32px;
  animation: pulse 2s infinite;
}

/* Loading Spinner */
.loading {
  display: none;
  text-align: center;
  margin: 1rem 0;
}

.spinner {
  border: 3px solid #f3f3f3;
  border-top: 3px solid #f093fb;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

/* Error and Success Messages */
.error-message {
  background: #fee;
  border: 1px solid #fcc;
  color: #c33;
  padding: 1rem;
  border-radius: 8px;
  margin: 1rem 0;
  display: none;
}

.success-message {
  background: #efe;
  border: 1px solid #cfc;
  color: #3c3;
  padding: 1rem;
  border-radius: 8px;
  margin: 1rem 0;
  display: none;
}

/* Password Requirements Box */
.password-requirements {
  background: #f7fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1rem;
  margin-top: 0.5rem;
  font-size: 0.875rem;
}

.password-requirements ul {
  margin: 0;
  padding-left: 1.25rem;
  color: #718096;
}

/* Form Row Layout */
.row.form-row {
  margin: 0 -0.5rem;
}

.row.form-row .col-md-6 {
  padding: 0 0.5rem;
}

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

  .auth-card {
    margin: 0;
    border-radius: 15px;
  }

  .auth-header {
    padding: 2rem 1.5rem 1.5rem;
  }

  .auth-body {
    padding: 2rem 1.5rem;
  }

  .action-buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
    text-align: center;
  }
}
