/* Sign-in, sign-up, invite and password pages: layout only. Components (buttons, fields, banners) come from app.css and
   colours from tokens.css. Split screen: form left (max 400px), abstract visual right, hidden under 900px. */

.auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); min-height: 100vh; min-height: 100dvh; background: var(--bg-surface); }
.auth-main { display: flex; flex-direction: column; min-width: 0; padding: var(--space-6) var(--space-7); }
.auth-logo { display: inline-flex; align-items: center; gap: 10px; align-self: flex-start; color: var(--fg); font-size: var(--text-md); font-weight: var(--weight-semibold); letter-spacing: var(--tracking-snug); text-decoration: none; }
.auth-logo:hover { text-decoration: none; }
.logo-mark { position: relative; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--ink); flex: none; }
.logo-mark::before { content: ""; width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--on-ink); }
.logo-mark::after { content: ""; position: absolute; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 1.5px var(--ink); }
.auth-body { flex: 1; display: flex; align-items: center; justify-content: center; padding: var(--space-8) 0; }
.auth-form { width: 100%; max-width: 400px; }
.auth-form h1 { font-size: var(--text-3xl); font-weight: var(--weight-bold); letter-spacing: -0.03em; line-height: 1.1; }
.auth-sub { margin: var(--space-2) 0 var(--space-6); color: var(--fg-muted); font-size: 0.9375rem; }
.auth-form .field { margin-bottom: var(--space-4); }
.auth-form .field input:not([type="checkbox"]) { height: var(--control-lg); font-size: 0.9375rem; padding: 0 14px; }
.auth-form .banner { margin-bottom: var(--space-5); }
.auth-form .banner.note { background: var(--bg-canvas); border-color: var(--border); }
.auth-form .banner.note > .icon { color: var(--fg-muted); }
.auth-form .btn-primary { margin-top: var(--space-2); }
.auth-alt { margin-top: var(--space-6); color: var(--fg-muted); font-size: var(--text-sm); text-align: center; }
.auth-alt a { font-weight: var(--weight-medium); }
.auth-foot { display: flex; gap: var(--space-4); color: var(--fg-subtle); font-size: var(--text-xs); }

/* password with a Show/Hide control inside the field */
.control { position: relative; display: flex; align-items: center; }
.control input { padding-right: 72px !important; }
.toggle {
  position: absolute; right: 6px; height: 32px; min-width: 56px; padding: 0 var(--space-3);
  border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--fg-muted);
  font-size: var(--text-sm); font-weight: var(--weight-medium); cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.toggle:hover { background: var(--bg-muted); color: var(--fg); }
.link-btn { padding: 0; border: 0; background: none; color: var(--accent-fg); font-size: var(--text-sm); font-weight: var(--weight-medium); cursor: pointer; }
.link-btn:hover { text-decoration: underline; text-underline-offset: 3px; }
.forgot-note { margin: 0 0 var(--space-4); padding: 10px 12px; border-radius: var(--radius-md); background: var(--bg-canvas); color: var(--fg-muted); font-size: var(--text-sm); }
.toggle-link { padding: 0; border: 0; background: none; color: var(--accent-fg); font: inherit; font-weight: var(--weight-medium); cursor: pointer; }
.toggle-link:hover { text-decoration: underline; text-underline-offset: 3px; }

.divider { display: flex; align-items: center; gap: var(--space-3); margin: var(--space-5) 0; color: var(--fg-subtle); font-size: var(--text-xs); }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.btn-google { --btn-bg: var(--bg-surface); --btn-bg-hover: var(--bg-canvas); border-color: var(--border-strong); box-shadow: var(--shadow-xs); }
.btn-google img { width: 18px; height: 18px; }

/* invite: who invited you and the locked email */
.invite-facts { display: flex; align-items: center; gap: var(--space-3); margin: 0 0 var(--space-6); padding: 12px 14px; border-radius: 12px; background: var(--bg-canvas); }
.invite-facts p { margin: 0; color: var(--fg-muted); font-size: var(--text-sm); }
.invite-facts strong { color: var(--fg); font-weight: var(--weight-semibold); }
.locked { position: relative; display: flex; align-items: center; }
.locked > .icon { position: absolute; right: 14px; color: var(--fg-subtle); pointer-events: none; }
.locked input { padding-right: 40px !important; }
.quiet { margin: var(--space-5) 0 0; color: var(--fg-muted); font-size: var(--text-sm); text-align: center; }
.loading { display: flex; align-items: center; gap: 10px; color: var(--fg-muted); }

/* the visual */
.auth-visual { position: relative; margin: 12px; overflow: hidden; border-radius: var(--radius-xl); background: var(--auth-visual-bg); }
.auth-visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 48%; }
.auth-caption { position: absolute; left: var(--space-6); right: var(--space-6); bottom: var(--space-6); margin: 0; color: var(--fg-muted); font-size: 0.9375rem; line-height: 1.45; max-width: 34ch; }
.auth-caption strong { display: block; color: var(--fg); font-size: var(--text-lg); font-weight: var(--weight-semibold); letter-spacing: var(--tracking-snug); }

@media (max-width: 899px) {
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-visual { display: none; }
  .auth-main { padding: var(--space-5) var(--space-5); }
  .auth-body { align-items: flex-start; padding: var(--space-8) 0 var(--space-6); }
}
@media (max-width: 480px) {
  .auth-main { padding: var(--space-4) var(--space-4) var(--space-5); }
  .auth-body { padding-top: var(--space-7); }
  .auth-form h1 { font-size: var(--text-2xl); }
  .auth-sub { margin-bottom: var(--space-5); }
}
@media (prefers-reduced-motion: reduce) {
  .toggle { transition: none; }
}
