/* ============================================================
   auth.css — sign-in / sign-up / forgot / reset / account stub.
   Ported verbatim from the approved standalone prototypes
   (login/create-account/reset-password), deduped across the three.
   Additions at the bottom: flash messages (server feature the
   prototypes didn't carry) in the same visual language.
   ============================================================ */

/* ââââââââââââ Sign in ââââââââââââ */
  body { background: var(--bg); margin: 0; }
.lg {
    font-family: var(--font-display); color: var(--ink);
    -webkit-font-smoothing: antialiased;
    /* standalone previews centered in a bare viewport (min-height:100vh);
       inside the site layout that inflated the section — normal page
       rhythm instead: */
    display: flex; justify-content: center;
    padding: 84px 22px var(--section-py);
  }
.lg a { color: inherit; text-decoration: none; }
.lg [data-mono] { font-family: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace; letter-spacing: -0.02em; }
.lg-card {
    width: 100%; max-width: 420px;
    background: var(--bg-card); border: 1px solid var(--line); border-radius: 24px;
    box-shadow: 0 1px 2px rgba(14,42,34,0.04), var(--shadow-md);
    padding: 44px 40px 40px;
  }
@media (max-width: 480px) { .lg-card { padding: 34px 24px 30px; border-radius: 20px; } }
.lg-eyebrow {
    font-family: var(--font-mono); font-size: 12px; color: var(--mint-ink);
    text-transform: uppercase; letter-spacing: 0.1em; font-weight: 500;
    display: inline-flex; align-items: center; gap: 8px;
  }
.lg-eyebrow::before { content: ""; width: 18px; height: 1px; background: var(--mint-ink); }
.lg-title { font-size: 30px; line-height: 1.08; letter-spacing: -0.03em; font-weight: 600; color: var(--forest); margin: 14px 0 8px; }
.lg-sub { font-size: 14.5px; line-height: 1.55; color: var(--ink-2); margin: 0 0 30px; }
.lg-field + .lg-field { margin-top: 18px; }
.lg-label {
    display: flex; align-items: baseline; justify-content: space-between;
    font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: 0.07em;
    text-transform: uppercase; color: var(--ink-2); margin-bottom: 8px;
  }
.lg-forgot { font-weight: 500; color: var(--mint-ink); text-transform: none; letter-spacing: 0.01em; font-size: 12px; }
.lg-forgot:hover { text-decoration: underline; }
.lg-input-wrap { position: relative; }
.lg-input {
    width: 100%; box-sizing: border-box;
    font-family: var(--font-display); font-size: 15px; color: var(--ink);
    background: var(--bg); border: 1px solid var(--line-strong); border-radius: 13px;
    padding: 13px 15px; outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
  }
.lg-input::placeholder { color: var(--ink-3); }
.lg-input:focus { border-color: var(--mint-ink); box-shadow: 0 0 0 3px var(--mint-soft); background: var(--bg-card); }
.lg-input.has-toggle { padding-right: 48px; }
.lg-eye {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    width: 36px; height: 36px; border: 0; background: none; border-radius: 10px;
    color: var(--ink-3); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: color 0.15s, background 0.15s;
  }
.lg-eye:hover { color: var(--forest); background: var(--bg-soft); }
.lg-eye svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.lg-eye .i-off { display: none; }
.lg-eye.showing .i-on { display: none; }
.lg-eye.showing .i-off { display: block; }
.lg-submit {
    width: 100%; margin-top: 26px; box-sizing: border-box;
    display: inline-flex; align-items: center; justify-content: center; gap: 9px;
    font-family: var(--font-display); font-size: 15px; font-weight: 600; letter-spacing: 0.01em;
    color: #f2efe8; background: var(--forest); border: 0; border-radius: 14px;
    padding: 15px 20px; cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
  }
.lg-submit:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.lg-submit:active { transform: translateY(0); }
.lg-submit svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.15s; }
.lg-submit:hover svg { transform: translateX(2px); }
.lg-foot {
    margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line);
    text-align: center; font-size: 14px; color: var(--ink-2);
  }
.lg-foot a { font-weight: 600; color: var(--mint-ink); }
.lg-foot a:hover { text-decoration: underline; }
/* ââââââââââââ Create account ââââââââââââ */
  body { background: var(--bg); margin: 0; }
.lg-row { display: flex; gap: 14px; }
.lg-row .lg-field { flex: 1; margin-top: 0; }
.lg-row + .lg-field { margin-top: 18px; }
.lg-hint { font-size: 12px; color: var(--ink-3); margin: 7px 0 0; }
.lg-check {
    display: flex; gap: 11px; align-items: flex-start; margin-top: 22px;
    font-size: 13px; line-height: 1.5; color: var(--ink-2); cursor: pointer;
  }
.lg-check input { appearance: none; -webkit-appearance: none; margin: 1px 0 0; flex: none;
    width: 18px; height: 18px; border: 1px solid var(--line-strong); border-radius: 6px;
    background: var(--bg); cursor: pointer; position: relative; transition: background 0.15s, border-color 0.15s; }
.lg-check input:checked { background: var(--forest); border-color: var(--forest); }
.lg-check input:checked::after { content: ""; position: absolute; left: 5px; top: 1.5px; width: 5px; height: 9px;
    border: solid #f2efe8; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.lg-check a { color: var(--mint-ink); font-weight: 600; }
.lg-check a:hover { text-decoration: underline; }
.lg-submit {
    width: 100%; margin-top: 24px; box-sizing: border-box;
    display: inline-flex; align-items: center; justify-content: center; gap: 9px;
    font-family: var(--font-display); font-size: 15px; font-weight: 600; letter-spacing: 0.01em;
    color: #f2efe8; background: var(--forest); border: 0; border-radius: 14px;
    padding: 15px 20px; cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
  }
/* ââââââââââââ Reset password ââââââââââââ */
  body { background: var(--bg); margin: 0; }
.lg-mark {
    width: 52px; height: 52px; border-radius: 15px;
    background: var(--mint-soft); color: var(--mint-ink);
    display: flex; align-items: center; justify-content: center; margin-bottom: 22px;
  }
.lg-mark svg { width: 25px; height: 25px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
/* (duplicate .lg-label from the signup/reset prototypes removed — it set
   display:block and overrode the flex rule above, breaking the
   right-aligned "Forgot password?" link) */
.lg-foot a { font-weight: 600; color: var(--mint-ink); display: inline-flex; align-items: center; gap: 6px; }
.lg-foot svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* ---- server flash messages (not in the prototypes) ---- */
.lg-flash {
  font-size: 13.5px; border-radius: 10px; padding: 10px 14px; margin-bottom: 18px;
}
.lg-flash-error  { background: rgba(196, 74, 54, 0.09);  color: #a03f2e; }
.lg-flash-notice { background: rgba(0, 200, 150, 0.10);  color: var(--forest); }

/* ── Continue with Google (OAuth) ──
   Google's guidance: neutral/white button, official 4-color mark, clear
   "Continue with Google" label. Sits above the email form with an "or"
   divider; only rendered when OAuth is configured (see AuthController). */
.lg-oauth {
  display: flex; align-items: center; justify-content: center; gap: 11px;
  width: 100%; padding: 13px 18px; margin-top: 14px;
  font-family: var(--font-display); font-size: 15px; font-weight: 500; letter-spacing: 0.01em;
  color: var(--forest); background: var(--bg-card);
  border: 1px solid var(--line-strong); border-radius: 14px;
  cursor: pointer; text-decoration: none;
  transition: background 0.18s, border-color 0.18s, box-shadow 0.18s;
}
.lg-oauth:hover { background: var(--bg-soft); border-color: var(--forest); }
.lg-oauth:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--mint-soft); border-color: var(--mint-ink); }
.lg-oauth-icon { width: 18px; height: 18px; flex: none; }
.lg-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 22px 0 10px; color: var(--ink-3);
  font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  font-family: var(--font-mono, monospace);
}
.lg-divider::before, .lg-divider::after {
  content: ""; flex: 1 1 auto; height: 1px; background: var(--line);
}
@media (prefers-reduced-motion: reduce) { .lg-oauth { transition: none; } }

/* ============================================================
   Terms / Privacy modals — the sign-up consent line opens these
   instead of navigating away, same pattern as the checkout terms
   modal (.co-modal). Body content is shared with the standalone
   /terms-and-condition and /privacy pages via the terms_content /
   privacy_content partials, so the legal text has one source.
   ============================================================ */
.lg-modal {
  display: none; position: fixed; inset: 0; z-index: 9999;
  background: rgba(8,26,21,0.55);
  align-items: center; justify-content: center; padding: 16px;
}
.lg-modal.open { display: flex; }
.lg-modal-inner {
  background: var(--bg-card, #fff);
  border: 1px solid var(--line, rgba(14,42,34,0.09));
  border-radius: 20px;
  width: 100%; max-width: 640px; max-height: 88vh;
  display: flex; flex-direction: column; position: relative;
  box-shadow: var(--shadow-lg, 0 24px 60px rgba(14,42,34,0.14));
  font-family: var(--font-display, 'Neue Haas Display', 'Helvetica Neue', Helvetica, Arial, sans-serif);
  animation: lg-modal-in 0.2s cubic-bezier(0.2,0.7,0.2,1);
}
@keyframes lg-modal-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.lg-modal-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 22px 24px 16px; border-bottom: 1px solid var(--line, rgba(14,42,34,0.09));
  flex: none;
}
.lg-modal-title { font-size: 18px; font-weight: 600; color: var(--forest, #0e2a22); letter-spacing: -0.01em; }
.lg-modal-close {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  background: var(--bg-soft, #ebe7dd); border: none; cursor: pointer; color: var(--ink-2, #3a5a52);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, color 0.2s;
}
.lg-modal-close:hover { background: var(--line-strong, rgba(14,42,34,0.18)); color: var(--forest, #0e2a22); }
.lg-modal-close svg { width: 18px; height: 18px; }
.lg-modal-body {
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 8px 24px 24px;
}
.lg-modal-body .lgl-intro { margin-top: 16px; }
.lg-modal-body .lgl-sec:first-of-type { border-top: none; }
.lg-modal-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 16px 24px; border-top: 1px solid var(--line, rgba(14,42,34,0.09)); flex: none;
}
.lg-modal-foot a.lg-modal-fulllink {
  font-family: var(--font-mono, monospace); font-size: 13px; color: var(--mint-ink, #007a5a); font-weight: 500;
  display: inline-flex; align-items: center; gap: 6px;
}
.lg-modal-foot .btn { padding: 11px 22px; }
@media (prefers-reduced-motion: reduce) {
  .lg-modal-inner { animation: none; }
}

/* Terms/Privacy document content styles (mirror of the .lgl-* rules on
   the standalone legal pages) scoped to the modal body, since auth.css
   does not load those pages' scoped <style>. */
.lg-modal-body .lgl-intro {
  padding: 20px 22px; background: var(--bg-soft, #ebe7dd);
  border: 1px solid var(--line, rgba(14,42,34,0.09));
  border-radius: 14px; margin-bottom: 4px;
}
.lg-modal-body .lgl-intro p { font-size: 14.5px; line-height: 1.7; color: var(--ink-2, #3a5a52); }
.lg-modal-body .lgl-intro strong { color: var(--forest, #0e2a22); font-weight: 600; }
.lg-modal-body .lgl-sec { padding-top: 26px; margin-top: 26px; border-top: 1px solid var(--line, rgba(14,42,34,0.09)); }
.lg-modal-body .lgl-sec:first-of-type { border-top: none; padding-top: 20px; margin-top: 0; }
.lg-modal-body .lgl-sec-num {
  font-family: var(--font-mono, monospace); font-size: 11.5px; letter-spacing: 0.1em;
  color: var(--mint-ink, #007a5a); font-weight: 500; display: block; margin-bottom: 6px;
}
.lg-modal-body .lgl-sec h3 {
  font-size: 18px; letter-spacing: -0.015em; font-weight: 600; color: var(--forest, #0e2a22);
  line-height: 1.2; margin: 0 0 10px;
}
.lg-modal-body .lgl-body p { font-size: 14px; line-height: 1.7; color: var(--ink-2, #3a5a52); }
.lg-modal-body .lgl-body p + p { margin-top: 11px; }
.lg-modal-body .lgl-body strong { color: var(--forest, #0e2a22); font-weight: 600; }
.lg-modal-body .lgl-body em { color: var(--ink-2, #3a5a52); font-style: italic; }
.lg-modal-body .lgl-body ol { margin: 12px 0; display: flex; flex-direction: column; gap: 9px; counter-reset: lgl; }
.lg-modal-body .lgl-body ol li {
  display: flex; gap: 12px; counter-increment: lgl;
  font-size: 14px; line-height: 1.55; color: var(--ink-2, #3a5a52);
}
.lg-modal-body .lgl-body ol li::before {
  content: counter(lgl, lower-alpha) "."; flex: none;
  font-family: var(--font-mono, monospace); font-size: 12px; color: var(--mint-ink, #007a5a); padding-top: 1px; min-width: 16px;
}
.lg-modal-body .lgl-legalese {
  margin: 12px 0; padding: 14px 16px;
  background: var(--bg-soft, #ebe7dd); border: 1px solid var(--line, rgba(14,42,34,0.09));
  border-left: 2px solid var(--line-strong, rgba(14,42,34,0.18)); border-radius: 10px;
}
.lg-modal-body .lgl-legalese p {
  font-size: 12px; line-height: 1.65; letter-spacing: 0.02em;
  color: var(--ink-2, #3a5a52); font-family: var(--font-mono, monospace);
}
