/* ================================
   AUTH PAGES STYLES
   ================================ */

/* Auth page layout */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
}

.auth-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  min-height: 100vh;
}

/* Left side - Branding */
.auth-brand {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
  padding: 48px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.auth-brand::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 30%, rgba(34, 197, 94, 0.1) 0%, transparent 50%),
              radial-gradient(circle at 70% 70%, rgba(59, 130, 246, 0.08) 0%, transparent 50%);
  animation: glowRotate 30s linear infinite;
}

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

.auth-brand > * {
  position: relative;
  z-index: 1;
}

.auth-brand .logo {
  margin-bottom: 60px;
}

.brand-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.brand-content h1 {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.brand-content p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
  max-width: 400px;
}

.brand-features {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.brand-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1rem;
  color: var(--text-primary);
}

.feature-check {
  width: 24px;
  height: 24px;
  background: rgba(34, 197, 94, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
  font-size: 0.8rem;
}

.brand-stats {
  display: flex;
  gap: 48px;
  margin-top: auto;
  padding-top: 48px;
  border-top: 1px solid var(--border-color);
}

.brand-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-num {
  font-size: 1.75rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--accent-primary);
}

.stat-text {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Right side - Form */
.auth-form-wrapper {
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  position: relative;
}

.auth-form-container {
  width: 100%;
  max-width: 420px;
}

.auth-header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-header h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.auth-header p {
  color: var(--text-secondary);
}

/* Form styles */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 16px;
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  pointer-events: none;
  transition: color var(--transition-fast);
}

.input-wrapper input {
  width: 100%;
  padding: 14px 16px 14px 48px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 1rem;
  transition: all var(--transition-fast);
}

.input-wrapper input::placeholder {
  color: var(--text-muted);
}

.input-wrapper input:focus {
  outline: none;
  border-color: var(--accent-primary);
  background: rgba(34, 197, 94, 0.03);
}

.input-wrapper input:focus + .input-icon,
.input-wrapper:focus-within .input-icon {
  color: var(--accent-primary);
}

.input-wrapper.has-error input {
  border-color: #ef4444;
}

/* Toggle password visibility */
.toggle-password {
  position: absolute;
  right: 12px;
  padding: 8px;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.toggle-password:hover {
  color: var(--text-primary);
}

.toggle-password svg {
  width: 20px;
  height: 20px;
}

.toggle-password .eye-closed {
  display: none;
}

.toggle-password.active .eye-open {
  display: none;
}

.toggle-password.active .eye-closed {
  display: block;
}

/* Error messages */
.error-message {
  font-size: 0.85rem;
  color: #ef4444;
  min-height: 20px;
  display: none;
}

.error-message.visible {
  display: block;
}

/* Checkbox */
.form-checkbox {
  margin-top: 4px;
}

.checkbox-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.checkbox-wrapper input {
  display: none;
}

.checkmark {
  width: 20px;
  height: 20px;
  min-width: 20px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  margin-top: 2px;
}

.checkbox-wrapper input:checked + .checkmark {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
}

.checkbox-wrapper input:checked + .checkmark::after {
  content: '✓';
  color: #000;
  font-size: 0.75rem;
  font-weight: 700;
}

.checkbox-text a {
  color: var(--accent-primary);
  text-decoration: underline;
}

.checkbox-text a:hover {
  color: var(--accent-secondary);
}

/* Submit button */
#submitBtn {
  margin-top: 8px;
  position: relative;
}

#submitBtn .btn-loader {
  display: none;
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

#submitBtn.loading .btn-text {
  opacity: 0;
}

#submitBtn.loading .btn-loader {
  display: block;
  position: absolute;
}

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

/* Form alert */
.form-alert {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  display: none;
  margin-top: 8px;
}

.form-alert.visible {
  display: block;
}

.form-alert.success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: var(--accent-primary);
}

.form-alert.error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

/* Auth footer */
.auth-footer {
  text-align: center;
  margin-top: 24px;
  color: var(--text-secondary);
}

.auth-footer a {
  color: var(--accent-primary);
  font-weight: 600;
}

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

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

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

/* Social buttons */
.social-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.btn-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.btn-social:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--text-muted);
}

.btn-social svg {
  width: 20px;
  height: 20px;
}

/* Label row with forgot link */
.label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.forgot-link {
  font-size: 0.85rem;
  color: var(--accent-primary);
  transition: color var(--transition-fast);
}

.forgot-link:hover {
  color: var(--accent-secondary);
  text-decoration: underline;
}

/* Testimonial */
.brand-testimonial {
  margin-top: 48px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
}

.testimonial-quote {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  font-style: italic;
  margin-bottom: 20px;
  position: relative;
  padding-left: 20px;
}

.testimonial-quote::before {
  content: '"';
  position: absolute;
  left: 0;
  top: -10px;
  font-size: 3rem;
  color: var(--accent-primary);
  opacity: 0.3;
  font-family: Georgia, serif;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.author-avatar {
  width: 44px;
  height: 44px;
  background: var(--gradient-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: #000;
}

.author-info {
  display: flex;
  flex-direction: column;
}

.author-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.author-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Demo hint */
.demo-hint {
  margin-top: 24px;
  padding: 12px 16px;
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.2);
  border-radius: var(--radius-md);
  text-align: center;
}

.demo-hint p {
  font-size: 0.85rem;
  color: #fbbf24;
  margin: 0;
}

/* ================================
   RESPONSIVE
   ================================ */
@media (max-width: 1024px) {
  .auth-container {
    grid-template-columns: 1fr;
  }
  
  .auth-brand {
    display: none;
  }
  
  .auth-form-wrapper {
    padding: 32px 24px;
  }
}

@media (max-width: 480px) {
  .auth-form-wrapper {
    padding: 24px 16px;
  }
  
  .auth-header h2 {
    font-size: 1.5rem;
  }
  
  .social-buttons {
    grid-template-columns: 1fr;
  }
}

/* Auth Language Switcher */
.auth-lang-switcher {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 10;
}

.auth-lang-switcher .lang-select {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  padding: 8px 12px;
  font-size: 0.875rem;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.auth-lang-switcher .lang-select:hover {
  border-color: var(--accent-primary);
}

.auth-form-container {
  position: relative;
}

@media (max-width: 768px) {
  .auth-lang-switcher {
    top: 10px;
    right: 10px;
  }
}

/* Mobile logo - hidden on desktop, visible on mobile */
.auth-mobile-logo {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  margin-bottom: 24px;
  font-size: 1.5rem;
  font-weight: 700;
}

.auth-mobile-logo .logo-icon {
  font-size: 2rem;
}

.auth-mobile-logo .logo-text {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@media (max-width: 768px) {
  .auth-mobile-logo {
    display: flex;
  }
}
