/* ═══════════════════════════════════════════════════════════════
   Marvel Bot — Authentication Experience (2026)
   Premium light-theme SaaS auth · glassmorphism · split layout
   Reuses design tokens from app.css (:root)
   ═══════════════════════════════════════════════════════════════ */

.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--canvas);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink);
  animation: auth-fade .5s var(--ease);
  overflow: hidden;
}
.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  height: 100vh;
  height: 100dvh;
}

/* ── Landing page (scrollable) ── */
.auth-landing {
  overflow-y: auto;
  height: 100%;
  scroll-behavior: smooth;
  background:
    radial-gradient(1100px 520px at 8% -5%, rgba(99,102,241,.09), transparent 58%),
    radial-gradient(900px 480px at 95% 20%, rgba(139,92,246,.06), transparent 55%),
    var(--canvas);
}

.landing-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 40px;
  background: rgba(247,248,251,.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.landing-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--ink);
  text-decoration: none;
}
.landing-nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.landing-nav-links a {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color .15s var(--ease);
}
.landing-nav-links a:hover { color: var(--ink) }
.landing-nav-cta {
  height: 38px;
  padding: 0 16px;
  font-size: 13.5px;
  font-weight: 600;
  font-family: inherit;
  color: #fff;
  background: var(--brand-grad);
  border: none;
  border-radius: var(--r-sm);
  cursor: pointer;
  box-shadow: 0 6px 16px -8px rgba(99,102,241,.55);
  transition: filter .15s var(--ease), transform .12s var(--ease);
}
.landing-nav-cta:hover { filter: brightness(1.05) }

.landing-hero {
  padding: 56px 40px 40px;
  max-width: 920px;
}
.landing-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  margin-bottom: 22px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--brand-700);
  background: var(--brand-050);
  border: 1px solid var(--brand-200);
  border-radius: 999px;
}
.landing-hero-title {
  font-size: clamp(34px, 4.2vw, 48px);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -.035em;
  margin: 0 0 18px;
  color: var(--ink);
}
.landing-hero-title em {
  font-style: normal;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.landing-hero-lead {
  font-size: 17px;
  line-height: 1.65;
  color: var(--muted);
  max-width: 640px;
  margin: 0 0 28px;
}
.landing-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 36px;
}
.landing-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 22px;
  font-size: 14.5px;
  font-weight: 600;
  font-family: inherit;
  color: #fff;
  background: var(--brand-grad);
  border: none;
  border-radius: var(--r);
  cursor: pointer;
  box-shadow: 0 10px 24px -10px rgba(99,102,241,.65);
  transition: filter .15s var(--ease), transform .12s var(--ease);
  text-decoration: none;
}
.landing-btn-primary:hover { filter: brightness(1.04) }
.landing-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 20px;
  font-size: 14.5px;
  font-weight: 550;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--r);
  text-decoration: none;
  box-shadow: var(--shadow-xs);
  transition: border-color .15s var(--ease), background .15s var(--ease);
}
.landing-btn-ghost:hover { background: var(--surface-3); border-color: var(--border-strong) }

.landing-hero-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  padding-top: 8px;
}
.landing-metric {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.landing-metric strong {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--ink);
}
.landing-metric span {
  font-size: 13px;
  color: var(--faint);
}

.landing-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding: 20px 40px 28px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,.55);
}
.landing-trust span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
}
.landing-trust i { color: var(--brand); font-size: 16px }

.landing-section {
  padding: 56px 40px;
  max-width: 1040px;
}
.landing-section-alt {
  background: rgba(255,255,255,.6);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  max-width: none;
}
.landing-section-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 10px;
}
.landing-section-title {
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.15;
  margin: 0 0 14px;
  color: var(--ink);
  max-width: 720px;
}
.landing-section-text {
  font-size: 16px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 680px;
  margin: 0 0 32px;
}

.landing-about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.landing-about-card {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.landing-about-card:hover {
  border-color: var(--brand-200);
  box-shadow: var(--shadow-md);
}
.landing-about-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 22px;
  color: var(--brand);
  background: var(--brand-050);
  border: 1px solid var(--brand-100);
  margin-bottom: 16px;
}
.landing-about-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--ink);
}
.landing-about-card p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
}

.landing-steps {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 16px;
  align-items: start;
  max-width: 980px;
}
.landing-step {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.landing-step-num {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--brand);
  margin-bottom: 12px;
}
.landing-step h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--ink);
}
.landing-step p {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
}
.landing-step-arrow {
  display: grid;
  place-items: center;
  padding-top: 48px;
  color: var(--faint);
  font-size: 20px;
}

.landing-benefits-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  max-width: 900px;
}
.landing-benefit {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
}
.landing-benefit > i {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-size: 18px;
  color: var(--brand);
  background: var(--brand-050);
  border-radius: 10px;
}
.landing-benefit strong {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}
.landing-benefit span {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--muted);
}

.landing-cta-band {
  margin: 0 40px 48px;
  padding: 32px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 48%, #7c3aed 100%);
  border-radius: var(--r-xl);
  color: #fff;
  box-shadow: 0 20px 40px -16px rgba(79,70,229,.45);
}
.landing-cta-band h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.02em;
  margin: 0 0 6px;
}
.landing-cta-band p {
  font-size: 14.5px;
  margin: 0;
  opacity: .9;
}
.landing-cta-band .landing-btn-primary {
  background: #fff;
  color: var(--brand-700);
  box-shadow: 0 8px 20px rgba(0,0,0,.12);
}

.landing-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 40px 40px;
  border-top: 1px solid var(--border);
}
.landing-footer-brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: var(--muted);
}
.landing-footer-brand strong { color: var(--ink); font-size: 14px }
.landing-footer-brand a { color: var(--brand); text-decoration: none }
.landing-footer-links {
  display: flex;
  gap: 20px;
}
.landing-footer-links a {
  font-size: 13px;
  color: var(--faint);
  text-decoration: none;
}
.landing-footer-links a:hover { color: var(--muted) }
.landing-footer-copy { font-size: 12.5px; color: var(--faint) }

/* Logo icon (shared) */
.auth-brand-logo-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-size: 20px;
  background: var(--brand-grad);
  color: #fff;
  border: none;
  box-shadow: 0 6px 18px -8px rgba(99,102,241,.45);
}
.landing-logo .auth-brand-logo-icon {
  width: 34px;
  height: 34px;
  font-size: 18px;
}
@keyframes auth-fade { from { opacity: 0 } to { opacity: 1 } }
/* ── Auth panel (sticky right) ── */
.auth-main {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 28px 24px 32px;
  overflow-y: auto;
  height: 100%;
  background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: -12px 0 40px -24px rgba(18, 20, 40, .12);
}
.auth-card-wrap {
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 28px;
}
.auth-panel-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 20px;
}
.auth-panel-label::before {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.auth-panel-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.auth-mobile-logo {
  display: none;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -.02em;
  margin-bottom: 28px;
  color: var(--ink);
}
.auth-mobile-logo .auth-brand-logo-icon {
  width: 36px; height: 36px;
  background: var(--brand-grad);
  border: none;
  color: #fff;
}

/* ── Forms ── */
.auth-form { animation: auth-slide .35s var(--ease) }
@keyframes auth-slide { from { opacity: 0; transform: translateY(6px) } to { opacity: 1; transform: none } }

.auth-head { margin-bottom: 24px }
.auth-head h2 {
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -.025em;
  margin: 0 0 7px;
  color: var(--ink);
}
.auth-head p {
  font-size: 14.5px;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

.auth-field { margin-bottom: 16px }
.auth-field > label,
.auth-label-row > label {
  display: block;
  font-size: 13px;
  font-weight: 550;
  color: var(--ink-2);
  margin-bottom: 7px;
}
.auth-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 7px;
}
.auth-label-row > label { margin-bottom: 0 }

.auth-field input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  font-size: 14.5px;
  font-family: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--r);
  outline: none;
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease), background .16s var(--ease);
  box-shadow: var(--shadow-xs);
}
.auth-field input::placeholder { color: var(--faint) }
.auth-field input:hover { border-color: var(--border-strong) }
.auth-field input:focus {
  border-color: var(--brand);
  box-shadow: var(--brand-ring);
  background: #fff;
}

.auth-password { position: relative }
.auth-password input { padding-right: 44px }
.auth-eye {
  position: absolute;
  top: 0;
  right: 0;
  width: 44px;
  height: 46px;
  display: grid;
  place-items: center;
  background: none;
  border: none;
  color: var(--faint);
  cursor: pointer;
  font-size: 17px;
  transition: color .16s var(--ease);
}
.auth-eye:hover { color: var(--muted) }

.auth-hint { font-size: 12px; color: var(--faint); margin-top: 6px }

/* ── Submit button ── */
.auth-submit {
  position: relative;
  width: 100%;
  height: 47px;
  margin-top: 4px;
  font-size: 14.5px;
  font-weight: 600;
  font-family: inherit;
  color: #fff;
  background: var(--brand-grad);
  border: none;
  border-radius: var(--r);
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 20px -8px rgba(99,102,241,.6), inset 0 1px 0 rgba(255,255,255,.25);
  transition: transform .12s var(--ease), box-shadow .2s var(--ease), filter .16s var(--ease);
}
.auth-submit:hover { filter: brightness(1.04); box-shadow: 0 12px 26px -8px rgba(99,102,241,.7), inset 0 1px 0 rgba(255,255,255,.25) }
.auth-submit:active { transform: translateY(1px) }
.auth-submit:disabled { cursor: default; filter: saturate(.7) opacity(.9) }
.auth-submit .auth-spin { display: none; font-size: 18px }
.auth-submit.loading .auth-submit-label { visibility: hidden }
.auth-submit.loading .auth-spin { display: block; position: absolute; animation: auth-rotate .7s linear infinite }
@keyframes auth-rotate { to { transform: rotate(360deg) } }

/* ── Divider ── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 20px 0;
  color: var(--faint);
  font-size: 12.5px;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-2);
}
/* Hidden when no Google button is present */
.auth-divider[data-google="1"]:not(.on) { display: none }
.auth-google-slot { margin-bottom: 0 }
.auth-google-slot:empty { display: none }
.auth-google-slot > div { display: flex; justify-content: center }

/* Fallback custom Google button (used if GIS button render is unavailable) */
.auth-google-btn {
  width: 100%;
  height: 47px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 14.5px;
  font-weight: 550;
  font-family: inherit;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--r);
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: background .16s var(--ease), border-color .16s var(--ease), box-shadow .16s var(--ease);
}
.auth-google-btn:hover { background: var(--surface-3); border-color: var(--border-strong); box-shadow: var(--shadow-sm) }
.auth-google-btn svg { width: 18px; height: 18px }

/* ── Links / switches ── */
.auth-link-btn {
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: 13px;
  font-weight: 550;
  color: var(--brand);
  cursor: pointer;
  transition: color .14s var(--ease);
}
.auth-link-btn:hover { color: var(--brand-700); text-decoration: underline }
.auth-switch {
  margin: 20px 0 0;
  text-align: center;
  font-size: 13.5px;
  color: var(--muted);
}
.auth-switch .auth-link-btn { font-size: 13.5px }
.auth-terms {
  margin: 16px 0 0;
  text-align: center;
  font-size: 12px;
  color: var(--faint);
  line-height: 1.5;
}
.auth-terms a { color: var(--muted); text-decoration: none }
.auth-terms a:hover { text-decoration: underline }

/* ── Feedback ── */
.auth-error {
  display: none;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 14px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--red-ink);
  background: var(--red-bg);
  border: 1px solid var(--red-bd);
  border-radius: var(--r-sm);
}
.auth-error.on { display: flex }
.auth-notice {
  margin-bottom: 14px;
  padding: 11px 13px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--green-ink);
  background: var(--green-bg);
  border: 1px solid var(--green-bd);
  border-radius: var(--r-sm);
}
.auth-notice code {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  background: rgba(0,0,0,.05);
  border-radius: 5px;
  word-break: break-all;
}

/* ── Footer ── */
.auth-footer {
  margin-top: 34px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--faint);
}
.auth-footer nav { display: flex; gap: 18px }
.auth-footer a { color: var(--faint); text-decoration: none; transition: color .14s var(--ease) }
.auth-footer a:hover { color: var(--muted) }

/* ── Sidebar logout button (app) ── */
.sb-logout {
  margin-left: auto;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: none;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--faint);
  cursor: pointer;
  font-size: 16px;
  transition: background .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease);
}
.sb-logout:hover { background: var(--red-bg); color: var(--red); border-color: var(--red-bd) }

/* ── Pending approval ── */
.auth-pending { text-align: center; padding-top: 12px }
.auth-pending-icon {
  width: 72px; height: 72px; margin: 0 auto 20px;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border-radius: 50%; display: grid; place-items: center;
  font-size: 32px; color: #d97706;
  box-shadow: 0 8px 24px rgba(217,119,6,.15);
}
.auth-pending-note {
  display: flex; align-items: flex-start; gap: 10px;
  background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px;
  padding: 14px 16px; margin: 20px 0 24px; text-align: left;
  font-size: 13.5px; color: #64748b; line-height: 1.5;
}
.auth-pending-note i { color: #6366f1; font-size: 18px; flex-shrink: 0; margin-top: 1px }

/* ── Responsive ── */
@media (max-width: 1100px) {
  .auth-layout { grid-template-columns: 1fr 380px }
  .landing-about-grid { grid-template-columns: 1fr }
  .landing-steps {
    grid-template-columns: 1fr;
  }
  .landing-step-arrow { display: none }
}
@media (max-width: 940px) {
  .auth-screen { overflow: auto }
  .auth-layout {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 100vh;
  }
  .auth-landing { height: auto; overflow: visible }
  .auth-main {
    height: auto;
    border-left: none;
    border-top: 1px solid var(--border);
    box-shadow: none;
    padding: 32px 22px 40px;
  }
  .auth-card-wrap { position: static; max-width: 440px; margin: 0 auto }
  .landing-nav-links { display: none }
  .landing-hero { padding: 40px 22px 28px }
  .landing-trust { padding: 18px 22px }
  .landing-section { padding: 40px 22px }
  .landing-cta-band { margin: 0 22px 32px; padding: 24px }
  .landing-footer { padding: 24px 22px 32px }
  .landing-benefits-grid { grid-template-columns: 1fr }
  .auth-mobile-logo { display: flex }
}
@media (max-width: 420px) {
  .auth-head h2 { font-size: 22px }
  .landing-hero-title { font-size: 28px }
  .landing-hero-actions { flex-direction: column }
  .landing-btn-primary, .landing-btn-ghost { width: 100%; justify-content: center }
}
