/* Budget Management System - Authentication Pages Styling */

.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 1rem;
}

.auth-wrapper {
  width: 100%;
  max-width: 900px;
  background-color: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}

.auth-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.auth-form-wrapper {
  padding: 3rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-info-wrapper {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 3rem 2rem;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-logo {
  margin-bottom: 2rem;
  text-align: center;
}

.auth-logo-image {
  height: 3rem;
  margin-bottom: 0.5rem;
}

.auth-logo-text {
  font-size: 1.25rem;
  font-weight: 700;
}

.auth-title {
  font-size: 1.875rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

.auth-subtitle {
  color: var(--text-lighter);
  margin-bottom: 2rem;
  font-size: 0.875rem;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.auth-input-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.auth-form-label {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-color);
}

.auth-form-control {
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.auth-form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.auth-form-control::placeholder {
  color: var(--text-lighter);
}

.auth-form-control.error {
  border-color: var(--danger-color);
}

.auth-form-error {
  color: var(--danger-color);
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

.auth-form-group {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
}

.auth-remember {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.auth-remember-input {
  cursor: pointer;
}

.auth-remember-label {
  cursor: pointer;
}

.auth-forgot-link {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

.auth-forgot-link:hover {
  color: var(--primary-dark);
}

.auth-submit-btn {
  padding: 0.875rem;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  background-color: var(--primary-color);
  color: white;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.auth-submit-btn:hover:not(:disabled) {
  background-color: var(--primary-dark);
}

.auth-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
}

.auth-divider-line {
  flex: 1;
  height: 1px;
  background-color: var(--border-color);
}

.auth-divider-text {
  font-size: 0.75rem;
  color: var(--text-lighter);
  font-weight: 600;
}

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.875rem;
}

.auth-footer-text {
  color: var(--text-lighter);
  margin-right: 0.5rem;
}

.auth-footer-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

.auth-footer-link:hover {
  color: var(--primary-dark);
}

.auth-info-title {
  font-size: 1.875rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.auth-info-description {
  font-size: 0.875rem;
  line-height: 1.6;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.auth-info-features {
  list-style: none;
}

.auth-info-feature {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

.auth-info-feature-icon {
  font-size: 1.25rem;
  margin-top: 0.125rem;
}

.auth-info-feature-text {
  line-height: 1.5;
}

/* Alert messages */
.auth-alert {
  padding: 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-1rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-alert-success {
  background-color: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.auth-alert-error {
  background-color: #fee2e2;
  color: #7f1d1d;
  border: 1px solid #fecaca;
}

.auth-alert-warning {
  background-color: #fef3c7;
  color: #78350f;
  border: 1px solid #fde68a;
}

.auth-alert-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.25rem;
  padding: 0;
  margin-left: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .auth-content {
    grid-template-columns: 1fr;
  }

  .auth-info-wrapper {
    display: none;
  }

  .auth-form-wrapper {
    padding: 2rem 1.5rem;
  }

  .auth-container {
    background: var(--bg-light);
  }

  .auth-wrapper {
    box-shadow: var(--shadow-md);
  }
}

@media (max-width: 480px) {
  .auth-form-wrapper {
    padding: 1.5rem 1rem;
  }

  .auth-title {
    font-size: 1.5rem;
  }

  .auth-form-control {
    font-size: 16px; /* Prevents mobile zoom */
  }
}

/* Validation styling */
.auth-validation-error {
  display: block;
  color: var(--danger-color);
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

.auth-validation-success .auth-form-control {
  border-color: var(--success-color);
}

.auth-validation-error .auth-form-control {
  border-color: var(--danger-color);
}

/* Loading state */
.auth-loading .auth-submit-btn {
  opacity: 0.6;
  pointer-events: none;
}

/* Password strength indicator */
.password-strength {
  margin-top: 0.5rem;
  height: 4px;
  background-color: var(--gray-200);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.password-strength-bar {
  height: 100%;
  width: 0%;
  transition: var(--transition);
}

.password-strength-bar.weak {
  background-color: var(--danger-color);
  width: 33%;
}

.password-strength-bar.fair {
  background-color: var(--warning-color);
  width: 66%;
}

.password-strength-bar.good {
  background-color: var(--primary-color);
  width: 85%;
}

.password-strength-bar.strong {
  background-color: var(--success-color);
  width: 100%;
}

.password-strength-text {
  font-size: 0.75rem;
  margin-top: 0.25rem;
  font-weight: 600;
}

/* Icon styling */
.icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: -0.125em;
}

/* Font Awesome Icon styling */
.auth-info-feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--primary-color);
}

.password-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  font-size: 1rem;
  color: var(--text-lighter);
  display: flex;
  align-items: center;
  justify-content: center;
}

.password-toggle:hover {
  color: var(--primary-color);
}
