/* POSH Systems: sign-in, registration, verification and password pages.
   Every selector is scoped under .posh-auth so nothing leaks into other pages.
   Fonts come from the storefront (--font-display / --font-body) with safe fallbacks. */

.posh-auth {
  --pa-midnight: #0c1828;
  --pa-navy: #13243b;
  --pa-emerald: #1d6b5f;
  --pa-emerald-deep: #12483f;
  --pa-emerald-soft: #8ccbbd;
  --pa-champagne: #c8a86a;
  --pa-champagne-soft: #e6d5ae;
  --pa-ivory: #f7f4ee;
  --pa-paper: #fcfbf8;
  --pa-text: #1c2636;
  --pa-muted: #4f5a6b;
  --pa-line: rgba(12, 24, 40, .14);
  --pa-line-strong: rgba(12, 24, 40, .28);
  --pa-error: #a3362b;
  --pa-display: var(--font-display, "Newsreader", Georgia, serif);
  --pa-body: var(--font-body, "Hanken Grotesk", "Segoe UI", system-ui, sans-serif);
  font-family: var(--pa-body);
  color: var(--pa-text);
  -webkit-font-smoothing: antialiased;
}
.posh-auth *, .posh-auth *::before, .posh-auth *::after { box-sizing: border-box; }

/* ── Split layout ───────────────────────────────────────────────────────────────── */
.posh-auth.pa-split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); min-height: calc(100vh - 64px); background: var(--pa-ivory); }
.posh-auth .pa-brand { position: relative; overflow: hidden; isolation: isolate; display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
  padding: clamp(32px, 5vw, 64px); color: #e9edf2;
  background: radial-gradient(70% 60% at 100% 0%, rgba(42, 139, 122, .35), transparent 65%),
              radial-gradient(60% 50% at 0% 100%, rgba(200, 168, 106, .18), transparent 70%), var(--pa-midnight); }
.posh-auth .pa-brand::after { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .45;
  background-image: linear-gradient(rgba(233, 237, 242, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(233, 237, 242, .05) 1px, transparent 1px);
  background-size: 56px 56px; -webkit-mask-image: radial-gradient(80% 70% at 40% 40%, #000 30%, transparent 80%); mask-image: radial-gradient(80% 70% at 40% 40%, #000 30%, transparent 80%); }
.posh-auth .pa-logo { display: inline-flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; }
.posh-auth .pa-logo svg { width: 44px; height: 44px; flex: none; }
.posh-auth .pa-logo b { display: block; font: 500 1.4rem/1 var(--pa-display); letter-spacing: -.01em; }
.posh-auth .pa-logo small { display: block; margin-top: 5px; font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: #a9b6c6; }
.posh-auth .pa-brand h1 { font: 400 clamp(2rem, 1.4rem + 2.2vw, 3rem)/1.08 var(--pa-display); letter-spacing: -.02em; color: #fff; margin: 0 0 16px; max-width: 13em; }
.posh-auth .pa-brand h1 em { font-style: italic; color: var(--pa-champagne-soft); }
.posh-auth .pa-brand p { margin: 0; color: #a9b6c6; font-size: 1.02rem; line-height: 1.6; max-width: 30em; }
.posh-auth .pa-points { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 12px; }
.posh-auth .pa-points li { display: flex; gap: 12px; align-items: flex-start; font-size: .95rem; color: #e9edf2; }
.posh-auth .pa-points svg { flex: none; width: 20px; height: 20px; margin-top: 2px; color: var(--pa-emerald-soft); }
.posh-auth .pa-brand-foot { font-size: .82rem; color: #a9b6c6; }

.posh-auth .pa-formside { display: flex; align-items: center; justify-content: center; padding: clamp(28px, 5vw, 64px) clamp(16px, 4vw, 48px); }
.posh-auth .pa-card { width: 100%; max-width: 520px; background: var(--pa-paper); border: 1px solid var(--pa-line); border-radius: 20px;
  padding: clamp(24px, 4vw, 44px); box-shadow: 0 1px 2px rgba(12, 24, 40, .05), 0 30px 60px -36px rgba(12, 24, 40, .45); }
.posh-auth .pa-card--wide { max-width: 640px; }
.posh-auth .pa-eyebrow { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 10px; font-size: .76rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--pa-emerald); }
.posh-auth .pa-eyebrow::before { content: ""; width: 24px; height: 1px; background: currentColor; opacity: .6; }
.posh-auth .pa-title { font: 400 clamp(1.7rem, 1.4rem + 1vw, 2.2rem)/1.1 var(--pa-display); letter-spacing: -.015em; color: var(--pa-midnight); margin: 0 0 8px; }
.posh-auth .pa-sub { margin: 0 0 24px; color: var(--pa-muted); font-size: .97rem; line-height: 1.55; }
.posh-auth .pa-sub a, .posh-auth .pa-link { color: var(--pa-emerald-deep); font-weight: 600; text-underline-offset: 3px; }

/* ── Fields ─────────────────────────────────────────────────────────────────────── */
.posh-auth .pa-form { display: grid; gap: 16px; }
.posh-auth .pa-grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr)); gap: 16px; }
.posh-auth .pa-field { display: grid; gap: 7px; }
.posh-auth .pa-label { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: .88rem; font-weight: 600; color: var(--pa-midnight); }
.posh-auth .pa-label .pa-req { color: var(--pa-error); margin-left: 2px; }
.posh-auth .pa-label a { font-weight: 500; font-size: .85rem; color: var(--pa-emerald-deep); }
.posh-auth .pa-input-wrap { position: relative; }
.posh-auth .pa-input { width: 100%; min-height: 50px; padding: 12px 16px; font: inherit; font-size: 1rem; color: var(--pa-text);
  background: #fff; border: 1px solid var(--pa-line-strong); border-radius: 12px; transition: border-color .2s, box-shadow .2s; }
.posh-auth .pa-input::placeholder { color: #7a8494; }
.posh-auth .pa-input:hover { border-color: rgba(12, 24, 40, .45); }
.posh-auth .pa-input:focus { outline: none; border-color: var(--pa-emerald); box-shadow: 0 0 0 4px rgba(29, 107, 95, .16); }
.posh-auth .pa-input[aria-invalid="true"] { border-color: var(--pa-error); }
.posh-auth .pa-input--pw { padding-right: 52px; }
.posh-auth .pa-hint { font-size: .82rem; color: var(--pa-muted); }
.posh-auth .pa-field-error { font-size: .84rem; color: var(--pa-error); }
.posh-auth .pa-field-error:empty { display: none; }
.posh-auth .pa-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; display: grid; place-items: center;
  border: 0; border-radius: 10px; background: transparent; color: var(--pa-muted); cursor: pointer; }
.posh-auth .pa-eye:hover { background: rgba(12, 24, 40, .06); color: var(--pa-midnight); }
.posh-auth .pa-eye svg { width: 20px; height: 20px; }
.posh-auth .pa-eye .ico-eyeoff, .posh-auth .pa-eye.is-visible .ico-eye { display: none; }
.posh-auth .pa-eye.is-visible .ico-eyeoff { display: block; }

.posh-auth .pa-check { display: flex; gap: 12px; align-items: flex-start; font-size: .92rem; color: var(--pa-text); line-height: 1.5; cursor: pointer; }
.posh-auth .pa-check input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--pa-emerald); cursor: pointer; }
.posh-auth .pa-check a { color: var(--pa-emerald-deep); font-weight: 600; }
.posh-auth .pa-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ── Buttons ────────────────────────────────────────────────────────────────────── */
.posh-auth .pa-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 52px; padding: 0 24px;
  border: 1px solid var(--pa-emerald); border-radius: 999px; background: var(--pa-emerald); color: #fff; font: 600 1rem/1 var(--pa-body);
  text-decoration: none; cursor: pointer; transition: background-color .2s, border-color .2s, transform .2s, box-shadow .2s; }
.posh-auth .pa-btn:hover:not(:disabled) { background: var(--pa-emerald-deep); border-color: var(--pa-emerald-deep); transform: translateY(-1px); box-shadow: 0 12px 24px -14px rgba(18, 72, 63, .8); }
.posh-auth .pa-btn:disabled, .posh-auth .pa-btn[aria-busy="true"] { opacity: .6; cursor: not-allowed; transform: none; box-shadow: none; }
.posh-auth .pa-btn svg { width: 18px; height: 18px; }
.posh-auth .pa-btn--ghost { background: transparent; color: var(--pa-midnight); border-color: var(--pa-line-strong); }
.posh-auth .pa-btn--ghost:hover:not(:disabled) { background: var(--pa-midnight); color: #fff; border-color: var(--pa-midnight); }
.posh-auth .pa-divider { display: flex; align-items: center; gap: 14px; color: var(--pa-muted); font-size: .86rem; margin: 6px 0; }
.posh-auth .pa-divider::before, .posh-auth .pa-divider::after { content: ""; flex: 1; height: 1px; background: var(--pa-line); }
.posh-auth .pa-foot { margin: 22px 0 0; text-align: center; font-size: .94rem; color: var(--pa-muted); }

/* ── Alerts ─────────────────────────────────────────────────────────────────────── */
.posh-auth .pa-alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; font-size: .93rem; line-height: 1.5; margin-bottom: 18px; }
.posh-auth .pa-alert svg { flex: none; width: 20px; height: 20px; margin-top: 1px; }
.posh-auth .pa-alert--error { background: #fbeeec; color: #7d271f; border: 1px solid #efc9c3; }
.posh-auth .pa-alert--ok { background: #e4f1ed; color: #0f4a40; border: 1px solid #b4d9cf; }
.posh-auth .pa-alert--info { background: #f6eedd; color: #5d4517; border: 1px solid #e3d2a8; }
.posh-auth .pa-alert b { display: block; }
.posh-auth .pa-alert-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.posh-auth .pa-alert-actions a { font-weight: 600; color: inherit; }
.posh-auth .pa-avail { font-size: .84rem; font-weight: 600; }
.posh-auth .pa-avail--ok { color: var(--pa-emerald-deep); }
.posh-auth .pa-avail--bad { color: var(--pa-error); }

/* ── Single-card pages (verify, forgot, set password) reuse the existing otp-* markup ── */
.posh-auth.otp-wrap { min-height: calc(100vh - 64px); display: flex; align-items: center; justify-content: center; padding: clamp(28px, 5vw, 64px) 16px;
  background: radial-gradient(55% 80% at 100% 0%, rgba(42, 139, 122, .12), transparent 60%), radial-gradient(40% 60% at 0% 100%, rgba(200, 168, 106, .14), transparent 65%), var(--pa-ivory); }
.posh-auth .otp-card { width: 100%; max-width: 460px; text-align: center; background: var(--pa-paper); border: 1px solid var(--pa-line); border-radius: 20px;
  padding: clamp(26px, 4vw, 44px); box-shadow: 0 1px 2px rgba(12, 24, 40, .05), 0 30px 60px -36px rgba(12, 24, 40, .45); }
.posh-auth .otp-card__icon { display: inline-grid; place-items: center; width: 56px; height: 56px; margin-bottom: 14px; border-radius: 16px; background: #e4f1ed; color: var(--pa-emerald); }
.posh-auth .otp-card__icon svg { width: 26px; height: 26px; }
.posh-auth .otp-card h1 { font: 400 clamp(1.6rem, 1.4rem + .8vw, 2rem)/1.15 var(--pa-display); color: var(--pa-midnight); margin: 0 0 10px; letter-spacing: -.015em; }
.posh-auth .otp-card__sub { color: var(--pa-muted); font-size: .97rem; line-height: 1.6; margin: 0 0 22px; }
.posh-auth .otp-card__sub strong { color: var(--pa-midnight); }
.posh-auth .otp-input { width: 100%; min-height: 50px; padding: 12px 16px; margin-bottom: 12px; font: inherit; font-size: 1rem; color: var(--pa-text);
  background: #fff; border: 1px solid var(--pa-line-strong); border-radius: 12px; outline: none; transition: border-color .2s, box-shadow .2s; }
.posh-auth .otp-input:focus, .posh-auth .otp-box:focus { border-color: var(--pa-emerald); box-shadow: 0 0 0 4px rgba(29, 107, 95, .16); }
.posh-auth .otp-boxes { display: flex; gap: 10px; justify-content: center; margin-bottom: 22px; }
.posh-auth .otp-box { width: 50px; height: 58px; text-align: center; font: 500 1.5rem/1 var(--pa-display); color: var(--pa-midnight);
  background: #fff; border: 1px solid var(--pa-line-strong); border-radius: 12px; outline: none; transition: border-color .2s, box-shadow .2s; }
.posh-auth .otp-btn { display: block; width: 100%; min-height: 52px; padding: 0 24px; border: 1px solid var(--pa-emerald); border-radius: 999px; background: var(--pa-emerald);
  color: #fff; font: 600 1rem/52px var(--pa-body); text-align: center; text-decoration: none; cursor: pointer; transition: background-color .2s, transform .2s; }
.posh-auth .otp-btn:hover:not(:disabled) { background: var(--pa-emerald-deep); transform: translateY(-1px); }
.posh-auth .otp-btn:disabled { opacity: .55; cursor: not-allowed; }
.posh-auth .otp-btn--link { line-height: 52px; }
.posh-auth .otp-hint { color: var(--pa-error); font-size: .84rem; text-align: left; margin: -4px 0 10px 2px; }
.posh-auth .otp-resend { margin-top: 16px; font-size: .9rem; color: var(--pa-muted); }
.posh-auth .otp-link { background: none; border: 0; padding: 4px; color: var(--pa-emerald-deep); font: 600 .9rem var(--pa-body); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.posh-auth .otp-link:disabled { opacity: .55; cursor: not-allowed; }
.posh-auth .otp-back { display: inline-flex; align-items: center; min-height: 44px; margin-top: 12px; font-size: .9rem; color: var(--pa-muted); text-decoration: none; }
.posh-auth .otp-back:hover { color: var(--pa-emerald-deep); text-decoration: underline; }
.posh-auth .otp-alert { border-radius: 12px; padding: 12px 14px; font-size: .92rem; margin-bottom: 16px; text-align: left; }
.posh-auth .otp-alert--err { background: #fbeeec; color: #7d271f; border: 1px solid #efc9c3; }
.posh-auth .otp-alert--ok { background: #e4f1ed; color: #0f4a40; border: 1px solid #b4d9cf; }

/* ── Focus, motion, responsive ──────────────────────────────────────────────────── */
.posh-auth a:focus-visible, .posh-auth button:focus-visible, .posh-auth input:focus-visible { outline: 2px solid var(--pa-emerald); outline-offset: 3px; }
.posh-auth .pa-brand a:focus-visible { outline-color: var(--pa-champagne); }
@media (max-width: 960px) {
  .posh-auth.pa-split { grid-template-columns: 1fr; min-height: 0; }
  .posh-auth .pa-brand { gap: 20px; padding: 28px 20px; }
  .posh-auth .pa-brand h1 { font-size: clamp(1.6rem, 1.3rem + 2vw, 2.2rem); }
  .posh-auth .pa-points, .posh-auth .pa-brand-foot { display: none; }
  .posh-auth .pa-formside { padding: 24px 16px 96px; }
}
@media (max-width: 400px) {
  .posh-auth .otp-boxes { gap: 6px; }
  .posh-auth .otp-box { width: 42px; height: 52px; font-size: 1.3rem; }
}
@media (prefers-reduced-motion: reduce) {
  .posh-auth *, .posh-auth *::before, .posh-auth *::after { transition: none !important; animation: none !important; }
}


/* Inside the site layout the header already shows the logo; the brand panel's own lockup would repeat it. */
.rioc-app .posh-auth .pa-brand .pa-logo { display: none; }
