/* ═══════════════════════════════════════════════
   ALCULATOR — Auth Pages (Sign-Up, Sign-In)
   Split-screen standalone auth pages
═══════════════════════════════════════════════ */

/* ── Full-viewport split layout ── */
.auth-page {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

/* ── LEFT: Brand Panel ── */
.auth-brand-panel {
  padding: 48px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background-image: radial-gradient(rgba(255,255,255,.05) 1px, transparent 1px), var(--grad-ink);
  background-size: 30px 30px, auto;
}

/* Decorative aurora glow accents */
.auth-brand-panel::before {
  content: '';
  position: absolute;
  top: -140px;
  right: -80px;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(20,184,166,.32) 0%, transparent 62%);
  filter: blur(50px);
  z-index: -1;
  pointer-events: none;
}

.auth-brand-panel::after {
  content: '';
  position: absolute;
  bottom: -180px;
  left: -100px;
  width: 440px;
  height: 440px;
  background: radial-gradient(circle, rgba(8,145,178,.22) 0%, transparent 62%);
  filter: blur(50px);
  z-index: -1;
  pointer-events: none;
}

/* Logo */
.auth-brand-logo {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 400;
  text-decoration: none;
  display: inline-flex;
  align-items: baseline;
  margin-bottom: 0;
  position: relative;
  z-index: 1;
}
.auth-brand-logo .alc  { color: var(--teal-lt); }
.auth-brand-logo .ulator { color: rgba(255,255,255,.65); }

/* Brand content (vertically centered) */
.auth-brand-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 1;
  max-width: 460px;
}

.auth-brand-headline {
  font-family: var(--font-serif);
  font-size: clamp(26px, 2.6vw, 36px);
  font-weight: 400;
  color: var(--white);
  line-height: 1.25;
  letter-spacing: -.02em;
  margin: 0 0 32px;
}

.auth-brand-sub {
  font-size: 16px;
  color: rgba(255,255,255,.55);
  line-height: 1.7;
  margin: 0 0 24px;
}

/* Feature checklist */
.auth-features-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 40px;
}

.auth-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 15px;
  color: rgba(255,255,255,.75);
  line-height: 1.5;
}

.auth-feature-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--teal-lt);
}

/* Trust signals */
.auth-trust-signals {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 28px;
  border-top: 1px solid rgba(255,255,255,.07);
}

.auth-trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: rgba(255,255,255,.4);
  font-family: var(--font-mono);
  letter-spacing: .02em;
}

.auth-trust-icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  color: rgba(255,255,255,.3);
}

/* Social proof */
.auth-social-proof {
  margin-top: auto;
  padding-top: 32px;
  position: relative;
  z-index: 1;
}

.auth-social-proof p {
  font-size: 13px;
  color: rgba(255,255,255,.3);
  font-style: italic;
  margin: 0;
  line-height: 1.5;
}

/* ── RIGHT: Form Panel ── */
.auth-form-panel {
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
}

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

/* ── Progress indicator ── */
.auth-progress {
  display: flex;
  align-items: center;
  margin-bottom: 40px;
}

.auth-progress-step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-40);
  white-space: nowrap;
}

.auth-progress-step.active {
  color: var(--teal);
}

.auth-progress-step.completed {
  color: var(--green);
}

.auth-progress-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  background: var(--ink-10);
  color: var(--ink-40);
  flex-shrink: 0;
  transition: all .2s;
}

.auth-progress-step.active .auth-progress-dot {
  background: var(--teal);
  color: var(--white);
}

.auth-progress-step.completed .auth-progress-dot {
  background: var(--green-pale);
  color: var(--green);
  font-size: 14px;
}

.auth-progress-line {
  flex: 1;
  height: 2px;
  background: var(--ink-10);
  margin: 0 12px;
  transition: background .3s;
}

.auth-progress-line.completed {
  background: var(--green);
}

/* ── Form titles ── */
.auth-form-title {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -.02em;
  margin: 0 0 6px;
  line-height: 1.2;
}

.auth-form-subtitle {
  font-size: 15px;
  color: var(--ink-60);
  line-height: 1.55;
  margin: 0 0 32px;
}

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

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Reuse .auth-label, .auth-input, .auth-pw-wrap from shared.css */

/* Optional field helper */
.auth-optional {
  font-weight: 400;
  color: var(--ink-40);
  text-transform: none;
  letter-spacing: 0;
  font-size: 11px;
}

/* ── Password requirements (live validation) ── */
.pw-requirements {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 6px;
}

.pw-req {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--ink-40);
  transition: color .2s;
}

.pw-req.met {
  color: var(--green);
}

.pw-req-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pw-req-icon svg {
  width: 14px;
  height: 14px;
}

.pw-req.met .pw-req-icon svg.icon-circle { display: none; }
.pw-req.met .pw-req-icon svg.icon-check  { display: block; }
.pw-req:not(.met) .pw-req-icon svg.icon-circle { display: block; }
.pw-req:not(.met) .pw-req-icon svg.icon-check  { display: none; }

/* Password match indicator */
.pw-match-msg {
  font-size: 12px;
  margin: 2px 0 0;
  min-height: 18px;
  transition: color .2s;
}

.pw-match-msg.match    { color: var(--green); }
.pw-match-msg.no-match { color: var(--red); }

/* ── Submit button (full-width override) ── */
.auth-submit-btn {
  width: 100%;
  justify-content: center;
  margin-top: 4px;
  font-size: 15px;
  padding: 14px 24px;
}

.auth-submit-btn:disabled {
  opacity: .55;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ── OAuth button + divider ── */
.auth-oauth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  background: var(--white);
  border: 1.5px solid var(--ink-10);
  border-radius: var(--r);
  padding: 13px 24px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}

.auth-oauth-btn:hover {
  border-color: var(--ink-30);
  background: var(--parchment);
}

.auth-oauth-btn:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.auth-oauth-btn svg {
  flex-shrink: 0;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  font-size: 13px;
  color: var(--ink-40);
}

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

/* ── Resend confirmation email ── */
.auth-resend-btn {
  background: none;
  border: none;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--teal);
  cursor: pointer;
  padding: 0;
  margin-top: 14px;
  transition: color .15s;
}

.auth-resend-btn:hover { color: var(--teal-dark); }

.auth-resend-btn:disabled {
  color: var(--ink-40);
  cursor: not-allowed;
}

/* ── Switch link (sign in ↔ sign up) ── */
.auth-switch {
  text-align: center;
  font-size: 14px;
  color: var(--ink-60);
  margin-top: 28px;
}

.auth-switch a {
  color: var(--teal);
  font-weight: 600;
  text-decoration: none;
  transition: color .15s;
}

.auth-switch a:hover {
  color: var(--teal-dark);
  text-decoration: underline;
}

/* ── Terms text ── */
.auth-terms {
  text-align: center;
  font-size: 12px;
  color: var(--ink-40);
  line-height: 1.65;
  margin-top: 16px;
}

.auth-terms a {
  color: var(--ink-60);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-terms a:hover {
  color: var(--teal);
}

/* ── Forgot password link ── */
.auth-forgot-link {
  background: none;
  border: none;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--ink-40);
  cursor: pointer;
  text-align: right;
  padding: 0;
  transition: color .15s;
  align-self: flex-end;
  margin-top: -2px;
}

.auth-forgot-link:hover {
  color: var(--teal);
}

/* ── Skip button (profile step) ── */
.auth-skip-btn {
  background: none;
  border: none;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-40);
  cursor: pointer;
  padding: 8px 0;
  text-align: center;
  transition: color .15s;
}

.auth-skip-btn:hover {
  color: var(--ink-60);
}

/* ── User type radio cards (2×2 grid) ── */
.auth-type-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.auth-type-card {
  cursor: pointer;
}

.auth-type-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.auth-type-card-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  padding: 20px 14px 18px;
  border: 1.5px solid var(--ink-10);
  border-radius: var(--r-lg);
  transition: all .15s;
  background: var(--white);
}

.auth-type-card-inner:hover {
  border-color: var(--ink-20);
  background: var(--parchment);
}

.auth-type-card input:checked + .auth-type-card-inner {
  border-color: var(--teal);
  background: var(--teal-tint);
  box-shadow: 0 0 0 1px var(--teal);
}

.auth-type-card-inner .auth-type-icon {
  width: 28px;
  height: 28px;
  color: var(--ink-40);
  transition: color .15s;
}

.auth-type-card input:checked + .auth-type-card-inner .auth-type-icon {
  color: var(--teal);
}

.auth-type-card-inner strong {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}

.auth-type-card-inner span {
  font-size: 12px;
  color: var(--ink-40);
  line-height: 1.45;
}

/* ── Feature tip box (sign-in brand panel) ── */
.auth-feature-tip {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: var(--r-lg);
  padding: 20px 22px;
  margin-top: 32px;
}

.auth-tip-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--teal-lt);
  margin-bottom: 10px;
}

.auth-feature-tip p {
  font-size: 14px;
  color: rgba(255,255,255,.5);
  line-height: 1.65;
  margin: 0;
}

.auth-tip-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-tip-list li {
  font-size: 14px;
  color: rgba(255,255,255,.5);
  line-height: 1.5;
  padding-left: 20px;
  position: relative;
}

.auth-tip-list li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  color: var(--teal-lt);
  font-size: 13px;
}

/* ── Error / Success (override shared.css for standalone pages) ── */
.auth-page .auth-error,
.auth-page .auth-success {
  text-align: center;
  font-size: 13px;
  margin: 0;
  min-height: 0;
  line-height: 1.5;
}

.auth-page .auth-error {
  color: var(--red);
}

.auth-page .auth-success {
  color: var(--green);
}

/* ── Confirmation state ── */
.auth-confirmation {
  text-align: center;
  padding: 24px 0;
}

.auth-confirmation-icon {
  width: 48px;
  height: 48px;
  color: var(--teal);
  margin: 0 auto 16px;
}

.auth-confirmation h3 {
  font-family: var(--font-serif);
  font-size: 22px;
  color: var(--ink);
  margin: 0 0 8px;
  font-weight: 400;
}

.auth-confirmation p {
  font-size: 14px;
  color: var(--ink-60);
  line-height: 1.6;
  margin: 0;
}

/* ═══════════════════════════════════════════════
   ANIMATIONS
═══════════════════════════════════════════════ */
@keyframes authFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.auth-form-container {
  animation: authFadeIn .4s ease both;
}

.auth-brand-content {
  animation: authFadeIn .5s ease .1s both;
}

/* ═══════════════════════════════════════════════
   RESPONSIVE — Tablet & Mobile (≤768px)
═══════════════════════════════════════════════ */
@media (max-width: 768px) {
  .auth-page {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }

  /* Brand panel collapses to compact header */
  .auth-brand-panel {
    padding: 20px 24px;
    flex-direction: row;
    align-items: center;
  }

  .auth-brand-panel::before,
  .auth-brand-panel::after {
    display: none;
  }

  .auth-brand-content {
    display: none;
  }

  .auth-social-proof {
    display: none;
  }

  .auth-brand-logo {
    margin-bottom: 0;
  }

  .auth-form-panel {
    padding: 32px 24px 48px;
    align-items: flex-start;
  }

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

  .auth-progress {
    margin-bottom: 28px;
  }

  .auth-form-title {
    font-size: 24px;
  }

  /* Type cards: single column on very small screens */
  .auth-type-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 420px) {
  .auth-form-panel {
    padding: 24px 20px 40px;
  }

  .auth-type-grid {
    grid-template-columns: 1fr;
  }

  .auth-type-card-inner {
    flex-direction: row;
    text-align: left;
    gap: 12px;
    padding: 14px 16px;
  }

  .auth-type-card-inner .auth-type-icon {
    flex-shrink: 0;
  }

  .auth-type-card-inner div {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
}

/* ═══════════════════════════════════════════════
   RESPONSIVE — Large screens (≥1400px)
═══════════════════════════════════════════════ */
@media (min-width: 1400px) {
  .auth-brand-panel {
    padding: 56px 72px;
  }

  .auth-form-panel {
    padding: 56px 72px;
  }
}

/* ═══════════════════════════════════════════════
   Reduced Motion
═══════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .auth-form-container,
  .auth-brand-content {
    animation: none;
  }
}
