.auth-container {
  min-height: calc(100vh - var(--navbar-height));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  background: var(--color-bg-subtle);
}

.auth-card {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: var(--space-8);
  width: 100%;
  max-width: 480px;
}

.auth-header {
  text-align: center;
  margin-bottom: var(--space-8);
}

.auth-header h1 {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  margin-bottom: var(--space-3);
}

.auth-header p {
  color: var(--color-text-muted);
  font-size: var(--font-size-lg);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.form-row {
  display: flex;
  gap: var(--space-4);
}

.form-row .form-group {
  flex: 1;
}

.form-group {
  margin: 0;
  position: relative;
}

.form-group label {
  display: block;
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.form-control {
  width: 100%;
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-bg-subtle);
  color: var(--color-text);
  font-size: var(--font-size-lg);
  transition: all 0.2s ease;
  height: 45px;
  line-height: normal;
}

.form-control:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px var(--color-primary-alpha);
}

/* Password input styling */
.password-group {
  position: relative;
}

.password-input-wrapper {
  position: relative;
  display: flex;
  align-items: stretch;
  width: 100%;
}

.password-input-wrapper .form-control {
  width: 100%;
  padding-right: 40px;
}

.password-toggle {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: 40px;
  background: none;
  border: none;
  border-left: 1px solid transparent;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6c757d;
  transition: color 0.2s;
  z-index: 2;
}

.password-toggle:hover {
  color: #007bff;
}

.password-toggle:focus {
  outline: none;
  color: #007bff;
}

.password-toggle i {
  font-size: 16px;
  line-height: 1;
}

/* Ensure the input group maintains alignment when validation icons appear */
.form-control.is-invalid,
.form-control.is-valid {
  background-position: right calc(2.375em + 0.1875rem) center;
}

/* Fix for any potential alignment issues with the form groups */
.form-group.password-group {
  margin-bottom: 20px;
}

.form-group.password-group .input-group {
  margin-bottom: 4px;
}

/* Password requirements */
.password-requirements {
  margin-top: var(--space-3);
  padding: var(--space-3);
  border-radius: var(--radius-lg);
  background: var(--color-bg-subtle);
}

.requirement {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-error);
  font-size: var(--font-size-sm);
  padding: var(--space-1) 0;
  transition: color 0.2s;
}

.requirement i {
  width: 16px;
  text-align: center;
}

.requirement.met {
  color: var(--color-success);
}

/* Button styling */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: inherit;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  line-height: 1.4;
}

.btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-primary {
  background: var(--gradient-primary);
  color: var(--color-text-inverse);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--color-surface);
  color: var(--color-text-primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-primary);
}

.btn-primary:hover i {
  color: var(--color-text-primary);
}

.btn-ghost {
  color: var(--color-text-primary);
  background: transparent;
  border: 1px solid var(--color-border);
}

.btn-ghost:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-text-inverse);
  transform: translateY(-1px);
}

.btn-ghost:hover i {
  color: var(--color-text-inverse);
}

.btn-xl {
  width: 100%;
  padding: 1rem 2rem;
  font-size: 1.125rem;
  height: 48px;
}

.btn i {
  font-size: var(--font-size-lg);
  transition: color var(--transition-fast);
}

/* Loading state for buttons */
.btn.loading {
  opacity: 0.7;
  pointer-events: none;
}

.btn.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--color-text-inverse);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Social auth buttons */
.btn-social {
  background: var(--color-surface);
  color: var(--color-text-primary);
  border: 1px solid var(--color-border);
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-size: var(--font-size-base);
}

.btn-social:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-text-inverse);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.btn-social:hover i {
  color: var(--color-text-inverse);
}

.auth-links {
  margin-top: var(--space-8);
  text-align: center;
  font-size: var(--font-size-base);
  color: var(--color-text-muted);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-border);
}

.auth-links a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s;
}

.auth-links a:hover {
  color: var(--color-primary-dark);
}

.auth-divider {
  margin: 0 var(--space-3);
  color: var(--color-text-muted);
}

/* Error and success messages */
.error-message {
  display: none;
  color: #dc3545;
  font-size: 14px;
  margin-top: 4px;
}

.success-message {
  display: none;
  color: #28a745;
  font-size: 14px;
  margin-top: 4px;
}

.error-message.show,
.success-message.show {
  display: block;
}

/* Remember me checkbox */
.remember-me {
  display: flex;
  align-items: center;
  margin-bottom: var(--space-4);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
  user-select: none;
}

.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
}

/* Media queries */
@media (max-width: 480px) {
  .auth-container {
    padding: var(--space-4);
  }

  .auth-card {
    padding: var(--space-6);
  }

  .form-row {
    flex-direction: column;
    gap: var(--space-6);
  }

  .auth-header h1 {
    font-size: var(--font-size-2xl);
  }
}

/* Form validation feedback styles */
.invalid-feedback {
  display: none;
  width: 100%;
  margin-top: 0.25rem;
  font-size: 14px;
  color: #dc3545;
}

.valid-feedback {
  display: none;
  width: 100%;
  margin-top: 0.25rem;
  font-size: 14px;
  color: #28a745;
}

/* Add icons to feedback messages */
.valid-feedback::before {
  content: '✓ ';
  font-weight: bold;
}

.invalid-feedback::before {
  content: '✕ ';
  font-weight: bold;
}

.form-control.is-invalid {
  border-color: #dc3545;
  padding-right: 12px;
  background-image: none;
}

.form-control.is-valid {
  border-color: #28a745;
  padding-right: 12px;
  background-image: none;
}

.form-control.is-invalid:focus,
.form-control.is-valid:focus {
  box-shadow: none;
}

/* Remove automatic display of feedback messages - let JavaScript control this */
/* .form-control.is-invalid ~ .invalid-feedback,
.form-control.is-valid ~ .valid-feedback {
  display: block;
} */

.form-check {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.form-check-input {
    margin-right: 8px;
    cursor: pointer;
}

.form-check-label {
    color: #666;
    font-size: 14px;
    cursor: pointer;
    user-select: none;
}

/* Ensure consistent spacing before the submit button */
.form-check.mb-3 {
    margin-bottom: 1.5rem !important;
} 