/* Sign in / sign up / password pages, and the same forms as a popup on the
   public site. Components are scoped to .a2 (the auth pages' body and the
   popup dialog), so nothing here leaks into the dashboard. */

.a2 {
  --o-600: #e8323f; --o-500: #ff4d43; --o-400: #ff6132; --o-300: #ffa69e; --o-100: #ffe4e1; --o-50: #fff3f1;
  --ink: #111114; --ink-2: #3f3f46; --muted: #6b7280; --dim: #9ca3af; --line: #ebe7e2;
  color: var(--ink); font-family: 'Inter', -apple-system, sans-serif; -webkit-font-smoothing: antialiased;
}
.auth2 {
  min-height: 100vh; margin: 0; background: #f4f2ef;
  display: flex; align-items: center; justify-content: center; padding: 32px 20px;
}
.a2 * { box-sizing: border-box; }
.a2 h1, .a2 h2, .a2 .a2-h { text-wrap: balance; }

.auth2-card {
  width: 100%; max-width: 1100px; min-height: 660px;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  background: #fbfaf8; border-radius: 30px; padding: 12px;
  box-shadow: 0 1px 2px rgba(17,17,20,.04), 0 30px 80px rgba(17,17,20,.12);
  animation: a2-in .7s cubic-bezier(.2,.8,.2,1) both;
}

/* ── Form side ───────────────────────────────────────────────────────── */
.auth2-form { position: relative; display: flex; flex-direction: column; justify-content: center; padding: 76px 56px 48px; }
.auth2-back {
  position: absolute; top: 22px; left: 26px; display: inline-flex; align-items: center; gap: 6px;
  font-size: 13.5px; font-weight: 500; color: var(--muted); text-decoration: none; padding: 6px 10px; border-radius: 999px;
}
.auth2-back:hover { color: var(--ink); background: #f0ede9; }

.a2 .auth-card { background: none; border: 0; box-shadow: none; padding: 0; max-width: 400px; width: 100%; margin: 0 auto; }
.a2 .auth-logo { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 30px; font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 19px; letter-spacing: -.01em; color: var(--ink); }
.a2 .auth-logo img { display: block; height: 34px; width: auto; }
.a2 .auth-logo b { background: none; -webkit-text-fill-color: currentColor; color: var(--o-500); font-weight: 700; }
.a2 .auth-card h1, .a2 .auth-card h2, .a2 .auth-card .a2-h {
  font-family: 'Outfit', sans-serif; font-weight: 600; font-size: clamp(30px, 3.4vw, 40px); letter-spacing: -.03em; line-height: 1.08;
  text-align: center; margin: 0; color: var(--ink);
}
.a2 .auth-card h1 em, .a2 .auth-card h2 em, .a2 .auth-card .a2-h em { font-family: 'Against', Georgia, serif; font-style: normal; font-weight: 400; color: var(--o-500); letter-spacing: 0; font-size: .78em; }
.a2 .auth-sub { text-align: center; color: var(--muted); font-size: 15px; margin: 12px 0 30px; }

.a2 .form-group { margin-bottom: 16px; }
.a2 label { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 7px; }
.a2 label small { display: inline; font-size: 12.5px; font-weight: 400; color: var(--dim); }
.a2 .label-row { display: flex; justify-content: space-between; align-items: baseline; }
.a2 .label-row a { font-size: 13px; font-weight: 500; color: var(--o-600); text-decoration: none; }
.a2 .label-row a:hover { text-decoration: underline; }

.a2 .field { position: relative; }
.a2 .field input {
  width: 100%; height: 50px; padding: 0 44px 0 16px; font: inherit; font-size: 15px; color: var(--ink);
  background: #f4f1ed; border: 1px solid transparent; border-radius: 14px; outline: none;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.a2 .field input::placeholder { color: #a8a29e; }
.a2 .field input:hover { background: #f0ece7; }
.a2 .field input:focus { background: #fff; border-color: var(--o-400); box-shadow: 0 0 0 4px rgba(255,77,67,.14); }
.a2 .field .ic { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: #a8a29e; pointer-events: none; display: flex; }
.a2 .field .eye { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border: 0; background: none; border-radius: 10px; color: #a8a29e; cursor: pointer; display: grid; place-items: center; }
.a2 .field .eye:hover { color: var(--ink-2); background: #ebe6e0; }
.a2 .field .eye .off { display: none; }
.a2 .field .eye.on .on { display: none; }
.a2 .field .eye.on .off { display: block; }

.a2 .btn-primary.btn-full {
  position: relative; overflow: hidden; width: 100%; height: 52px; margin-top: 10px; border: 0; border-radius: 14px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: inherit; font-size: 15px; font-weight: 600; color: #fff; text-decoration: none;
  background: linear-gradient(95deg, #ff6132 0%, #ff2461 100%);
  box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 10px 24px rgba(234,88,12,.32);
  transition: transform .15s ease, box-shadow .2s ease, filter .2s ease;
}
.a2 .btn-primary.btn-full:hover { transform: translateY(-1px); box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 14px 30px rgba(234,88,12,.38); }
.a2 .btn-primary.btn-full:active { transform: translateY(0); filter: brightness(.97); }
.a2 .btn-primary.btn-full::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%); transform: translateX(-120%); transition: transform .8s cubic-bezier(.2,.8,.2,1); }
.a2 .btn-primary.btn-full:hover::after { transform: translateX(120%); }
.a2 .btn-primary .arr { transition: transform .18s ease; }
.a2 .btn-primary:hover .arr { transform: translateX(3px); }

.a2 .auth-link { text-align: center; font-size: 14px; color: var(--muted); margin: 22px 0 0; }
.a2 .auth-link a { color: var(--o-600); font-weight: 600; text-decoration: none; }
.a2 .auth-link a:hover { text-decoration: underline; }
.a2 .auth-fine { text-align: center; font-size: 12.5px; color: var(--dim); margin: 14px 0 0; line-height: 1.5; }
.a2 .auth-fine a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 2px; }

.a2 .alert { border-radius: 12px; padding: 12px 14px; font-size: 14px; font-weight: 500; margin: 0 0 18px; border: 1px solid; }
.a2 .alert-error { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }
.a2 .alert-success { background: #ecfdf5; border-color: #a7f3d0; color: #047857; }

.a2 :focus-visible { outline: 2px solid var(--o-500); outline-offset: 3px; }
.a2 .field input:focus-visible { outline: none; }

/* ── Art side ────────────────────────────────────────────────────────── */
.auth2-art { position: relative; overflow: hidden; border-radius: 22px; background: #ff4d43; min-height: 100%; isolation: isolate; }
/* Three pictures stacked; the one in step with the current line fades in and
   slowly settles from a slight zoom, so the panel never sits completely still. */
.auth2-pics { position: absolute; inset: 0; z-index: 0; }
.auth2-pic { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.08); transition: opacity 1.2s ease, transform 6.5s ease-out; }
.auth2-pic.on { opacity: 1; transform: scale(1); }
i.auth2-pic { display: block; background: center / cover no-repeat; }
@media (prefers-reduced-motion: reduce) { .auth2-pic { transition: none; transform: none; } }
.auth2-art::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(48,8,24,0) 36%, rgba(48,8,24,.66) 100%);
}

.auth2-proof {
  position: absolute; top: 20px; right: 20px; z-index: 2; display: flex; align-items: center; gap: 12px;
  padding: 12px 16px 12px 12px; border-radius: 18px;
  background: rgba(255,255,255,.78); border: 1px solid rgba(255,255,255,.9);
  backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
  color: var(--ink); box-shadow: 0 12px 32px rgba(120,40,0,.22);
  animation: a2-float 7s ease-in-out infinite;
}
.auth2-proof .ring { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(#10b981 99%, #e5e7eb 0); }
.auth2-proof .ring::before { content: ""; grid-area: 1 / 1; width: 34px; height: 34px; border-radius: 50%; background: #fff; }
.auth2-proof .ring span { grid-area: 1 / 1; z-index: 1; font-size: 12px; font-weight: 700; color: #059669; }
.auth2-proof b { display: block; font-size: 13.5px; font-weight: 600; }
.auth2-proof small { display: block; font-size: 12px; color: var(--muted); }

.auth2-quote { position: absolute; left: 32px; right: 70px; bottom: 32px; z-index: 2; color: #fff; }
.auth2-quote .mark { font-family: 'Against', Georgia, serif; font-size: 54px; line-height: .6; opacity: .9; display: block; height: 22px; }
.auth2-slides { position: relative; min-height: 96px; }
.auth2-slide { position: absolute; inset: 0 0 auto 0; opacity: 0; transform: translateY(-8px); transition: opacity .4s ease, transform .4s ease; }
.auth2-slide.on { opacity: 1; transform: none; transition: opacity .6s ease .38s, transform .7s cubic-bezier(.2,.8,.2,1) .38s; }
.auth2-slide p { margin: 0; font-family: 'Outfit', sans-serif; font-size: 22px; font-weight: 500; line-height: 1.3; letter-spacing: -.01em; text-wrap: balance; }
.auth2-slide small { display: block; margin-top: 10px; font-size: 13.5px; opacity: .8; }
.auth2-dots { position: absolute; right: 22px; bottom: 36px; z-index: 2; display: flex; flex-direction: column; gap: 6px; }
.auth2-dots button { width: 6px; height: 6px; padding: 0; border: 0; border-radius: 99px; background: rgba(255,255,255,.45); cursor: pointer; transition: height .3s ease, background .3s ease; }
.auth2-dots button.on { height: 26px; background: #fff; }

@keyframes a2-in { from { opacity: 0; transform: translateY(16px) scale(.99); } to { opacity: 1; transform: none; } }
@keyframes a2-drift { from { transform: translate3d(-2%, -1%, 0) rotate(-1deg) scale(1); } to { transform: translate3d(2%, 2%, 0) rotate(1.5deg) scale(1.05); } }
@keyframes a2-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* ── Small screens: the form alone, with a slim strip of the art on top ── */
@media (max-width: 880px) {
  .auth2 { padding: 16px; align-items: flex-start; }
  .auth2-card { grid-template-columns: 1fr; min-height: 0; max-width: 520px; }
  .auth2-art { order: -1; height: 150px; min-height: 0; }
  .auth2-quote, .auth2-dots { display: none; }
  .auth2-proof { top: auto; bottom: 14px; right: 14px; padding: 8px 12px 8px 8px; }
  .auth2-proof .ring { width: 36px; height: 36px; }
  .auth2-proof .ring::before { width: 28px; height: 28px; }
  .auth2-form { padding: 64px 22px 30px; }
  .auth2-back { top: 16px; left: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .a2 *, .auth2-card { animation: none !important; transition: none !important; }
}


/* ── Popup on the public site ────────────────────────────────────────── */
html.a2-lock { overflow: hidden; }
.a2-modal { margin: auto; padding: 0; border: 0; background: transparent; width: min(980px, calc(100% - 32px)); max-width: none; max-height: calc(100dvh - 32px); overflow: visible; }
.a2-modal::backdrop { background: rgba(17,17,20,.45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.a2-modal[open] .auth2-card { animation: a2-pop .35s cubic-bezier(.2,.8,.2,1) both; }
.a2-modal[open]::backdrop { animation: a2-fade .3s ease both; }
.a2-modal .auth2-card { position: relative; min-height: 600px; max-height: calc(100dvh - 32px); }
.a2-modal .auth2-form { padding: 48px 48px 40px; overflow-y: auto; }
.a2-close {
  position: absolute; top: 22px; right: 22px; z-index: 5; width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.7); background: rgba(255,255,255,.85); color: var(--ink);
  display: grid; place-items: center; cursor: pointer; box-shadow: 0 6px 18px rgba(17,17,20,.15);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: transform .15s ease, background .15s ease;
}
.a2-close:hover { transform: rotate(90deg); background: #fff; }
.a2-modal .auth2-proof { top: 22px; right: 74px; }
.a2-pane[hidden] { display: none; }
.a2 .alert[hidden] { display: none; }
.a2 .btn-primary.btn-full[disabled] { opacity: .75; cursor: progress; transform: none; }

@keyframes a2-pop { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes a2-fade { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 880px) {
  .a2-modal { width: 100%; max-height: 100dvh; height: 100dvh; margin: 0; }
  .a2-modal .auth2-card { grid-template-columns: 1fr; min-height: 100dvh; max-height: 100dvh; border-radius: 0; padding: 0; overflow-y: auto; }
  .a2-modal .auth2-art { display: none; }
  .a2-modal .auth2-form { padding: 64px 22px 32px; overflow: visible; }
  .a2-close { top: 14px; right: 14px; border-color: var(--line); }
}

/* Continue with Google */
.btn-google { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 46px; border-radius: 12px; border: 1px solid var(--line, #dcdce3); background: #fff; color: #1f1f1f; font: 600 14.5px/1 Inter, system-ui, sans-serif; text-decoration: none; transition: background .15s, box-shadow .15s; }
.btn-google:hover { background: #f8f8fb; box-shadow: 0 1px 6px rgba(20, 20, 30, .08); }
.btn-google:focus-visible { outline: 2px solid #4285f4; outline-offset: 2px; }
.a2-or { display: flex; align-items: center; gap: 12px; margin: 16px 0 6px; color: var(--dim, #8b8b99); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.a2-or::before, .a2-or::after { content: ""; flex: 1; height: 1px; background: var(--line, #e6e6ee); }
