/* ==========================================================
   AUTH PAGES — Login / Sign Up / Forgot Password
   Extends theme2.css design tokens. No overrides, only additions.
========================================================== */

/* ---- Page shell ---- */
.auth-page {
  min-height: calc(100vh - 68px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--bg-primary);
}

/* ---- Visual side (brand panel, mirrors .hero) ---- */
.auth-visual {
  position: relative;
  background: var(--navy);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 64px 56px;
}

.auth-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 60% at 70% 20%, rgba(75, 142, 222, 0.20) 0%, transparent 70%),
    radial-gradient(ellipse 50% 50% at 15% 85%, rgba(75, 142, 222, 0.12) 0%, transparent 60%);
  pointer-events: none;
}

.auth-visual-inner {
  position: relative;
  z-index: 1;
  max-width: 440px;
}

.auth-visual-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(75, 142, 222, 0.15);
  border: 1px solid rgba(75, 142, 222, 0.3);
  color: var(--teal-light);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 24px;
}

.auth-visual-eyebrow::before {
  content: '';
  width: 7px;
  height: 7px;
  background: var(--teal-light);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.auth-visual-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 800;
  line-height: 1.15;
  color: var(--white);
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.auth-visual-title .accent {
  color: var(--teal-light);
}

.auth-visual-desc {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.75;
  margin-bottom: 40px;
  max-width: 400px;
}

.auth-feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 44px;
}

.auth-feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14.5px;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.5;
}

.auth-feature-icon {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background: rgba(75, 142, 222, 0.15);
  border: 1px solid rgba(75, 142, 222, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-feature-icon svg {
  width: 15px;
  height: 15px;
  color: var(--teal-light);
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
}

.auth-visual-stats {
  display: flex;
  gap: 32px;
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-visual-stats .hero-stat-num {
  font-size: 24px;
}

/* ---- Form side ---- */
.auth-form-side {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px 40px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
}

.auth-card-header {
  margin-bottom: 32px;
}

.auth-badge-row {
  margin-bottom: 20px;
}

.auth-card-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(26px, 3vw, 32px);
  font-weight: 700;
  line-height: 1.2;
  color: var(--navy-mid);
  margin-bottom: 10px;
}

.auth-card-subtitle {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.auth-card-subtitle a {
  color: var(--teal);
  font-weight: 600;
  text-decoration: none;
}

.auth-card-subtitle a:hover {
  text-decoration: underline;
}

/* ---- Form elements ---- */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--navy);
}

.form-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.form-input-icon {
  position: absolute;
  left: 16px;
  width: 18px;
  height: 18px;
  color: var(--gray-400);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  pointer-events: none;
  transition: color var(--transition);
}

.form-input {
  width: 100%;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  color: var(--text-primary);
  background: var(--bg-secondary);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 13px 16px;
  outline: none;
  transition: all var(--transition);
}

.form-input-wrap .form-input {
  padding-left: 46px;
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-input:focus {
  border-color: var(--teal);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(75, 142, 222, 0.12);
}

.form-input:focus ~ .form-input-icon,
.form-input-wrap:focus-within .form-input-icon {
  color: var(--teal);
}

.form-input.has-error {
  border-color: #DC2626;
  background: #FEF2F2;
}

.form-error-text {
  font-size: 12.5px;
  color: #DC2626;
  font-weight: 500;
  display: none;
  align-items: center;
  gap: 6px;
}

.form-error-text.show {
  display: flex;
}

.form-hint {
  font-size: 12.5px;
  color: var(--text-muted);
}

/* Password field toggle */
.password-toggle {
  position: absolute;
  right: 14px;
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
  color: var(--gray-400);
  display: flex;
  align-items: center;
  transition: color var(--transition);
}

.password-toggle:hover {
  color: var(--teal);
}

.password-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.form-input-wrap:has(.password-toggle) .form-input {
  padding-right: 46px;
}

/* Password strength meter */
.password-strength {
  display: flex;
  gap: 5px;
  margin-top: 2px;
}

.password-strength-bar {
  height: 4px;
  flex: 1;
  border-radius: 100px;
  background: var(--gray-100);
  transition: background var(--transition);
}

.password-strength-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Checkbox / radio */
.form-check-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  line-height: 1.5;
}

.form-checkbox input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
  border: 1.5px solid var(--gray-200);
  border-radius: 5px;
  cursor: pointer;
  position: relative;
  transition: all var(--transition);
  background: var(--white);
}

.form-checkbox input[type="checkbox"]:checked {
  background: var(--teal);
  border-color: var(--teal);
}

.form-checkbox input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.form-checkbox a {
  color: var(--teal);
  text-decoration: none;
  font-weight: 600;
}

.form-checkbox a:hover {
  text-decoration: underline;
}

.forgot-link {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--teal);
  text-decoration: none;
}

.forgot-link:hover {
  text-decoration: underline;
}

/* Submit button full width */
.btn-auth-submit {
  width: 100%;
  justify-content: center;
  font-size: 15.5px;
  padding: 14px 28px;
  margin-top: 4px;
}

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 26px 0;
  color: var(--text-muted);
  font-size: 13px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Social auth buttons */
.social-auth-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.social-auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--gray-200);
  background: var(--white);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
}

.social-auth-btn:hover {
  border-color: var(--teal);
  color: var(--teal);
  background: var(--teal-pale);
}

.social-auth-btn svg {
  width: 18px;
  height: 18px;
}

/* Footer note under card */
.auth-card-footer {
  margin-top: 28px;
  text-align: center;
  font-size: 14px;
  color: var(--text-secondary);
}

.auth-card-footer a {
  color: var(--teal);
  font-weight: 600;
  text-decoration: none;
}

.auth-card-footer a:hover {
  text-decoration: underline;
}

/* Back link (forgot password) */
.auth-back-link {
  display: flex;
  align-items: center;
  justify-content: end;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  margin-bottom: 28px;
  transition: color var(--transition);
}

.auth-back-link:hover {
  color: var(--teal);
}

.auth-back-link svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

/* Success state (forgot password confirmation) */
.auth-success-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-lg);
  background: var(--teal-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.auth-success-icon svg {
  width: 30px;
  height: 30px;
  color: var(--teal);
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.auth-success-state {
  display: none;
}

.auth-success-state.show {
  display: block;
}

.auth-form-state.hide {
  display: none;
}

/* Mini floating card echo (matches hero-floating-card language) */
.auth-visual-card {
  position: absolute;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-lg);
  z-index: 1;
}

.auth-visual-card .fc-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.auth-visual-card .fc-icon.teal {
  background: rgba(75, 142, 222, 0.18);
}

.auth-visual-card .fc-text-main {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--white);
}

.auth-visual-card .fc-text-sub {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.5);
}

.auth-vc-1 {
  top: 12%;
  right: 8%;
}

/* ==========================================================
   RESPONSIVE
========================================================== */
@media (max-width: 1024px) {
  .auth-visual {
    padding: 56px 44px;
  }

  .auth-form-side {
    padding: 56px 32px;
  }
}

@media (max-width: 900px) {
  .auth-page {
    grid-template-columns: 1fr;
  }

  .auth-visual {
    display: none;
  }

  .auth-form-side {
    padding: 48px 24px;
  }

  .auth-card {
    max-width: 460px;
  }
}

@media (max-width: 480px) {
  .auth-form-side {
    padding: 36px 16px;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .social-auth-row {
    grid-template-columns: 1fr;
  }

  .auth-card-title {
    font-size: 25px;
  }
}