/* Auth Pages Styles - Aligned with Web Design */

:root {
  --color-bg: #0b0b0b;
  --color-bg-dark: #000;
  --color-surface: #121212;
  --color-border: rgba(255, 255, 255, 0.08);
  --color-text: #ffffff;
  --color-muted: rgba(255, 255, 255, 0.7);
  --color-success: #00c853;
  --color-success-hover: #23d96c;
  --color-success-soft: rgba(0, 200, 83, 0.12);
  --color-gold: #DAAF37;
  --color-warning: #FFB84D;
  --color-danger: #FF4D6D;
  --shadow-soft: 0 24px 80px rgba(0, 0, 0, 0.25);
}

/* Bootstrap Overrides for Auth Page */
.auth-container body,
body.bg-black {
  background: linear-gradient(135deg, var(--color-bg) 0%, var(--color-bg-dark) 100%) !important;
  color: var(--color-text);
  font-family: 'Poppins', sans-serif;
}

.main-content {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-bg) 0%, var(--color-bg-dark) 100%);
  position: relative;
  overflow: hidden;
  padding: 2rem 0;
  width: 100%;
}

/* Animated Background Elements */
.auth-background {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  overflow: hidden;
  z-index: 0;
}

.auth-gradient-1 {
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(0, 200, 83, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  top: -200px;
  right: -100px;
  animation: float 8s ease-in-out infinite;
}

.auth-gradient-2 {
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(218, 175, 55, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  bottom: -150px;
  left: -100px;
  animation: float 10s ease-in-out infinite reverse;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(30px);
  }
}

/* Auth Wrapper */
.auth-wrapper {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
}

.auth-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid rgba(0, 200, 83, 0.15);
  border-radius: 1.5rem;
  padding: 3rem 2rem;
  backdrop-filter: blur(10px);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.25);
  transition: all 0.3s ease;
}

/* Auth Header */
.auth-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.auth-logo img {
  width: 48px;
  height: 48px;
  border-radius: 0.75rem;
  box-shadow: 0 8px 25px rgba(0, 200, 83, 0.2);
}

.auth-logo-text {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
}

.auth-logo-text .highlight {
  color: var(--color-success);
}

.auth-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--color-text);
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.auth-subtitle {
  color: var(--color-muted);
  font-size: 0.95rem;
  margin-bottom: 0;
  line-height: 1.5;
}

/* Alert Box */
.auth-alert {
  background: rgba(0, 200, 83, 0.08);
  border: 1px solid rgba(0, 200, 83, 0.2);
  border-radius: 1rem;
  padding: 1rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.auth-alert-icon {
  color: var(--color-success);
  font-size: 1.25rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.auth-alert-text {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.5;
}

.auth-alert-text strong {
  color: var(--color-text);
  display: block;
  margin-bottom: 0.25rem;
}

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

.auth-form-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.75rem;
}

.auth-form-label i {
  color: var(--color-success);
  font-size: 1rem;
}

.auth-input {
  background: rgba(0, 0, 0, 0.3) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 0.75rem !important;
  padding: 0.875rem 1rem !important;
  color: var(--color-text) !important;
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  width: 100%;
}

.auth-input::placeholder {
  color: rgba(255, 255, 255, 0.4) !important;
}

.auth-input:focus {
  background: rgba(0, 0, 0, 0.4) !important;
  border-color: var(--color-success) !important;
  color: var(--color-text) !important;
  box-shadow: 0 0 0 3px rgba(0, 200, 83, 0.1) !important;
  outline: none;
}

.auth-input:invalid,
.auth-input.is-invalid {
  border-color: var(--color-danger) !important;
  background: rgba(255, 77, 109, 0.08) !important;
}

/* Form Actions */
.auth-form-actions {
  margin-bottom: 1.5rem;
}

.auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.975rem 1.5rem;
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: 0.75rem;
  transition: all 0.3s ease;
  text-decoration: none;
  cursor: pointer;
}

.auth-btn-primary {
  background: var(--color-success);
  color: #000;
}

/* Helper Text */
.auth-helper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.auth-helper-text {
  font-size: 0.85rem;
  color: var(--color-muted);
}

.auth-helper-link {
  color: var(--color-success);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.auth-helper-link:hover {
  color: var(--color-success-hover);
  text-decoration: underline;
}

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  margin: 2rem 0;
  gap: 1rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.auth-divider-text {
  color: var(--color-muted);
  font-size: 0.85rem;
  white-space: nowrap;
}

/* Footer */
.auth-footer {
  text-align: center;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.auth-footer-text {
  color: var(--color-muted);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.auth-footer-text a {
  color: var(--color-success);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.auth-footer-text a:hover {
  color: var(--color-success-hover);
}

/* Loading State */
.auth-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

.auth-btn.loading {
  position: relative;
  color: transparent;
}

.auth-btn.loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(0, 0, 0, 0.3);
  border-radius: 50%;
  border-top-color: #000;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Checkbox Styling */
.form-check-input {
  width: 18px !important;
  height: 18px !important;
  border-radius: 0.35rem !important;
  margin-top: 0.15rem;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.1) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  cursor: pointer;
}

.form-check-input:checked {
  background-color: var(--color-success) !important;
  border-color: var(--color-success) !important;
}

.form-check-input:focus {
  border-color: var(--color-success) !important;
  box-shadow: 0 0 0 0.25rem rgba(0, 200, 83, 0.25) !important;
}

/* Validation Feedback - jQuery Validate Only */
.invalid-feedback {
  display: none;
  color: var(--color-danger);
  font-size: 0.85rem;
  margin-top: 0.5rem;
  font-family: 'Poppins', sans-serif;
}

/* Show feedback only when input is invalid (jQuery Validate adds .is-invalid) */
.auth-input.is-invalid {
  border-color: var(--color-danger) !important;
  background: rgba(255, 77, 109, 0.08) !important;
}

.auth-input.is-invalid + .invalid-feedback {
  display: block;
}

/* Prevent Bootstrap's needs-validation from affecting styles */
.needs-validation .was-validated .auth-input {
  border-color: inherit;
  background: inherit;
}

.is-invalid {
  border-color: var(--color-danger) !important;
}

/* Toast Positioning */
.toast-container,
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 99999;
}

#toast-container > div,
.toast-container .toast {
  font-family: 'Poppins', sans-serif;
  border: none;
  border-left: 4px solid var(--color-success);
  background-color: rgba(0, 0, 0, 0.8) !important;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  background-repeat: no-repeat !important;
  background-position: 15px center !important;
}

.toast-container .toast.bg-danger,
#toast-container > .toast-error {
  border-left-color: var(--color-danger);
}

.toast-container .toast.bg-warning,
#toast-container > .toast-warning {
  border-left-color: var(--color-warning);
}

.toast-container .toast.bg-info,
#toast-container > .toast-info {
  border-left-color: var(--color-info);
}

#toast-container > .toast-success {
  border-left-color: var(--color-success);
}

.toast-container .toast-body,
#toast-container .toast-title,
#toast-container .toast-message {
  color: var(--color-text);
}

/* Responsive */
@media (max-width: 576px) {
  .auth-card {
    padding: 2rem 1.5rem;
    border-radius: 1.25rem;
  }

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

  .auth-subtitle {
    font-size: 0.9rem;
  }

  .auth-wrapper {
    padding: 1rem;
  }

  .auth-logo-text {
    font-size: 1.25rem;
  }

  .auth-helper {
    flex-direction: column;
    align-items: flex-start;
  }

  .auth-logo {
    flex-direction: column;
  }

  .auth-logo img {
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 360px) {
  .auth-card {
    padding: 1.5rem 1rem;
  }

  .auth-form-group {
    margin-bottom: 1.25rem;
  }

  .auth-btn {
    padding: 0.875rem 1rem;
    font-size: 0.9rem;
  }

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

  .auth-input {
    padding: 0.75rem 0.875rem !important;
    font-size: 0.9rem;
  }
}
