/* =========================================================================
   PORTANNOTATE — auth.css
   Layer on top of app.css for the six auth screens (login, signup, and the
   four password-reset steps). A full-bleed split: a quiet specimen panel on
   the left, the form on the right. No site header or footer on these pages.
   ========================================================================= */

.auth-split {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
@media (max-width: 900px) {
  .auth-split { grid-template-columns: 1fr; }
}

/* ---------- Left: specimen panel ---------- */

.auth-show {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--sp-6);
  padding: clamp(40px, 6vw, 80px);
  background: var(--ink-fixed);
  color: var(--on-ink-fixed);
  overflow: hidden;
}
.auth-show::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(70% 60% at 15% 0%, color-mix(in srgb, var(--accent) 35%, transparent), transparent 70%);
  pointer-events: none;
}
@media (max-width: 900px) { .auth-show { display: none; } }

.auth-show > * { position: relative; z-index: 1; }
.auth-show .eyebrow { color: var(--on-ink-muted); }
.auth-show-title {
  margin-top: var(--sp-4);
  font-size: var(--text-3xl);
  color: var(--on-ink-fixed);
  max-width: 14ch;
}
.auth-show-sub {
  margin-top: var(--sp-4);
  color: var(--on-ink-muted);
  font-size: var(--text-sm);
  max-width: 40ch;
}

.auth-show-list {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: var(--sp-5);
  border-top: 1px solid var(--on-ink-rule);
}
.auth-show-list li {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid var(--on-ink-rule);
  font-size: var(--text-sm);
  color: var(--on-ink-fixed);
}
.auth-show-list span {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--accent);
}

.auth-show-foot { display: grid; gap: 12px; }
.auth-show-assure {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--on-ink-muted);
}
.auth-show-assure svg { width: 16px; height: 16px; flex: 0 0 auto; color: var(--accent); }

/* ---------- Right: form column ---------- */

.auth-side {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: var(--sp-5);
  padding: clamp(40px, 6vw, 72px) clamp(24px, 5vw, 64px);
  background: var(--canvas);
}
.auth-toggle { position: absolute; top: 20px; right: 20px; }

.auth-card {
  width: 100%;
  max-width: 380px;
}
.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: var(--text-md);
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -.02em;
}
.auth-brand .brand-mark { width: 30px; height: 30px; }
.auth-brand .brand-mark svg { width: 16px; height: 16px; }
.auth-brand .brand-logo { height: 28px; }

.auth-h1 { margin-top: var(--sp-6); font-size: var(--text-2xl); }
.auth-sub { margin-top: var(--sp-2); color: var(--ink-muted); font-size: var(--text-sm); }
.auth-sub a { text-decoration: underline; text-underline-offset: 2px; }

.a-form { margin-top: var(--sp-5); display: grid; gap: var(--sp-4); }
.a-field { display: grid; gap: 6px; }
.a-label { }
.a-input {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  transition: border-color .14s var(--ease), box-shadow .14s var(--ease);
}
.a-input:focus-within { border-color: var(--accent); box-shadow: var(--shadow-focus); }
.a-input > svg { width: 16px; height: 16px; flex: 0 0 auto; color: var(--ink-faint); }
.a-input input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: none;
  padding: 11px 0;
}
.a-input input:focus { outline: none; box-shadow: none; }

.peek {
  display: inline-grid;
  place-items: center;
  width: 30px; height: 30px;
  border: 0;
  background: none;
  color: var(--ink-faint);
  cursor: pointer;
  flex: 0 0 auto;
}
.peek:hover { color: var(--ink-muted); }
.peek svg { width: 16px; height: 16px; }
.peek .icon-off { display: none; }
.peek[aria-pressed='true'] .icon-on { display: none; }
.peek[aria-pressed='true'] .icon-off { display: block; }

/* Color/size/family already come from the shared .a-err/.a-help rule in
   app.css — this only adds what's genuinely auth-specific: relaxed line
   height for the password-requirements list. */
.a-help { line-height: 1.5; }
.a-help ul { margin: 2px 0 0; padding-left: 1.1em; }
.a-help li + li { margin-top: 2px; }

.a-submit { width: 100%; margin-top: var(--sp-2); }
.a-submit svg { width: 16px; height: 16px; }

.a-minor { margin-top: var(--sp-4); font-size: var(--text-sm); }
.a-minor a { color: var(--ink-muted); }
.a-minor a:hover { color: var(--accent); }

.auth-legal {
  width: 100%;
  max-width: 380px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--ink-faint);
  text-align: center;
}

/* password-reset body copy sits in the same card */
.auth-card .prose { margin-top: var(--sp-4); font-size: var(--text-sm); }

/* ---------- Social sign-in ---------- */

.sso { display: grid; gap: 10px; margin-top: var(--sp-4); }
.sso form { margin: 0; }
.sso-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  transition: background .12s var(--ease), border-color .12s var(--ease), transform .1s var(--ease);
}
.sso-btn:hover { background: var(--surface-2); border-color: var(--ink-faint); transform: translateY(-1px); }
.sso-btn:active { transform: translateY(0); }
.sso-btn:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.sso-mark { width: 18px; height: 18px; flex: 0 0 auto; }

/* Apple's Human Interface Guidelines mandate literal black/white for this
   button — it does not take the product's own token palette. */
.sso-btn-apple {
  background: #000;
  border-color: #000;
  color: #fff;
}
.sso-btn-apple:hover { background: #111; border-color: #111; }
:root[data-theme='dark'] .sso-btn-apple,
:root:not([data-theme='light']) .sso-btn-apple { background: #fff; border-color: #fff; color: #000; }

.sso-or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: var(--sp-4) 0 0;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--ink-faint);
}
.sso-or::before, .sso-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}
