/* Auth Pages - Modern Minimal Design */
/* Uses design system variables from modern-frontend.css */

.auth-page {
  background: var(--color-gray-50);
  min-height: calc(100vh - var(--header-height));
  padding: var(--space-12) 0 var(--space-16);
}

/* Hero Section */
.auth-hero {
  text-align: center;
  margin-bottom: var(--space-10);
}

.auth-hero .eyebrow {
  display: inline-block;
  font-size: var(--font-size-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #17a2b8;
  background: rgba(23, 162, 184, 0.1);
  padding: var(--space-2) var(--space-4);
  border-radius: 6px;
  margin-bottom: var(--space-4);
}

.auth-hero h1 {
  font-size: var(--font-size-4xl);
  font-weight: 800;
  color: var(--color-gray-900);
  margin: 0 0 var(--space-3);
  letter-spacing: -0.02em;
}

.auth-hero p {
  color: var(--color-gray-500);
  font-size: var(--font-size-lg);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Main Shell */
.auth-shell {
  background: var(--color-white);
  border-radius: 8px;
  padding: var(--space-8);
  box-shadow: none;
  border: 1px solid #e2e8f0;
  max-width: 1000px;
  margin: 0 auto;
  transition: all 0.2s ease;
}

/* Illustration Side */
.auth-illustration {
  background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
  border-radius: 8px;
  padding: var(--space-8);
  min-height: 100%;
  color: var(--color-white);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.auth-illustration::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg width="60" height="60" xmlns="http://www.w3.org/2000/svg"><circle cx="30" cy="30" r="1.5" fill="white" opacity="0.15"/></svg>');
}

.auth-illustration > * {
  position: relative;
  z-index: 1;
}

.auth-illustration h3 {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  margin-bottom: var(--space-4);
}

.auth-illustration p {
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.7;
  font-size: var(--font-size-base);
}

.auth-illustration .stat {
  font-size: var(--font-size-3xl);
  font-weight: 800;
  color: var(--color-accent);
}

.auth-illustration small {
  color: rgba(255, 255, 255, 0.7);
  font-size: var(--font-size-sm);
}

/* Form Side */
.auth-form {
  padding: var(--space-4) var(--space-6);
}

.auth-form .form-label {
  display: block;
  font-weight: 600;
  font-size: var(--font-size-sm);
  color: var(--color-gray-700);
  margin-bottom: var(--space-2);
}

.auth-input {
  width: 100%;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  padding: var(--space-3) var(--space-4);
  font-size: var(--font-size-base);
  color: var(--color-gray-900);
  background: var(--color-white);
  transition: all 0.2s ease;
}

.auth-input:focus {
  outline: none;
  border-color: #17a2b8;
  background: var(--color-white);
  box-shadow: 0 0 0 3px rgba(23, 162, 184, 0.1);
  transform: translateY(-1px);
}

.auth-input.is-valid {
  border-color: #10b981;
  background-image: none;
}

.auth-input.is-invalid {
  border-color: #ef4444;
  background-image: none;
}

.auth-input::placeholder {
  color: var(--color-gray-400);
}

/* Input Group Enhancements */
.input-group {
  position: relative;
  display: flex;
  align-items: stretch;
  width: 100%;
}

.input-group .auth-input {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-right: none;
}

.input-group-text {
  display: flex;
  align-items: center;
  padding: var(--space-3) var(--space-4);
  font-size: var(--font-size-base);
  background: var(--color-white);
  border: 1px solid #e2e8f0;
  border-left: none;
  border-top-right-radius: 6px;
  border-bottom-right-radius: 6px;
  transition: all 0.2s ease;
}

.email-validation-icon {
  background: transparent;
  border: none;
}

/* Password Toggle Button */
.password-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3) var(--space-4);
  border: 1px solid #e2e8f0;
  border-left: none;
  border-top-right-radius: 6px;
  border-bottom-right-radius: 6px;
  background: var(--color-white);
  color: var(--color-gray-600);
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 50px;
}

.password-toggle:hover {
  color: #17a2b8;
  background: rgba(23, 162, 184, 0.05);
  border-color: #17a2b8;
}

.password-toggle:focus {
  outline: 2px solid #17a2b8;
  outline-offset: 2px;
  z-index: 10;
}

.password-toggle i {
  font-size: 1rem;
}

/* Focused Input Group */
.input-group.focused .auth-input,
.input-group.focused .input-group-text,
.input-group.focused .password-toggle {
  border-color: #17a2b8;
}

.input-group.focused .input-group-text,
.input-group.focused .password-toggle {
  box-shadow: 0 0 0 3px rgba(23, 162, 184, 0.1);
}

/* Validation Feedback */
.invalid-feedback {
  display: block;
  margin-top: var(--space-2);
  font-size: var(--font-size-sm);
  color: #ef4444;
  animation: slideDown 0.2s ease;
}

.is-invalid ~ .invalid-feedback {
  display: block;
}

.is-valid ~ .invalid-feedback {
  display: none;
}

/* Meta Row */
.auth-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--font-size-sm);
  color: var(--color-gray-600);
  margin-top: var(--space-4);
}

.auth-meta .form-check {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.auth-meta .form-check-input {
  width: 18px;
  height: 18px;
  accent-color: #17a2b8;
  cursor: pointer;
}

.auth-meta a {
  color: #17a2b8;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
}

.auth-meta a:hover {
  color: #138496;
}

/* Submit Button */
.auth-submit {
  width: 100%;
  border-radius: 6px;
  border: none;
  padding: var(--space-4);
  font-size: var(--font-size-base);
  font-weight: 700;
  background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
  color: var(--color-white);
  cursor: pointer;
  margin-top: var(--space-6);
  transition: all 0.2s ease;
  box-shadow: none;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
}

.auth-submit:hover:not(:disabled) {
  background: linear-gradient(135deg, #138496 0%, #117a8b 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(23, 162, 184, 0.2);
}

.auth-submit:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(23, 162, 184, 0.2);
}

.auth-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.auth-submit .submit-spinner {
  width: 1rem;
  height: 1rem;
  border-width: 2px;
}

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin: var(--space-6) 0;
  color: var(--color-gray-400);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: var(--font-size-xs);
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-gray-200);
}

/* Social Buttons */
.auth-social button {
  width: 100%;
  border-radius: 6px;
  padding: var(--space-3);
  border: 1px solid #e2e8f0;
  background: var(--color-white);
  font-weight: 600;
  font-size: var(--font-size-sm);
  color: var(--color-gray-700);
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-social button:hover {
  border-color: #17a2b8;
  background: rgba(23, 162, 184, 0.05);
  color: #17a2b8;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(23, 162, 184, 0.1);
}

/* Bottom Note */
.auth-bottom-note {
  text-align: center;
  margin-top: var(--space-6);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-gray-100);
  color: var(--color-gray-500);
  font-size: var(--font-size-sm);
}

.auth-bottom-note a {
  color: #17a2b8;
  font-weight: 600;
  text-decoration: none;
  margin-left: var(--space-1);
}

.auth-bottom-note a:hover {
  text-decoration: underline;
}

/* Alert */
.auth-page .alert {
  padding: var(--space-4);
  border-radius: 6px;
  margin-bottom: var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--font-size-sm);
  animation: slideDown 0.3s ease;
}

.auth-page .alert-danger {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.auth-page .alert-info {
  background: rgba(23, 162, 184, 0.1);
  color: #0e7490;
  border: 1px solid rgba(23, 162, 184, 0.3);
}

.auth-page .alert-warning {
  background: rgba(245, 158, 11, 0.1);
  color: var(--color-warning);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.auth-page .alert .btn-close {
  margin-left: auto;
  opacity: 0.5;
  transition: opacity 0.2s ease;
}

.auth-page .alert .btn-close:hover {
  opacity: 1;
}

/* Animations */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

.auth-form {
  animation: fadeIn 0.4s ease;
}

/* Perks Section */
.auth-perks {
  margin-top: var(--space-12);
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

.auth-perk-card {
  background: var(--color-white);
  border-radius: 8px;
  padding: var(--space-6);
  height: 100%;
  box-shadow: none;
  border: 1px solid #e2e8f0;
  text-align: center;
  transition: all 0.2s ease;
}

.auth-perk-card:hover {
  border-color: #17a2b8;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(23, 162, 184, 0.1);
}

.auth-perk-card h4 {
  font-size: var(--font-size-lg);
  font-weight: 700;
  margin-bottom: var(--space-3);
  color: var(--color-gray-900);
}

.auth-perk-card p {
  color: var(--color-gray-500);
  line-height: 1.6;
  font-size: var(--font-size-sm);
  margin: 0;
}

/* Responsive */
@media (max-width: 991.98px) {
  .auth-shell {
    padding: var(--space-6);
  }

  .auth-hero h1 {
    font-size: var(--font-size-3xl);
  }

  .auth-illustration {
    margin-bottom: var(--space-6);
    padding: var(--space-6);
  }
  
  .auth-form {
    padding: var(--space-4) 0;
  }
}

@media (max-width: 575.98px) {
  .auth-page {
    padding: var(--space-8) 0 var(--space-12);
  }
  
  .auth-hero h1 {
    font-size: var(--font-size-2xl);
  }
  
  .auth-hero p {
    font-size: var(--font-size-base);
  }
  
  .auth-shell {
    padding: var(--space-5);
  }

  .auth-meta {
    flex-direction: column;
    gap: var(--space-3);
    align-items: flex-start;
  }
}

/* Dark Theme */
[data-theme="dark"] .auth-page {
  background: var(--color-gray-900);
}

[data-theme="dark"] .auth-hero h1 {
  color: var(--color-white);
}

[data-theme="dark"] .auth-shell,
[data-theme="dark"] .auth-perk-card {
  background: var(--color-gray-800);
}

[data-theme="dark"] .auth-input {
  background: var(--color-gray-700);
  border-color: var(--color-gray-600);
  color: var(--color-white);
}

[data-theme="dark"] .auth-input:focus {
  background: var(--color-gray-700);
}

[data-theme="dark"] .auth-social button {
  background: var(--color-gray-700);
  border-color: var(--color-gray-600);
  color: var(--color-gray-300);
}

[data-theme="dark"] .auth-perk-card h4 {
  color: var(--color-white);
}

[data-theme="dark"] .password-toggle {
  background: var(--color-gray-700);
  border-color: var(--color-gray-600);
  color: var(--color-gray-400);
}

[data-theme="dark"] .password-toggle:hover {
  background: var(--color-gray-600);
  color: #17a2b8;
  border-color: #17a2b8;
}

[data-theme="dark"] .input-group-text {
  background: var(--color-gray-700);
  border-color: var(--color-gray-600);
}
