/* =========================================
   AUTH PAGES (LOGIN & SIGNUP) - PREMIUM SAAS MODERN DESIGN
========================================= */

:root {
  --qcm-text: #111827;
  --qcm-card-bg: #ffffff;
  --qcm-border: #e5e7eb;
  --qcm-accent: #6366f1;
}

body.qcm-dark {
  --qcm-text: #e5e7eb;
  --qcm-card-bg: #1f2937;
  --qcm-border: #374151;
}

.auth-page {
  padding-top: 0;
  display: flex;
  align-items: stretch;
  min-height: calc(100vh - 72px);
}

/* ==========================================
   SPLIT LAYOUT CONTAINER
========================================== */

.auth-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  gap: 0;
}

@media (max-width: 1024px) {
  .auth-container {
    grid-template-columns: 1fr;
  }
}

/* ==========================================
   LEFT SIDE: BRANDING
========================================== */

.auth-branding {
  background: var(--cq-hero-gradient, linear-gradient(135deg, var(--cq-accent) 0%, var(--cq-accent-alt) 100%));
  color: #ffffff;
  padding: 60px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100%;
  position: relative;
  overflow: hidden;
}

/* Ensure all text in branding section is white */
.auth-branding,
.auth-branding h2,
.auth-branding p,
.auth-branding span,
.auth-branding .auth-tagline,
.auth-branding .auth-feature,
.auth-branding .auth-social-proof,
.auth-branding .auth-social-proof p,
.auth-branding .auth-social-proof strong {
  color: #ffffff !important;
}

.auth-branding::before {
  content: "";
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(circle at 20% 50%, rgba(255,255,255,0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(255,255,255,0.1) 0%, transparent 50%);
  pointer-events: none;
}

.auth-branding-content {
  position: relative;
  z-index: 2;
  max-width: 400px;
  text-align: center;
}

.auth-logo {
  font-size: 4rem;
  margin-bottom: 24px;
  display: inline-block;
}

.auth-branding h2 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.auth-tagline {
  font-size: 1.1rem;
  opacity: 0.95;
  margin-bottom: 40px;
  line-height: 1.5;
}

/* Features list */
.auth-features {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 48px;
  text-align: left;
}

.auth-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1rem;
}

.feature-icon {
  font-size: 1.4rem;
  min-width: 30px;
}

/* Social proof */
.auth-social-proof {
  display: flex;
  justify-content: space-around;
  gap: 16px;
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.2);
  font-size: 0.9rem;
}

.auth-social-proof p {
  margin: 0;
  line-height: 1.4;
}

/* Testimonial */
.auth-testimonial {
  background: rgba(0, 0, 0, 0.2);
  padding: 20px;
  border-radius: 12px;
  border-left: 4px solid rgba(255,255,255,0.5);
  margin-top: 32px;
}

.auth-testimonial p {
  margin: 0;
  font-size: 0.95rem;
}

/* ==========================================
   RIGHT SIDE: FORM
========================================== */

.auth-form-section {
  background: var(--qcm-card-bg);
  padding: 60px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100%;
  position: relative;
}

.auth-form-content {
  width: 100%;
  max-width: 380px;
}

.auth-form-header {
  margin-bottom: 36px;
  text-align: center;
}

.auth-form-title {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--qcm-text);
}

.auth-form-subtitle {
  font-size: 0.95rem;
  color: var(--qcm-text-secondary, #64748b);
  opacity: 1;
}

/* ==========================================
   FORM STYLES
========================================== */

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-label {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--qcm-text);
}

.form-input,
.form-select {
  padding: 12px 16px;
  border: 1.5px solid var(--qcm-border);
  border-radius: 10px;
  background: var(--qcm-card-bg);
  color: var(--qcm-text);
  font-size: 0.95rem;
  font-family: inherit;
  transition: all 0.3s ease;
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: var(--qcm-accent);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-input::placeholder {
  color: var(--qcm-text-secondary, #94a3b8);
  opacity: 1;
}

.form-hint {
  font-size: 0.8rem;
  color: var(--qcm-text-secondary, #64748b);
  opacity: 1;
  margin-top: 6px;
  margin-bottom: 0;
}

/* Checkbox group */
.form-checkbox {
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
}

.form-checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  cursor: pointer;
  accent-color: var(--qcm-accent);
}

.form-checkbox label {
  font-size: 0.9rem;
  font-weight: 400;
  margin-bottom: 0;
  cursor: pointer;
}

.form-checkbox a {
  color: var(--qcm-accent);
  text-decoration: underline;
  font-weight: 600;
}

.form-checkbox a:hover {
  opacity: 0.8;
}

/* Error message */
.form-error {
  padding: 12px 16px;
  border-radius: 8px;
  background: #fee2e2;
  border-left: 4px solid #ef4444;
  color: #dc2626;
  font-size: 0.9rem;
  font-weight: 500;
}

body.qcm-dark .form-error {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border-left-color: #ef4444;
}

/* ==========================================
   BUTTONS
========================================== */

.btn {
  padding: 12px 20px;
  border-radius: 10px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary {
  background: var(--cq-hero-gradient, linear-gradient(135deg, var(--cq-accent) 0%, var(--cq-accent-alt) 100%));
  color: white;
  width: 100%;
  padding: 14px 20px;
  font-size: 1rem;
  box-shadow: var(--cq-hero-shadow, 0 8px 24px rgba(99, 102, 241, 0.25));
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--cq-hero-shadow, 0 12px 32px rgba(99, 102, 241, 0.35));
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-full {
  width: 100%;
}

.btn-lg {
  padding: 14px 32px;
  font-size: 1rem;
}

/* Alternative login buttons */
.auth-alternatives {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.btn-alternative {
  flex: 1;
  padding: 12px 16px;
  border: 1.5px solid var(--qcm-border);
  border-radius: 10px;
  background: var(--qcm-card-bg);
  color: var(--qcm-text);
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-alternative:hover {
  border-color: var(--qcm-accent);
  background: rgba(102, 126, 234, 0.05);
  transform: translateY(-2px);
}

.btn-alternative span {
  font-size: 1.2rem;
}

/* ==========================================
   DIVIDERS & LINKS
========================================== */

.auth-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  font-size: 0.9rem;
  color: var(--qcm-text);
  opacity: 0.8;
}

.auth-link {
  color: var(--qcm-accent);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
}

.auth-link:hover {
  text-decoration: underline;
  opacity: 0.8;
}

.auth-divider {
  opacity: 0.4;
}

.auth-divider-line {
  position: relative;
  margin: 28px 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--qcm-text);
  opacity: 0.5;
}

.auth-divider-line::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--qcm-border);
  z-index: 0;
}

.auth-divider-line span {
  position: relative;
  z-index: 1;
  background: var(--qcm-card-bg);
  padding: 0 12px;
}

/* ==========================================
   CTA SECTION
========================================== */

.auth-cta-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid var(--qcm-border);
}

.auth-cta-intro {
  font-size: 0.9rem;
  text-align: center;
  color: var(--qcm-text);
  opacity: 0.7;
  margin: 0 0 12px 0;
}

.auth-cta-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 18px;
  border-radius: 12px;
  border: 1.5px solid var(--qcm-border);
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.03) 0%, rgba(118, 75, 162, 0.03) 100%);
  text-decoration: none;
  color: inherit;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  overflow: hidden;
}

.auth-cta-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.auth-cta-card:hover {
  border-color: var(--qcm-accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.12);
}

.auth-cta-card:hover::before {
  opacity: 1;
}

.cta-icon {
  font-size: 1.6rem;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}

.auth-cta-card h4 {
  font-size: 0.9rem;
  font-weight: 700;
  margin: 0 0 3px 0;
  color: var(--qcm-text);
  position: relative;
  z-index: 1;
}

.auth-cta-card p {
  font-size: 0.75rem;
  color: var(--qcm-text);
  opacity: 0.6;
  margin: 0;
  position: relative;
  z-index: 1;
}

.cta-arrow {
  position: absolute;
  bottom: 12px;
  right: 12px;
  font-size: 1.1rem;
  opacity: 0.6;
  transition: all 0.3s ease;
}

.auth-cta-card:hover .cta-arrow {
  opacity: 1;
  transform: translateX(3px);
}

/* Color variations */
.auth-cta-signup { border-color: rgba(34, 197, 94, 0.3); }
.auth-cta-qcm { border-color: rgba(34, 197, 94, 0.3); }
.auth-cta-blog { border-color: rgba(236, 72, 153, 0.3); }
.auth-cta-home { border-color: rgba(102, 126, 234, 0.3); }

/* ==========================================
   DARK MODE SUPPORT
========================================== */

body.qcm-dark .auth-form-section {
  background: var(--qcm-card-bg);
}

body.qcm-dark .form-input,
body.qcm-dark .form-select {
  background: #111827;
  border-color: #374151;
}

body.qcm-dark .form-input:focus,
body.qcm-dark .form-select:focus {
  border-color: var(--qcm-accent);
}

body.qcm-dark .btn-alternative {
  background: #111827;
  border-color: #374151;
}

body.qcm-dark .btn-alternative:hover {
  background: rgba(102, 126, 234, 0.1);
}

body.qcm-dark .auth-cta-card {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
}

/* ==========================================
   RESPONSIVE DESIGN
========================================== */

@media (max-width: 1024px) {
  .auth-branding {
    display: none;
  }

  .auth-form-section {
    min-height: auto;
    padding: 40px 20px;
  }
}

@media (max-width: 640px) {
  .auth-form-section {
    padding: 30px 16px;
  }

  .auth-form-content {
    max-width: 100%;
  }

  .auth-form-title {
    font-size: 1.5rem;
  }

  .auth-form-subtitle {
    font-size: 0.85rem;
  }

  .form-input,
  .form-select {
    padding: 10px 12px;
    font-size: 16px;
  }

  .btn-primary {
    padding: 12px 16px;
  }

  .auth-alternatives {
    flex-direction: column;
  }

  .btn-alternative {
    width: 100%;
  }

  .auth-cta-section {
    margin-top: 24px;
    padding-top: 24px;
  }

  .auth-cta-card {
    padding: 16px;
  }

  .cta-icon {
    font-size: 1.4rem;
  }
}

/* ==========================================
   COMING SOON POPUP
========================================== */

.coming-soon-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.coming-soon-popup-overlay.active {
  opacity: 1;
  visibility: visible;
}

.coming-soon-popup {
  background: white;
  border-radius: 16px;
  padding: 32px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  position: relative;
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s ease;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.coming-soon-popup-overlay.active .coming-soon-popup {
  transform: scale(1) translateY(0);
}

.coming-soon-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  font-size: 24px;
  color: #9ca3af;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  border-radius: 4px;
  transition: all 0.2s;
}

.coming-soon-close:hover {
  background: #f3f4f6;
  color: #374151;
}

.coming-soon-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.coming-soon-popup h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
  margin: 0 0 12px 0;
}

.coming-soon-popup p {
  color: #4b5563;
  margin: 0 0 8px 0;
  line-height: 1.5;
}

.coming-soon-popup p strong {
  color: var(--cq-accent, #6366f1);
}

.coming-soon-hint {
  font-size: 0.9rem;
  color: #6b7280 !important;
  margin-top: 12px !important;
}

.coming-soon-btn {
  margin-top: 20px;
  background: var(--cq-accent, #6366f1);
  color: white;
  border: none;
  padding: 12px 32px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.coming-soon-btn:hover {
  background: var(--cq-accent-dark, #4f46e5);
  transform: translateY(-1px);
}

.coming-soon-btn:active {
  transform: translateY(0);
}

/* Dark mode support */
body.qcm-dark .coming-soon-popup {
  background: #1f2937;
}

body.qcm-dark .coming-soon-popup h3 {
  color: #f9fafb;
}

body.qcm-dark .coming-soon-popup p {
  color: #d1d5db;
}

body.qcm-dark .coming-soon-close:hover {
  background: #374151;
  color: #e5e7eb;
}
