:root {
  --auth-bg-1: #0b0b1e;
  --auth-bg-2: #3b1a5a;
  --auth-bg-3: #f1b7d6;
  --auth-card-bg: rgba(255, 255, 255, 0.1);
  --auth-card-border: rgba(255, 255, 255, 0.18);
  --auth-text: #f5f2ff;
  --auth-text-muted: rgba(245, 242, 255, 0.72);
  --auth-accent: #8ef6ff;
}

body.auth-theme:not(.marketing) {
  background: linear-gradient(135deg, var(--auth-bg-1), var(--auth-bg-2), var(--auth-bg-3));
  color: var(--auth-text);
}

body.auth-theme:not(.marketing)::before,
body.auth-theme:not(.marketing)::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  opacity: 0.7;
  background: radial-gradient(circle at 20% 20%, rgba(142, 246, 255, 0.18), transparent 55%),
    radial-gradient(circle at 80% 30%, rgba(255, 122, 199, 0.22), transparent 60%);
}

body.auth-theme:not(.marketing)::after {
  z-index: -1;
  opacity: 0.45;
}


@media (max-width: 900px), (pointer: coarse) {
  body.auth-theme:not(.marketing)::before,
  body.auth-theme:not(.marketing)::after {
    content: none;
  }
}

body.auth-theme header.navbar,
body.marketing header.navbar {
  background: rgba(16, 3, 25, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

body.auth-theme header.navbar .nav-links a,
body.marketing header.navbar .nav-links a {
  color: rgba(245, 242, 255, 0.86);
}

body.auth-theme header.navbar .nav-links a:hover,
body.auth-theme header.navbar .nav-links a:focus-visible,
body.marketing header.navbar .nav-links a:hover,
body.marketing header.navbar .nav-links a:focus-visible {
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(145, 100, 255, 0.35);
}

body.auth-theme header.navbar .nav-links .cta,
body.marketing header.navbar .nav-links .cta {
  background: linear-gradient(120deg, #8ef6ff, #7c5dff);
  color: #0b1120;
  box-shadow: 0 18px 38px rgba(124, 93, 255, 0.35);
}

.login-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 2.5rem;
  align-items: stretch;
}

@media (max-width: 900px) {
  .login-layout {
    grid-template-columns: 1fr;
  }
}

.auth-page {
  min-height: calc(100vh - 76px);
  min-height: calc(100svh - 76px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.5rem 3.5rem;
}

.auth-shell {
  width: min(1120px, 96vw);
}

.auth-card {
  background: var(--auth-card-bg);
  border: 1px solid var(--auth-card-border);
  border-radius: 24px;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  backdrop-filter: blur(16px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}

body.auth-theme .hero,
body.auth-theme .section-card,
body.marketing .hero,
body.marketing .section-card {
  background: rgba(12, 6, 24, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: none;
}

body.auth-theme .hero::before,
body.marketing .hero::before {
  background: linear-gradient(135deg, rgba(142, 246, 255, 0.12), rgba(255, 122, 199, 0.12));
}

body.auth-theme .hero-text p,
body.auth-theme .section-card p,
body.marketing .hero-text p,
body.marketing .section-card p {
  color: var(--auth-text-muted);
}

body.auth-theme .section-card h2,
body.auth-theme .hero-text h2,
body.marketing .section-card h2,
body.marketing .hero-text h2 {
  color: var(--auth-text);
}

body.auth-theme .section-card label span,
body.auth-theme .section-card a,
body.auth-theme .text-muted,
body.marketing .section-card label span,
body.marketing .section-card a,
body.marketing .text-muted {
  color: rgba(245, 242, 255, 0.8);
}

body.auth-theme input,
body.auth-theme select,
body.auth-theme textarea,
body.marketing input,
body.marketing select,
body.marketing textarea {
  background: rgba(12, 6, 24, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--auth-text);
}

body.auth-theme input::placeholder,
body.marketing input::placeholder {
  color: rgba(245, 242, 255, 0.55);
}

body.auth-theme label,
body.marketing label {
  writing-mode: horizontal-tb;
  text-orientation: mixed;
}

body.auth-theme .password-toggle,
body.marketing .password-toggle {
  color: rgba(245, 242, 255, 0.8);
  background: transparent;
  box-shadow: none;
}

body.auth-theme .password-toggle:hover,
body.auth-theme .password-toggle:focus-visible,
body.marketing .password-toggle:hover,
body.marketing .password-toggle:focus-visible {
  background: transparent;
  box-shadow: none;
}

body.auth-theme button,
body.auth-theme .btn,
body.marketing button,
body.marketing .btn {
  background: linear-gradient(135deg, #c084fc, #a855f7, #ec4899);
  color: #111;
  border: none;
  padding: 0.85rem 1.5rem;
  font-size: 1rem;
  border-radius: 0.9rem;
  min-height: 48px;
  line-height: 1.1;
}

body.auth-theme .btn-small,
body.marketing .btn-small {
  padding: 0.5rem 1.1rem;
  font-size: 0.9rem;
  min-height: 40px;
  border-radius: 0.75rem;
}

body.auth-theme button:hover,
body.auth-theme button:focus-visible,
body.auth-theme .btn:hover,
body.auth-theme .btn:focus-visible,
body.marketing button:hover,
body.marketing button:focus-visible,
body.marketing .btn:hover,
body.marketing .btn:focus-visible {
  box-shadow: 0 16px 30px rgba(124, 93, 255, 0.4);
}

body.auth-theme .footer-links a,
body.marketing .footer-links a {
  color: rgba(245, 242, 255, 0.75);
}

body.auth-theme .footer-links a:hover,
body.auth-theme .footer-links a:focus-visible,
body.marketing .footer-links a:hover,
body.marketing .footer-links a:focus-visible {
  color: #ffffff;
}

.auth-wrap {
  min-height: calc(100vh - 90px);
  min-height: calc(100svh - 90px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 26px 16px;
}

.auth-card {
  width: min(560px, 94vw);
  padding: 22px;
}

.auth-card--wide {
  width: min(1120px, 96vw);
}

.form-card form {
  display: grid;
  gap: 1rem;
}

label {
  display: grid;
  gap: 0.35rem;
  font-weight: 600;
  font-size: 0.95rem;
}

.form-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-weight: 500;
  font-size: 0.85rem;
  line-height: 1.4;
}

.form-consent input {
  margin-top: 0.2rem;
}

.form-consent a {
  color: inherit;
  text-decoration: underline;
}

.form-status {
  min-height: 1.5rem;
  margin-top: 0.25rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.75rem;
  background: rgba(124, 93, 255, 0.18);
  color: var(--auth-text-muted);
  font-weight: 500;
  text-align: center;
  transition: opacity 0.3s ease;
}

.form-status.success {
  background: rgba(47, 154, 93, 0.24);
  color: #d6ffe6;
}

.form-status.error {
  background: rgba(229, 72, 77, 0.24);
  color: #ffd6da;
}

.text-muted {
  opacity: 0.8;
}

input,
textarea,
select {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 0.9rem;
  border: 1px solid transparent;
  background: transparent;
  font-family: inherit;
  font-size: 1rem;
  color: inherit;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

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

.input-with-toggle input {
  padding-right: 2.6rem;
}

.password-toggle {
  position: absolute;
  right: 0.55rem;
  border: none;
  background: none;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0.35rem;
  display: inline-flex;
  align-items: center;
  gap: 0;
  box-shadow: none;
  transition: color 0.2s ease, transform 0.2s ease;
}

.password-toggle .icon-eye,
.password-toggle .icon-eye-off {
  display: inline-flex;
  align-items: center;
}

.password-toggle svg {
  width: 1rem;
  height: 1rem;
}

.password-toggle .icon-eye-off {
  display: none;
}

.password-toggle[aria-pressed="true"] .icon-eye {
  display: none;
}

.password-toggle[aria-pressed="true"] .icon-eye-off {
  display: inline-flex;
}

.terms-row {
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
  max-width: 100%;
  margin-top: 12px;
}

.terms-row input[type="checkbox"] {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 0;
}

.terms-row label {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.35;
  white-space: normal;
}

.terms-row label a {
  display: inline;
  white-space: nowrap;
  text-decoration: underline;
  color: rgba(238, 201, 255, 0.92);
}

.terms-row label a:hover {
  color: #ffffff;
}

.recaptcha-wrap,
.g-recaptcha {
  max-width: 100%;
  overflow: hidden;
}

.contact-stack {
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
  width: min(1100px, 94vw);
}

@media (max-width: 900px) {
  .auth-card {
    padding: 1.5rem;
  }
}

/* ===========================
   Mobile conversion layout fix
   - Applies to BOTH signup + login pages
   - Show form first
   - Make hero compact
=========================== */

.login-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

/* Mobile: stack, but FORM FIRST */
@media (max-width: 767px) {
  .login-layout {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  /* Reorder: form first, hero second */
  .login-layout .form-card { order: 1; }
  .login-layout .hero { order: 2; }

  /* Make hero compact */
  .login-layout .hero {
    padding: 12px 12px;
    border-radius: 14px;
  }

  .login-layout .hero h2 {
    font-size: 18px;
    line-height: 1.25;
    margin: 8px 0 6px;
  }

  .login-layout .hero p {
    font-size: 13px;
    margin: 0 0 10px;
    opacity: 0.9;
  }

  /* Reduce big image */
  .login-layout .hero-image img {
    max-width: 140px;
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
  }

  /* Chips wrap and stay small */
  .hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .hero-badges .chip {
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 999px;
  }

  /* Tighter spacing so form appears immediately */
  .auth-card--wide { padding: 14px; }
  .section-card.form-card { padding: 14px; }
  .auth-wrap { padding-top: 12px; }
}

/* Tablet: keep side-by-side but slightly tighter */
@media (min-width: 768px) and (max-width: 1024px) {
  .login-layout {
    grid-template-columns: 1fr 1fr;
    gap: 18px;
  }
  .login-layout .hero h2 { font-size: 22px; }
  .login-layout .hero-image img { max-width: 240px; }
}

/* Google button - white background */
.google-btn{
  background: #fff !important;
  color: #111827 !important;
  border: 1px solid rgba(17,24,39,0.14) !important;
  box-shadow: 0 8px 22px rgba(0,0,0,0.10);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
}

.google-btn:hover{
  background: #f9fafb !important;
  border-color: rgba(17,24,39,0.22) !important;
  transform: translateY(-1px);
}

.google-btn:active{
  transform: translateY(0);
}

/* Google icon size (small + consistent) */
.google-btn .google-icon{
  width: 18px !important;
  height: 18px !important;
  flex: 0 0 18px !important;
  display: inline-block;
}
