/*
 * The sign-in page (loginreg.php).
 * Linked from the <head> by the page ($boPageStylesheets).
 */
/* Login/Register Page Styles */
.auth-page {
  min-height: calc(100vh - 200px);
  background: linear-gradient(135deg, #f8faf8 0%, #f0f4f1 100%);
  padding: var(--space-2xl) 0 var(--space-3xl);
}

.auth-container {
  max-width: 1100px;
  margin: 0 auto;
}

.auth-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: var(--space-2xl);
  align-items: stretch;
}

/* Login Card */
.login-card {
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.login-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: var(--space-xl) var(--space-2xl);
  text-align: center;
}

.login-header h1 {
  font-size: 1.75rem;
  color: white !important;
  margin: 0 0 var(--space-xs);
}

.login-header p {
  color: rgba(255,255,255,0.85);
  margin: 0;
  font-size: 1rem;
}

.login-body {
  padding: var(--space-2xl);
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Form Styles */
.login-form {
  flex: 1;
  display: flex;
  flex-direction: column;
}

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

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

.form-input {
  width: 100%;
  padding: var(--space-md) var(--space-lg);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  font-size: 1rem;
  color: var(--text-primary);
  background: white;
  transition: all 0.2s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(44, 85, 48, 0.1);
}

.form-input::placeholder {
  color: var(--text-light);
}

.form-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-lg);
}

.form-check {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.form-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.form-check label {
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.forgot-link {
  color: var(--primary);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
}

.forgot-link:hover {
  text-decoration: underline;
}

.btn-login {
  width: 100%;
  padding: var(--space-md) var(--space-xl);
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-lg);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  transition: all 0.2s ease;
}

.btn-login:hover:not(:disabled) {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-login:disabled {
  opacity: 0.8;
  cursor: not-allowed;
  transform: none;
}

.spin {
  animation: spin 1s linear infinite;
}

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

.login-footer {
  text-align: center;
  margin-top: auto;
  padding-top: var(--space-lg);
}

.login-footer p {
  color: var(--text-muted);
  margin: 0;
}

.login-footer a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.login-footer a:hover {
  text-decoration: underline;
}

.login-card-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

/* Alert */
.auth-alert {
  background: #fef3cd;
  border: 1px solid #ffc107;
  color: #856404;
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

/* Informational (not an error): logged out, account ready, sign in to continue */
.auth-alert.is-info {
  background: #e8f3ef;
  border-color: #9cc9b8;
  color: #1f4d40;
}

/* Register Promo Card */
.register-card {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  color: white;
  display: flex;
  flex-direction: column;
}

.register-header {
  margin-bottom: var(--space-xl);
}

.register-header h2 {
  font-size: 2rem;
  color: white;
  margin: 0 0 var(--space-sm);
}

.register-header p {
  color: rgba(255,255,255,0.85);
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.6;
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.feature-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  min-height: 52px;
}

.feature-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  background: rgba(255,255,255,0.15);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.feature-text {
  flex: 1;
}

.feature-icon i {
  font-size: 1.25rem;
  color: white;
}

.feature-text h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
  color: white;
}

.feature-text p {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.7);
  margin: 0;
  line-height: 1.4;
}

/* Price Card */
.price-card {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.price-badge {
  width: 56px;
  height: 56px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.price-badge i {
  font-size: 1.5rem;
  color: var(--primary);
}

.price-info h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
  color: white;
}

.price-info p {
  font-size: 0.9375rem;
  color: rgba(255,255,255,0.8);
  margin: 0;
}

/* CTA Button */
.btn-register {
  width: 100%;
  padding: var(--space-md) var(--space-xl);
  background: white;
  color: var(--primary-dark);
  border: none;
  border-radius: var(--radius-lg);
  font-size: 1.0625rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-register:hover {
  background: rgba(255,255,255,0.95);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.register-footer {
  text-align: center;
  margin-top: var(--space-lg);
}

.register-footer p {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.7);
  margin: 0;
}

.register-footer a {
  color: white;
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 992px) {
  .auth-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .login-card,
  .register-card {
    max-width: 500px;
    margin: 0 auto;
    width: 100%;
  }
}

@media (max-width: 576px) {
  .auth-page {
    padding: var(--space-xl) 0 var(--space-2xl);
  }

  .login-header {
    padding: var(--space-lg) var(--space-xl);
  }

  .login-header h1 {
    font-size: 1.5rem;
  }

  .login-header p {
    font-size: 0.9rem;
  }

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

  .form-row {
    flex-direction: column;
    gap: var(--space-md);
    align-items: flex-start;
  }

  .login-card-image {
    height: 140px;
  }

  .register-card {
    padding: var(--space-xl);
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .price-card {
    flex-direction: column;
    text-align: center;
  }
}
