/* Sign-in page (login.html). Uses the landing page's colours and buttons (site.css). */
.auth-body { min-height: 100vh; background: var(--bg); }
.auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); min-height: 100vh; }

/* ---------- Left: the form ---------- */
.auth-main { display: flex; flex-direction: column; padding: 28px 40px; min-width: 0; }
.auth-logo { align-self: flex-start; font-size: 17px; }
.auth-box { width: 100%; max-width: 380px; margin: auto; padding: 48px 0; }
.auth-title { font-size: 28px; line-height: 1.15; font-weight: 600; letter-spacing: -0.02em; }
.auth-sub { margin-top: 8px; color: var(--text-2); font-size: 15px; }
.auth-form { display: flex; flex-direction: column; margin-top: 28px; }
.auth-step { display: flex; flex-direction: column; gap: 8px; }
.auth-step + .auth-step { margin-top: 16px; }
.auth-step[hidden] { display: none; }
.auth-form label { font-size: 13px; font-weight: 600; }
.auth-form input[type='email'], .auth-form input[type='password'], .auth-form input[type='text'] {
  width: 100%; height: 46px; padding: 0 14px; border-radius: 11px;
  border: 1px solid var(--input-border); background: var(--surface); color: var(--text);
  font: inherit; font-size: 16px; /* 16px stops iOS zooming in on focus */
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.auth-form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.auth-form input[aria-invalid='true'] { border-color: var(--over-fg); }

.auth-who {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px; margin-bottom: 6px;
  border-radius: 11px; background: var(--surface-2); border: 1px solid var(--border); font-size: 14px;
}
.auth-who span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.auth-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.link-btn { border: 0; background: none; padding: 2px 0; color: var(--accent); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.link-btn[hidden] { display: none; }

.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 48px !important; }
.pw-toggle {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 9px;
  background: none; color: var(--text-3); cursor: pointer;
}
.pw-toggle:hover { color: var(--text); background: var(--surface-2); }
.pw-toggle .eye-shut, .pw-toggle[aria-pressed='true'] .eye-open { display: none; }
.pw-toggle[aria-pressed='true'] .eye-shut { display: block; }
.pw-hint { font-size: 12.5px; color: var(--text-3); }
.forgot-help { padding: 12px 14px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--border); font-size: 13px; color: var(--text-2); line-height: 1.55; }
.forgot-help code { font-size: 12px; padding: 1px 6px; border-radius: 6px; background: var(--surface); border: 1px solid var(--border); white-space: nowrap; }
.remember { display: flex; align-items: center; gap: 10px; margin-top: 6px; font-weight: 500 !important; font-size: 13.5px !important; color: var(--text-2); cursor: pointer; min-height: 32px; }
.remember input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }

.auth-msg { min-height: 20px; margin-top: 14px; font-size: 13.5px; font-weight: 500; color: var(--over-fg); }
.auth-msg:empty { min-height: 0; margin-top: 6px; }
.auth-submit { margin-top: 12px; height: 46px; position: relative; }
.auth-submit .spinner {
  display: none; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.4); border-top-color: #fff; animation: spin 0.7s linear infinite;
}
.auth-submit.is-busy .spinner { display: inline-block; }
.auth-submit.is-busy { pointer-events: none; opacity: 0.85; }
@keyframes spin { to { transform: rotate(360deg); } }

.auth-alt { margin-top: 24px; font-size: 14px; color: var(--text-2); text-align: center; }
.auth-alt a, .auth-foot a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.auth-foot { font-size: 13px; color: var(--text-3); }

/* ---------- Right: product picture ---------- */
.auth-art {
  position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; padding: 48px;
  background: var(--bg-2);
  border-left: 1px solid var(--border);
}
.art-glow { display: none; }
.art-inner { position: relative; width: 100%; max-width: 460px; }
.art-kicker { font-size: 14px; font-weight: 500; color: var(--text-3); }
.art-title { margin-top: 12px; font-size: clamp(30px, 3.2vw, 42px); line-height: 1.1; font-weight: 600; letter-spacing: -0.025em; }
/* Signature: the dashed "preview" underline, as on the landing page */
.art-title span { text-decoration: underline dashed var(--accent); text-decoration-thickness: 2px; text-underline-offset: 0.14em; text-decoration-skip-ink: none; }
.art-card { margin-top: 32px; padding: 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-xl); }
.art-prompt { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--border-strong); color: var(--text); font-size: 14px; }
.art-prompt svg { color: var(--accent); flex: none; }
.art-rows { margin-top: 14px; display: grid; gap: 4px; }
.art-row { display: grid; grid-template-columns: 26px 60px 1fr 46px; align-items: center; gap: 10px; padding: 8px 4px; border-top: 1px solid var(--border); font-size: 13px; }
.art-row:first-child { border-top: 0; }
.art-av { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-size: 9.5px; font-weight: 650; background: var(--accent-soft); color: var(--accent); }
.art-name { font-weight: 500; }
.art-bar { height: 6px; border-radius: 99px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border); overflow: hidden; }
.art-bar b { display: block; height: 100%; border-radius: 99px; background: #a3a3b6; }
.art-bar.is-over b { background: var(--over-dot); }
.art-bar .w50 { width: 50%; } .art-bar .w70 { width: 70%; } .art-bar .w80 { width: 80%; } .art-bar .w100 { width: 100%; }
.art-pct { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.art-pct.is-over { color: var(--over-fg); }
.art-pct.is-free { color: var(--ok-fg); }
.art-note { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--text-3); }

@media (max-width: 960px) {
  .auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
}
@media (max-width: 720px) {
  .auth-main { padding: 20px; }
  .auth-box { padding: 32px 0; }
  .auth-title { font-size: 25px; }
  .link-btn { min-height: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  .auth-submit .spinner { animation: none; }
}
/* site.css gives .link-btn a top margin for the landing page; not wanted here */
.auth .link-btn { margin: 0; }
