/* ==========================================================================
   Blueleaf Sports Store - AUTHENTICATION SURFACES.
   Sign in, register, verify, forgot and reset share one frame: a dark brand
   column that carries the reason to hand over an email, and a light form
   column that carries the work. Below 1024px the brand column folds into a
   single band; below 768px the card loses its edges and becomes the page,
   which is how the app shell treats every other full screen task.

   Loaded after store.css and store-app.css. Every colour, radius and easing
   here is a token from store.css, and the controls are the same .field,
   .field-error, .panel and .btn primitives the checkout uses.
   ========================================================================== */

:root { --auth-bar-h: 58px; }

/* No tab bar on these pages, so the phone padding the app shell reserves for
   one would leave a dead strip under the footer. */
body.auth-body { background: var(--card-2); padding-bottom: 0; }
:root[data-theme="dark"] body.auth-body { background: var(--page); }

/* --- slim top bar: brand, help, theme. No search, no cart, no departments,
   because each of those is an exit out of a half finished form. ---------- */
.auth-topbar {
  position: sticky; top: 0; z-index: var(--z-header);
  background: var(--chrome); color: var(--chrome-ink);
}
.auth-topbar-row { display: flex; align-items: center; gap: 10px; height: var(--auth-bar-h); }
.auth-topbar-row .brand-lockup { margin-inline-start: -9px; }
.auth-topbar-tools { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.auth-help {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 12px; border-radius: var(--r-sm);
  border: 1px solid transparent;
  font-size: 12.5px; font-weight: 600; color: var(--chrome-ink-2);
  transition: border-color .2s var(--ease), color .2s var(--ease);
}
.auth-help:hover { border-color: rgba(233, 241, 239, .35); color: var(--chrome-ink); }
.auth-help i { font-size: 16px; }
.auth-help span { display: none; }
@media (min-width: 560px) { .auth-help span { display: inline; } }

/* --- the two column frame ---------------------------------------------- */
.auth-shell {
  display: grid;
  min-height: calc(100vh - var(--auth-bar-h));
  min-height: calc(100dvh - var(--auth-bar-h));
}
@media (min-width: 1024px) {
  .auth-shell { grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr); }
}
/* --- brand column ------------------------------------------------------ */
.auth-aside {
  display: none; position: relative; overflow: hidden;
  background: var(--chrome); color: var(--chrome-ink);
  padding: 40px 44px 34px;
}
@media (min-width: 1024px) { .auth-aside { display: block; } }

/* One soft accent bloom in the corner keeps the column from reading as a
   flat black rectangle without introducing a second colour. */
.auth-aside::before {
  content: ""; position: absolute; inset: -32% 18% 52% -26%;
  background: radial-gradient(closest-side, rgba(44, 190, 155, .22), transparent);
  pointer-events: none;
}
.auth-aside-inner {
  position: relative; z-index: 1;
  max-width: 520px; margin-inline: auto;
  display: grid; gap: 24px; align-content: center; min-height: 100%;
}
.auth-aside-lead { display: grid; gap: 11px; }
.auth-aside-lead .eyebrow { color: var(--accent-press); }
.auth-aside h2 {
  font-size: clamp(26px, 2.4vw, 33px); font-weight: 800;
  letter-spacing: -.04em; line-height: 1.14;
}
.auth-aside h2 em { font-style: normal; color: var(--accent-press); }
.auth-aside-copy { font-size: 13.5px; line-height: 1.65; color: var(--chrome-ink-2); }

.auth-figure {
  position: relative; border-radius: var(--r-lg); overflow: hidden;
  border: 1px solid rgba(233, 241, 239, .14);
}
.auth-figure img { width: 100%; height: 196px; object-fit: cover; }
.auth-figure figcaption {
  position: absolute; inset-inline: 12px; bottom: 12px;
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px; border-radius: var(--r-sm);
  background: rgba(13, 24, 23, .74); backdrop-filter: blur(6px);
  font-size: 12px; font-weight: 600;
}
.auth-figure figcaption i { color: var(--accent-press); font-size: 15px; flex: none; }
.auth-points { display: grid; gap: 13px; }
.auth-point { display: flex; gap: 12px; align-items: flex-start; }
.auth-point-mark {
  flex: none; width: 34px; height: 34px; border-radius: var(--r-sm);
  display: grid; place-items: center; font-size: 17px;
  background: rgba(44, 190, 155, .13); color: var(--accent-press);
  border: 1px solid rgba(44, 190, 155, .22);
}
.auth-point strong { display: block; font-size: 13.5px; font-weight: 700; }
.auth-point span { font-size: 12.5px; line-height: 1.55; color: var(--chrome-ink-2); }

.auth-quote {
  padding: 16px 18px; border-radius: var(--r);
  background: rgba(233, 241, 239, .06);
  border: 1px solid rgba(233, 241, 239, .12);
  display: grid; gap: 11px;
}
.auth-quote blockquote { font-size: 13.5px; line-height: 1.6; }
.auth-quote figcaption { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--chrome-ink-2); }
.auth-quote-avatar {
  width: 33px; height: 33px; border-radius: var(--r-pill); flex: none;
  display: grid; place-items: center; font-size: 12px; font-weight: 800;
  background: var(--accent); color: var(--accent-ink);
}
.auth-quote figcaption strong { display: block; color: var(--chrome-ink); font-size: 12.5px; }

.auth-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.auth-stat { padding: 12px 13px; border-radius: var(--r-sm); background: rgba(233, 241, 239, .05); }
.auth-stat b { display: block; font-size: 19px; font-weight: 800; letter-spacing: -.03em; }
.auth-stat span { font-size: 11px; color: var(--chrome-ink-2); }

/* --- form column ------------------------------------------------------- */
.auth-main { display: grid; align-content: center; justify-items: center; padding: 30px var(--gutter) 40px; }
.auth-main-inner { width: 100%; max-width: 452px; display: grid; gap: 15px; }

/* Under 1024px the brand column is gone, so one band carries the same
   promise in a line rather than dropping it altogether. */
.auth-mini {
  display: flex; align-items: center; gap: 11px;
  padding: 13px 15px; border-radius: var(--r);
  background: var(--chrome); color: var(--chrome-ink);
}
.auth-mini i { font-size: 22px; color: var(--accent-press); flex: none; }
.auth-mini strong { display: block; font-size: 13px; font-weight: 700; }
.auth-mini span { font-size: 12px; color: var(--chrome-ink-2); }
@media (min-width: 1024px) { .auth-mini { display: none; } }
/* --- the card ---------------------------------------------------------- */
.auth-card { padding: 26px; display: grid; gap: 17px; }
.auth-head { display: grid; gap: 7px; }
.auth-head h1 { font-size: 25px; font-weight: 800; letter-spacing: -.04em; line-height: 1.15; }
.auth-head p { font-size: 13px; color: var(--ink-3); line-height: 1.55; }
.auth-head p a, .auth-head p strong { font-weight: 700; color: var(--accent); }
.auth-head p a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Register and reset show where they are, on the same step nodes the
   checkout uses, so the two indicators never drift apart. */
.auth-steps { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* store.css styles the label, control and error of a .field but has no
   supporting line, and three of these forms need one. */
.field-hint { font-size: 11.5px; line-height: 1.5; color: var(--ink-4); }
.field-hint + .field-error:empty { min-height: 0; }

/* --- segmented switch: password or one time code ------------------------ */
.auth-tabs {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px; padding: 3px; border-radius: var(--r-pill); background: var(--card-3);
}
.auth-tab {
  height: 36px; border-radius: var(--r-pill);
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font-size: 12.5px; font-weight: 700; color: var(--ink-3);
  transition: background-color .22s var(--ease), color .22s var(--ease), box-shadow .22s var(--ease);
}
.auth-tab i { font-size: 15px; }
.auth-tab[aria-selected="true"] { background: var(--card); color: var(--ink); box-shadow: var(--shadow-1); }

.auth-form { display: grid; gap: 14px; }

/* --- password field: the reveal sits inside the control ---------------- */
.pw-wrap { position: relative; display: grid; }
.pw-wrap input { padding-inline-end: 46px; }
.pw-toggle {
  position: absolute; inset-inline-end: 4px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border-radius: var(--r-sm);
  display: grid; place-items: center; font-size: 18px; color: var(--ink-3);
  transition: color .2s var(--ease), background-color .2s var(--ease);
}
.pw-toggle:hover { background: var(--card-3); color: var(--ink); }
.pw-toggle .ph-eye-slash { display: none; }
.pw-toggle[aria-pressed="true"] .ph-eye-slash { display: block; }
.pw-toggle[aria-pressed="true"] .ph-eye { display: none; }

/* A phone prefix that is fixed at +91 belongs in the control, not in a
   select the shopper has to confirm on every visit. */
.tel-wrap { position: relative; display: grid; }
.tel-wrap input { padding-inline-start: 52px; }
.tel-prefix {
  position: absolute; inset-inline-start: 1px; top: 1px; bottom: 1px; width: 46px;
  display: grid; place-items: center; pointer-events: none;
  font-size: 13px; font-weight: 700; color: var(--ink-3);
  border-inline-end: 1px solid var(--line-soft);
}
/* --- strength meter ----------------------------------------------------- */
.pw-meter { display: grid; gap: 6px; }
.pw-bars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.pw-bars i { height: 4px; border-radius: var(--r-pill); background: var(--line); transition: background-color .3s var(--ease); }
.pw-meter[data-score="1"] { --score: var(--deal); }
.pw-meter[data-score="2"] { --score: var(--star); }
.pw-meter[data-score="3"] { --score: var(--accent); }
.pw-meter[data-score="4"] { --score: var(--stock); }
.pw-meter[data-score="1"] .pw-bars i:nth-child(-n+1),
.pw-meter[data-score="2"] .pw-bars i:nth-child(-n+2),
.pw-meter[data-score="3"] .pw-bars i:nth-child(-n+3),
.pw-meter[data-score="4"] .pw-bars i:nth-child(-n+4) { background: var(--score); }
.pw-note { font-size: 11.5px; font-weight: 600; color: var(--ink-3); }
.pw-note b { color: var(--ink-2); }

/* --- live requirement list --------------------------------------------- */
.pw-rules { display: grid; gap: 5px; margin-top: 1px; }
.pw-rules li { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-3); transition: color .2s var(--ease); }
.pw-rules li i { font-size: 14px; color: var(--ink-4); flex: none; }
.pw-rules li .ph-check-circle { display: none; }
.pw-rules li[data-ok="true"] { color: var(--ink-2); }
.pw-rules li[data-ok="true"] .ph-check-circle { display: block; color: var(--stock); }
.pw-rules li[data-ok="true"] .ph-circle { display: none; }

/* --- remember and forgot share a line ---------------------------------- */
.auth-inline { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.auth-link { font-size: 12.5px; font-weight: 700; color: var(--accent); }
.auth-link:hover { text-decoration: underline; text-underline-offset: 3px; }

.check { display: flex; align-items: flex-start; gap: 9px; cursor: pointer; font-size: 12.5px; color: var(--ink-2); line-height: 1.5; }
.check input { flex: none; width: 17px; height: 17px; margin: 1px 0 0; accent-color: var(--accent); }
.check a { font-weight: 700; color: var(--accent); }
.check a:hover { text-decoration: underline; text-underline-offset: 3px; }
.check.has-error, .has-error > .check { color: var(--deal); }
.check.has-error input, .has-error > .check input { outline: 2px solid var(--deal); outline-offset: 2px; }

/* --- or continue with --------------------------------------------------- */
.auth-sep { display: flex; align-items: center; gap: 12px; }
.auth-sep::before, .auth-sep::after { content: ""; height: 1px; flex: 1; background: var(--line-soft); }
.auth-sep span { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-4); }

.social-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.social-btn {
  height: 44px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--card);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 12.5px; font-weight: 700; color: var(--ink-2);
  transition: border-color .22s var(--ease), transform .3s var(--ease), color .22s var(--ease);
}
.social-btn:hover { border-color: var(--accent); color: var(--ink); }
.social-btn:active { transform: scale(.98); }
.social-btn i { font-size: 18px; }
.social-btn .is-google { color: #DB4437; }
.social-btn .is-facebook { color: #1877F2; }
.social-btn .is-whatsapp { color: #25D366; }
.social-btn span { display: none; }
@media (min-width: 430px) { .social-btn span { display: inline; } }
/* --- inline banners ----------------------------------------------------- */
.auth-alert {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; border-radius: var(--r-sm);
  font-size: 12.5px; line-height: 1.55;
  border: 1px solid var(--line); background: var(--card-2); color: var(--ink-2);
}
.auth-alert i { font-size: 17px; flex: none; margin-top: 1px; }
.auth-alert strong { display: block; color: var(--ink); font-size: 13px; }
.auth-alert.is-info { border-color: rgba(11, 139, 112, .28); background: var(--accent-soft); }
.auth-alert.is-info i { color: var(--accent); }
.auth-alert.is-bad { border-color: rgba(176, 50, 32, .32); background: rgba(176, 50, 32, .07); }
.auth-alert.is-bad i { color: var(--deal); }
.auth-alert.is-good { border-color: rgba(27, 122, 61, .32); background: rgba(27, 122, 61, .07); }
.auth-alert.is-good i { color: var(--stock); }
.auth-alert .btn-quiet { font-size: 12.5px; font-weight: 700; }

.masked { font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }

/* --- one time code ----------------------------------------------------- */
.otp-wrap { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.otp-box {
  height: 54px; text-align: center; padding: 0;
  font-size: 21px; font-weight: 800; font-variant-numeric: tabular-nums;
  border-radius: var(--r-sm); border: 1px solid var(--line);
  background: var(--card); color: var(--ink);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.otp-box:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.otp-box[data-filled="true"] { border-color: var(--accent); }
.otp-field.has-error .otp-box { border-color: var(--deal); }
.otp-field.has-error .otp-wrap { animation: otp-shake .34s var(--ease-swap); }
@keyframes otp-shake {
  20% { transform: translate3d(-5px, 0, 0); }
  50% { transform: translate3d(4px, 0, 0); }
  80% { transform: translate3d(-2px, 0, 0); }
}
.otp-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-3); }
.otp-foot b { color: var(--ink); font-variant-numeric: tabular-nums; }

/* --- the finished state ------------------------------------------------- */
.auth-done { display: grid; gap: 13px; justify-items: center; text-align: center; padding-block: 6px; }
.auth-done-mark {
  width: 62px; height: 62px; border-radius: var(--r-pill);
  display: grid; place-items: center; font-size: 32px;
  background: var(--accent-soft); color: var(--accent);
}
.auth-done h2 { font-size: 21px; font-weight: 800; letter-spacing: -.035em; }
.auth-done p { font-size: 13px; color: var(--ink-3); line-height: 1.6; max-width: 36ch; }
.auth-done .btn { margin-top: 4px; }
/* --- card foot: the other door ------------------------------------------ */
.auth-alt {
  padding: 13px 15px; border-radius: var(--r-sm);
  background: var(--card-2); border: 1px dashed var(--line);
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2);
}
.auth-fine { font-size: 11.5px; line-height: 1.6; color: var(--ink-4); }
.auth-fine a { color: var(--ink-3); text-decoration: underline; text-underline-offset: 2px; }
.auth-fine a:hover { color: var(--accent); }

/* --- reassurance row under the card ------------------------------------ */
.auth-trust { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.auth-trust div {
  display: grid; gap: 4px; justify-items: center; text-align: center;
  padding: 11px 8px; border-radius: var(--r-sm);
  background: var(--card); border: 1px solid var(--line-soft);
}
.auth-trust i { font-size: 18px; color: var(--accent); }
.auth-trust span { font-size: 11px; font-weight: 600; color: var(--ink-3); line-height: 1.35; }

/* --- legal strip -------------------------------------------------------- */
.auth-footer { border-top: 1px solid var(--line-soft); background: var(--card); }
.auth-footer-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap; padding-block: 16px;
}
.auth-footer p { font-size: 11.5px; color: var(--ink-4); }
.auth-footer-links { display: flex; gap: 15px; flex-wrap: wrap; }
.auth-footer-links a { font-size: 11.5px; color: var(--ink-3); }
.auth-footer-links a:hover { color: var(--accent); }

/* --- phones: the card carries the page --------------------------------- */
@media (max-width: 767px) {
  .auth-main { padding: 14px var(--gutter) 26px; align-content: start; }
  .auth-card { padding: 18px 16px; }
  .auth-head h1 { font-size: 22px; }
  .otp-wrap { gap: 6px; }
  .otp-box { height: 48px; font-size: 18px; }
}
@media (max-width: 380px) {
  .auth-card { padding: 16px 13px; }
  .auth-trust { grid-template-columns: minmax(0, 1fr); }
  .auth-trust div { grid-auto-flow: column; grid-template-columns: auto minmax(0, 1fr); align-items: center; justify-items: start; text-align: left; gap: 9px; }
  .otp-box { height: 44px; font-size: 16px; }
}
/* --- busy button: the stand in for a round trip ------------------------- */
.btn[data-busy="true"] { pointer-events: none; opacity: .82; }
.auth-spin { display: inline-block; animation: auth-spin .8s linear infinite; }
@keyframes auth-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .otp-field.has-error .otp-wrap { animation: none; }
  .auth-spin { animation-duration: 2.4s; }
  .pw-bars i, .auth-tab, .social-btn, .pw-toggle { transition-duration: .001ms !important; }
}

