/* StaqOn - auth redesign v2 (login.php + register.php). Page-scoped: loaded ONLY by those two pages, after auth.css.
   Visual source: the approved unified mockup (dark brand panel + white card with Sign in / Create account tabs).
   Does not touch auth.css, so join*.php / lead-form.php / super-admin login keep their current look. */
:root{--so-green:#1f7a55;--so-green-d:#186646;--so-ink:#111412;--so-text:#17201b;--so-muted:#56615a;--so-line:#e3e6e2;--so-input-b:#878f8a}
.so-body{margin:0;background:#f3f4f2;color:var(--so-text);font-family:'Nunito Sans','Segoe UI',system-ui,-apple-system,BlinkMacSystemFont,sans-serif;font-size:14px}
.so-shell{min-height:100vh;display:grid;grid-template-columns:1.15fr 1fr}

/* ---------- left: dark brand panel ---------- */
.so-left{min-width:0;box-sizing:border-box;background-color:#0e110f;background-image:radial-gradient(ellipse 60% 42% at 50% 50%,rgba(63,174,127,.16),rgba(63,174,127,0) 70%);color:#e8ede9;padding:clamp(24px,4.5vw,56px);display:flex;flex-direction:column;justify-content:center}
.so-left-inner{width:100%;max-width:600px;margin:0 auto;display:flex;flex-direction:column;align-items:center}
.so-stage{position:relative;width:100%;aspect-ratio:600/320;container-type:inline-size}
.so-lines{position:absolute;left:0;top:0;width:100%;height:100%;overflow:visible}
.so-chipwrap{position:absolute;transform:translate(-50%,-50%)}
.so-chip{display:flex;align-items:center;gap:.62em;height:2.92em;box-sizing:border-box;padding:0 1.08em 0 .54em;background:#171c19;border:1px solid #2f3832;border-radius:999px;box-shadow:0 6px 18px rgba(0,0,0,.45);font-size:clamp(9.5px,2.17cqw,13px);line-height:1.38;font-weight:700;white-space:nowrap;color:#e8ede9;animation:so-float 6s ease-in-out infinite;transition:border-color .15s ease}
.so-chip:hover{border-color:#3fae7f}
.so-chip-ico{flex:none;width:1.85em;height:1.85em;border-radius:999px;display:flex;align-items:center;justify-content:center}
.so-chip-ico svg{width:1.08em;height:1.08em}
.so-hub{position:relative;padding:12px;border-radius:20px;background:#171c19;border:1px solid #3fae7f;box-shadow:0 0 0 6px rgba(63,174,127,.08),0 0 36px rgba(63,174,127,.18);animation:so-breathe 4s ease-in-out infinite}
.so-hub-logo{display:flex;align-items:stretch;border:2px solid #e8ede9;border-radius:10px;overflow:hidden;font-size:26px;line-height:32px;font-weight:800}
.so-hub-staq{padding:6px 10px 6px 14px;color:#e8ede9}
.so-hub-on{padding:6px 14px 6px 10px;background:#e8ede9;color:#111412}
.so-hero{display:flex;flex-direction:column;align-items:center}
.so-hero-title{margin:36px 0 0;font-size:clamp(34px,3.8vw,52px);line-height:1.06;font-weight:800;letter-spacing:-.02em;text-align:center;color:#e8ede9}
.so-hero-title span{color:#7bd6ab}
.so-hero-sub{margin:14px 0 0;max-width:440px;font-size:17px;line-height:26px;color:#a6b1aa;text-align:center}
.so-pills{margin-top:28px;display:flex;flex-wrap:wrap;justify-content:center;gap:10px}
.so-pill{display:inline-flex;align-items:center;gap:8px;height:34px;padding:0 14px;border-radius:999px;background:rgba(63,174,127,.12);color:#7bd6ab;font-size:13px;line-height:18px;font-weight:700}
.so-pill svg{width:14px;height:14px}
.so-pulse{animation:so-flow 4s linear infinite;filter:drop-shadow(0 0 4px #3fae7f)}
@keyframes so-flow{from{stroke-dashoffset:100}to{stroke-dashoffset:0}}
@keyframes so-breathe{0%,100%{box-shadow:0 0 0 6px rgba(63,174,127,.08),0 0 36px rgba(63,174,127,.18)}50%{box-shadow:0 0 0 9px rgba(63,174,127,.12),0 0 60px rgba(63,174,127,.32)}}
@keyframes so-float{0%,100%{transform:translateY(-3px)}50%{transform:translateY(3px)}}
@media (prefers-reduced-motion:reduce){.so-pulse,.so-hub,.so-chip{animation:none}}

/* ---------- right: card ---------- */
.so-right{min-width:0;box-sizing:border-box;padding:clamp(28px,5vw,56px) clamp(16px,4vw,48px);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:24px}
.so-card{width:100%;max-width:420px;box-sizing:border-box;background:#fff;border:1px solid var(--so-line);border-radius:20px;box-shadow:0 1px 2px rgba(17,20,18,.05),0 16px 40px rgba(17,20,18,.09);padding:clamp(24px,4vw,40px);display:flex;flex-direction:column}
.so-logo{align-self:flex-start;display:inline-flex;align-items:stretch;border:2px solid var(--so-ink);border-radius:8px;overflow:hidden;font-size:15px;line-height:20px;font-weight:800;margin-bottom:20px;text-decoration:none}
.so-logo .a{padding:3px 6px 3px 9px;background:var(--so-ink);color:#fff}
.so-logo .b{padding:3px 9px 3px 6px;background:#fff;color:var(--so-ink)}
.so-tabs{display:flex;gap:4px;background:#f0f1ee;border-radius:12px;padding:4px;margin-bottom:24px}
.so-tab{flex:1;display:block;text-align:center;padding:10px 0;border-radius:9px;font-size:14px;font-weight:700;color:var(--so-muted);text-decoration:none;transition:background .15s ease,color .15s ease}
.so-tab:hover{color:var(--so-ink);text-decoration:none}
.so-tab[aria-current="page"]{background:#fff;color:#111412;box-shadow:0 1px 2px rgba(17,20,18,.08)}
.so-tab:focus-visible{outline:2px solid var(--so-green);outline-offset:2px}

/* step typography (auth.js toggles .auth-step.active; auth.css already shows/hides) */
.so-card .auth-step h1,.so-card .auth-step h2.step-h{margin:0;font-size:26px;line-height:32px;font-weight:800;letter-spacing:-.02em;text-align:left;color:var(--so-text)}
.so-card .auth-step .sub{margin:8px 0 22px;font-size:15px;line-height:22px;color:var(--so-muted);text-align:left}
.so-card .tw-word,.so-card .tw-caret{color:var(--so-green)}

/* fields */
.so-field{margin-top:2px}
.so-field+.so-field{margin-top:16px}
.so-field>label{display:block;font-size:13px;line-height:18px;font-weight:700;color:var(--so-text)}
.so-inputwrap{position:relative;margin-top:8px}
.so-inputwrap>svg{position:absolute;left:14px;top:17px;width:18px;height:18px;pointer-events:none}
.so-body .so-card .so-input{width:100%;height:52px;box-sizing:border-box;padding:0 14px 0 42px;font:inherit;font-size:16px;color:var(--so-text);background:#fff;border:1px solid var(--so-input-b);border-radius:12px;box-shadow:none}
.so-body .so-card .so-input:focus{outline:2px solid var(--so-green);outline-offset:2px;border-color:var(--so-input-b)}
.so-body .so-card .so-input::placeholder{color:#8b948e}

/* primary button */
.so-body .so-card .btn-primary{width:100%;margin-top:14px;height:52px;border:0;border-radius:12px;background:var(--so-green);color:#fff;font:inherit;font-size:16px;font-weight:700;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:8px;box-shadow:0 6px 16px rgba(31,122,85,.28)}
.so-body .so-card .btn-primary:hover{background:var(--so-green-d)}
.so-body .so-card .btn-primary:focus-visible{outline:2px solid var(--so-green);outline-offset:2px}
.so-body .so-card .btn-primary svg{width:16px;height:16px;flex:none}
.so-body .so-card .btn-primary:disabled{opacity:.7;cursor:default}

/* "or" divider + OAuth row */
.so-card .g-or{margin:22px 0;gap:12px;font-size:12px;line-height:16px;font-weight:600;color:var(--so-muted)}
.so-card .g-or::before,.so-card .g-or::after{background:var(--so-line)}
.so-oauth{display:flex;flex-wrap:wrap;gap:10px}
.so-body .so-card .g-btn,.so-body .so-card .a-btn{flex:1 1 150px;width:auto;min-height:48px;height:48px;margin-top:0;border-radius:12px;font-size:15px;font-weight:700;text-decoration:none}
.so-body .so-card .g-btn{background:#fff;border:1px solid var(--so-input-b);color:var(--so-text)}
.so-body .so-card .g-btn:hover{background:#eef1ee;box-shadow:none}
.so-body .so-card .a-btn{background:var(--so-ink);border:0;color:#f2f4f3}
.so-body .so-card .a-btn:hover{background:#232a26;box-shadow:none}

/* MPIN / OTP boxes (auth.js builds .otp-box inside [data-otp]/[data-mpin]/[data-setmpin*]) */
.so-card .otp-inputs{justify-content:flex-start}
.so-card .otp-box{height:52px;border:1px solid var(--so-input-b);border-radius:12px;color:var(--so-text)}
.so-card .otp-box:focus{outline:none;border-color:var(--so-green);box-shadow:0 0 0 3px rgba(31,122,85,.18)}
.so-card .otp-inputs.shake .otp-box{border-color:var(--danger)}
.so-card .mpin-label{font-size:13px;font-weight:700;color:var(--so-text)}
.so-card .auth-foot{text-align:center;color:var(--so-muted)}
.so-card .auth-foot a,.so-card .resend-row a{color:#17603f;font-weight:700}
.so-card .auth-step>.btn-primary{margin-top:6px}

/* "Get the app" row under the card */
.so-app{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:0 16px;font-size:13px;line-height:18px;color:var(--so-muted)}
.so-app a{font-weight:700;padding:13px 0;color:#17603f;text-decoration:none}
.so-app a:hover{color:#186646;text-decoration:underline}

/* ---------- phones/tablets: dark panel collapses to a slim wordmark bar (same breakpoint as the old panel) ---------- */
@media (max-width:768px){
  .so-shell{grid-template-columns:1fr;grid-template-rows:auto 1fr}
  .so-left{padding:14px 20px;flex-direction:row;justify-content:center;background-image:none;border-bottom:1px solid #1d2420}
  .so-left-inner{flex-direction:row;justify-content:center;max-width:none}
  .so-stage,.so-hero,.so-pills{display:none}
  .so-hub{padding:6px;border-radius:12px;animation:none;box-shadow:0 0 0 3px rgba(63,174,127,.10),0 0 18px rgba(63,174,127,.20)}
  .so-hub-logo{font-size:18px;line-height:22px;border-radius:7px;border-width:2px}
  .so-hub-staq{padding:3px 7px 3px 10px}.so-hub-on{padding:3px 10px 3px 7px}
  .so-right{padding:24px 16px 32px;justify-content:flex-start}
  .so-logo{display:none}      /* the slim bar already carries the wordmark */
  .so-card{padding:22px 20px;border-radius:16px}
  .so-card .otp-inputs{justify-content:center}
  .so-card .otp-box{flex:1 1 0;min-width:0;width:auto;max-width:52px;height:56px;font-size:22px}
  .so-card .auth-foot a{display:inline-block;min-height:44px;line-height:44px}
}
@media (max-width:380px){.so-card .otp-box{height:54px;font-size:20px}}

/* ---------- unified entry: full_name collapses until check_email says "new email" (kept in DOM) ---------- */
.so-newuser{display:grid;grid-template-rows:0fr;opacity:0;visibility:hidden;margin-top:0;transition:grid-template-rows .28s ease,opacity .22s ease,margin-top .28s ease,visibility 0s linear .28s}
.so-newuser-in{overflow:hidden;min-height:0;padding:4px;margin:-4px}
.so-newuser.is-open{grid-template-rows:1fr;opacity:1;visibility:visible;margin-top:16px;transition:grid-template-rows .28s ease,opacity .22s ease .06s,margin-top .28s ease,visibility 0s}
.so-newuser .so-field{margin-top:0}
@media (prefers-reduced-motion:reduce){.so-newuser,.so-newuser.is-open{transition:none}}
