/* ═══════════════════════════════════════════
   BUVA – Auth Pages (login, register)
   ═══════════════════════════════════════════ */

@import "./tokens.css";

*, *::before, *::after { box-sizing: border-box; }

/* Universal scrollbar — consistent with the app shell (member-layout.css). */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) transparent;
}
::-webkit-scrollbar { width: var(--scrollbar-size); height: var(--scrollbar-size); }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: var(--scrollbar-thumb-hover); background-clip: padding-box; }
::-webkit-scrollbar-corner { background: transparent; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--ff-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--clr-ink);
  background: linear-gradient(160deg, var(--clr-bg) 0%, var(--clr-bg-alt) 100%);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

/* ── Centering wrapper (register page) ─────── */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(24px, 6vw, 64px) 20px;
}

/* ── Card (register page) ───────────────────── */
.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--clr-bg);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: clamp(32px, 5vw, 48px);
  display: flex;
  flex-direction: column;
}

/* ── Brand row (register page) ─────────────── */
.auth-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}
.auth-logo {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--clr-border-strong);
  flex-shrink: 0;
  background: var(--clr-bg-alt);
}
.auth-brand-name {
  font-family: var(--ff-display);
  font-size: 22px;
  font-weight: 800;
  color: var(--clr-primary);
  letter-spacing: -.02em;
  line-height: 1.1;
}
.auth-brand-sub {
  font-size: 11px;
  font-weight: 500;
  color: var(--clr-muted);
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* ── Headings (register page) ──────────────── */
.auth-heading {
  font-family: var(--ff-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--clr-ink);
  margin: 0 0 6px;
}
.auth-subheading {
  font-size: 14px;
  color: var(--clr-muted);
  margin: 0 0 20px;
  line-height: 1.6;
}

/* ── Form (register page) ───────────────────── */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── Register success panel ─────────────────── */
.register-success-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  padding: 16px 0 8px;
}
.register-success-icon { line-height: 0; }
.register-success-heading {
  font-family: var(--ff-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--clr-ink);
  margin: 0;
}
.register-success-body {
  font-size: 14px;
  color: var(--clr-muted);
  line-height: 1.65;
  max-width: 340px;
  margin: 0;
}
.register-success-panel .btn {
  margin-top: 8px;
  height: 46px;
  padding: 0 22px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  white-space: nowrap;
  background: linear-gradient(135deg, var(--clr-primary-dark) 0%, var(--clr-primary) 55%, var(--clr-primary-hover) 100%);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 3px 12px rgba(124,18,15,.35);
}
.register-success-panel .btn:hover { opacity: .92; transform: translateY(-1px); }

/* ── Auth error ──────────────────────────────── */
.auth-error {
  background: rgba(153, 27, 27, .07);
  border: 1px solid rgba(153, 27, 27, .25);
  color: #991b1b;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 14px;
  line-height: 1.5;
  margin: 4px 0 0;
}

/* ── Auth success panel ──────────────────────── */
.auth-success {
  text-align: center;
  padding: 8px 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.success-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(22, 163, 74, .1);
  color: #16a34a;
  font-size: 28px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-success h2 {
  font-family: var(--ff-display);
  font-size: 20px;
  font-weight: 700;
  margin: 0;
  color: var(--clr-ink);
}
.auth-success p {
  font-size: 14px;
  color: var(--clr-muted);
  line-height: 1.65;
  margin: 0;
  max-width: 30ch;
}

/* ── Footer link (register page) ────────────── */
.auth-footer-link {
  font-size: 14px;
  color: var(--clr-muted);
  text-align: center;
  margin: 20px 0 0;
}
.auth-footer-link a {
  color: var(--clr-primary);
  font-weight: 600;
  text-decoration: none;
}
.auth-footer-link a:hover { text-decoration: underline; }

/* ── Shared button (register page) ──────────── */
.btn-auth-primary {
  width: 100%;
  padding: 13px 20px;
  background: var(--clr-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--ff-body);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background .18s, box-shadow .18s, transform .18s;
  box-shadow: 0 2px 8px rgba(124, 18, 15, .2);
  margin-top: 4px;
}
.btn-auth-primary:hover {
  background: var(--clr-primary-hover);
  box-shadow: 0 4px 14px rgba(124, 18, 15, .3);
  transform: translateY(-1px);
}
.btn-auth-primary:disabled {
  opacity: .65;
  cursor: not-allowed;
  transform: none;
}
.btn-auth-secondary {
  display: inline-block;
  width: 100%;
  padding: 12px 20px;
  background: transparent;
  color: var(--clr-primary);
  border: 1.5px solid var(--clr-primary);
  border-radius: var(--radius-sm);
  font-family: var(--ff-body);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: background .18s, color .18s;
  margin-top: 8px;
}
.btn-auth-secondary:hover {
  background: var(--clr-primary);
  color: #fff;
}

/* ═══════════════════════════════════════════════
   SPLIT-PANEL LOGIN  —  Premium layout
   ═══════════════════════════════════════════════ */

/* ── Animations ──────────────────────────────── */
@keyframes cardFadeIn {
  from { opacity: 0; transform: translateY(24px) scale(.987); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}
@keyframes slideDownFade {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes brandContentIn {
  from { opacity: 0; transform: translateX(-10px); }
  to   { opacity: 1; transform: translateX(0); }
}
/* Header eases down from the top (pairs with the landing nav feel) */
@keyframes headerDropIn {
  from { opacity: 0; transform: translateY(-14px); }
  to   { opacity: 1; transform: translateY(0); }
}
/* Footer fades up gently after the card */
@keyframes footerFadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
/* Staggered rise used for each block inside the form panel */
@keyframes formRiseIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Page background ─────────────────────────── */
.auth-split-body {
  background:
    radial-gradient(ellipse 80% 70% at 60% 110%, rgba(124,18,15,.07) 0%, transparent 65%),
    radial-gradient(ellipse 40% 50% at 5% 50%, rgba(124,18,15,.04) 0%, transparent 55%),
    linear-gradient(170deg, #fefefe 0%, #f4f3f1 100%);
}

.auth-split-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(20px, 4vw, 44px) clamp(16px, 4vw, 40px);
}

/* Body becomes a column: header · card · footer */
.auth-split-body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Page header (login + register) ──────────────
   Tuned to match the landing navbar (.lp-nav) so the brand and the pill
   button look identical as the user moves between the two — same logo size,
   same brand type, same pill radius/weight. */
.auth-page-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px clamp(16px, 4vw, 32px);
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  animation: headerDropIn .5s cubic-bezier(.16,1,.3,1) both;
}
.auth-page-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.auth-page-logo {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--clr-border-strong);
  background: var(--clr-bg);
  box-shadow: var(--shadow-sm);
  transition: transform .25s cubic-bezier(.34,1.56,.64,1);
}
.auth-page-brand:hover .auth-page-logo { transform: scale(1.06) rotate(-3deg); }
.auth-page-brand-text {
  font-family: var(--ff-display);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: .03em;
  color: var(--clr-primary-dark);
}
/* Back-to-home / back-to-sign-in pill — mirrors .lp-btn proportions */
.auth-back-home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--clr-bg);
  border: 1px solid var(--clr-border-strong);
  border-radius: 11px;
  font-family: var(--ff-body);
  font-size: .9rem;
  font-weight: 600;
  line-height: 1;
  color: var(--clr-ink-2);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: border-color .2s, color .2s, transform .18s, box-shadow .2s, background .2s;
}
.auth-back-home svg { transition: transform .2s; }
.auth-back-home:hover {
  border-color: var(--clr-primary);
  color: var(--clr-primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.auth-back-home:hover svg { transform: translateX(-3px); }
.auth-back-home:active { transform: translateY(0); }
.auth-back-home:focus-visible {
  outline: 3px solid rgba(124,18,15,.4);
  outline-offset: 2px;
}

/* ── Page footer (auth pages) ─────────────────────────────────
   Uses the SAME canonical footer markup as the admin/member app
   (.app-footer / .footer-brand / .footer-copy / .footer-note) so the
   footer is identical product-wide. These rules only add the auth-page
   wrapper context: a transparent, centered, full-bleed bar with the
   page's fade-in. The inner layout is the canonical one defined below. */
.auth-page-footer {
  position: relative;
  z-index: 2;
  margin-top: auto;
  width: 100%;
  background: transparent;
  border-top: 1px solid var(--clr-border);
  animation: footerFadeUp .5s .35s cubic-bezier(.16,1,.3,1) both;
}

/* Canonical footer styles (mirror of member-layout.css so auth pages,
   which don't load member-layout.css, get the identical bar). */
.app-footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 18px clamp(16px, 4vw, 32px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  flex-wrap: wrap;
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--ff-display);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: -.01em;
  color: var(--clr-primary);
  text-decoration: none;
  flex-shrink: 0;
  transition: opacity .15s;
}
.footer-brand:hover { opacity: .82; }
.footer-brand img {
  width: 24px; height: 24px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--clr-border);
  box-shadow: var(--shadow-sm);
}
.footer-copy {
  margin: 0;
  font-size: 12.5px;
  color: var(--clr-muted);
  text-align: center;
  flex: 1 1 auto;
}
.footer-note {
  margin: 0;
  font-size: 12.5px;
  color: var(--clr-subtle);
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}

@media (max-width: 720px) {
  .app-footer-inner {
    flex-direction: column;
    justify-content: center;
    text-align: center;
    gap: 8px;
    padding: 18px 16px;
  }
  .footer-copy { order: 3; }
  .footer-note { order: 2; white-space: normal; }
  .footer-brand { order: 1; }
}

.auth-split-card {
  width: min(1000px, 100%);
  border: 1px solid rgba(0,0,0,.08);
  border-radius: var(--radius-lg);
  box-shadow:
    0 24px 64px rgba(0,0,0,.13),
    0 8px 24px rgba(0,0,0,.07),
    0 0 0 1px rgba(255,255,255,.6) inset;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  animation: cardFadeIn .5s cubic-bezier(.16,1,.3,1) both;
}

/* ── Left: brand panel ───────────────────────── */
.auth-split-brand {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(44px, 5.5vw, 68px) clamp(36px, 4.5vw, 56px);
  background: linear-gradient(155deg, var(--clr-primary-dark) 0%, var(--clr-primary) 50%, #c0412c 88%, #a83520 100%);
  color: #fff;
  min-height: 580px;
  animation: brandContentIn .6s .1s cubic-bezier(.16,1,.3,1) both;
}

/* Mesh grid overlay */
.split-brand-deco {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.038) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.038) 1px, transparent 1px);
  background-size: 26px 26px;
  pointer-events: none;
  z-index: 0;
}

/* Large floating circles */
.auth-split-brand::before,
.auth-split-brand::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}
.auth-split-brand::before {
  width: 380px;
  height: 380px;
  bottom: -140px;
  right: -130px;
  background: radial-gradient(circle, rgba(255,255,255,.06) 0%, transparent 70%);
  border: 1px solid rgba(255,255,255,.06);
}
.auth-split-brand::after {
  width: 180px;
  height: 180px;
  top: -60px;
  right: 20px;
  background: radial-gradient(circle, rgba(255,255,255,.05) 0%, transparent 70%);
  border: 1px solid rgba(255,255,255,.05);
}

/* All direct children sit above the deco layer */
.auth-split-brand > * { position: relative; z-index: 1; }

.split-brand-logo-wrap {
  position: relative;
  width: 72px;
  height: 72px;
  margin-bottom: 20px;
  flex-shrink: 0;
}
.split-brand-logo-wrap::before {
  content: '';
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.22);
}
.split-brand-logo-wrap::after {
  content: '';
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.09);
}
.split-brand-logo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,.45);
  background: rgba(255,255,255,.1);
  display: block;
}

.split-brand-name {
  font-family: var(--ff-display);
  font-size: 38px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.04em;
  line-height: 1;
  margin-bottom: 6px;
  text-shadow: 0 2px 12px rgba(0,0,0,.18);
}

.split-brand-tag {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.58);
  margin-bottom: 28px;
}

.split-brand-divider {
  width: 36px;
  height: 2px;
  border-radius: 2px;
  background: rgba(255,255,255,.32);
  margin-bottom: 22px;
}

.split-brand-points {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.split-brand-points li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,.85);
  line-height: 1.5;
}
.split-brand-points li svg {
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  color: rgba(255,255,255,.6);
  margin-top: 2px;
}

/* ── Stats strip ─────────────────────────────── */
.split-brand-stats {
  width: 100%;
  display: flex;
  align-items: center;
  margin-top: 28px;
  padding: 13px 16px;
  background: rgba(255,255,255,.09);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 12px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.split-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.split-stat-num {
  font-family: var(--ff-display);
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  letter-spacing: -.02em;
}
.split-stat-label {
  font-size: 9.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(255,255,255,.48);
}
.split-stat-sep {
  width: 1px;
  height: 28px;
  background: rgba(255,255,255,.16);
  flex-shrink: 0;
  margin: 0 4px;
}

.split-brand-badge {
  display: inline-flex;
  align-items: center;
  margin-top: 20px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(255,255,255,.42);
  padding: 5px 12px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 100px;
}

/* ── Right: form panel ───────────────────────── */
.auth-split-form {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(44px, 5.5vw, 68px) clamp(36px, 4.5vw, 60px);
  background: var(--clr-bg);
  min-height: 580px;
}

.auth-split-form-inner {
  width: 100%;
  max-width: 380px;
  transition: opacity .15s ease, transform .15s ease;
}
.auth-split-form-inner.is-switching {
  opacity: 0;
  transform: translateY(6px);
}

/* ── Staggered entrance for the form column ──────
   Each top-level block (tab switch / heading / form / link) rises in turn so
   the panel assembles itself, matching the landing page's reveal cadence.
   The selectors cover both layouts: login (blocks directly in the inner) and
   register/forgot/reset (blocks inside #formSection). */
.auth-split-form-inner > .role-switch,
.auth-split-form-inner > .split-form-header,
.auth-split-form-inner > form,
.auth-split-form-inner > .split-register-link,
#formSection > .auth-form-pill,
#formSection > .split-form-header,
#formSection > form,
#formSection > .split-register-link {
  animation: formRiseIn .55s cubic-bezier(.16,1,.3,1) both;
}
.auth-split-form-inner > .role-switch,
#formSection > .auth-form-pill            { animation-delay: .12s; }
.auth-split-form-inner > .split-form-header,
#formSection > .split-form-header         { animation-delay: .20s; }
.auth-split-form-inner > form,
#formSection > form                       { animation-delay: .28s; }
.auth-split-form-inner > .split-register-link,
#formSection > .split-register-link       { animation-delay: .36s; }

/* Don't replay the stagger while toggling Member/Admin on the login page —
   that swap has its own .is-switching transition. */
.auth-split-form-inner.is-switching > * { animation: none; }

/* ── Role switch (sliding pill) ──────────────── */
.role-switch {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  background: var(--clr-bg-section);
  border: 1px solid var(--clr-border);
  border-radius: 12px;
  padding: 5px;
  margin-bottom: 28px;
  isolation: isolate;
}

/* The moving highlight */
.role-switch-thumb {
  position: absolute;
  top: 5px;
  left: 5px;
  width: calc(50% - 5px);
  height: calc(100% - 10px);
  border-radius: 9px;
  background: var(--clr-bg);
  box-shadow: 0 2px 8px rgba(124,18,15,.16), 0 1px 2px rgba(0,0,0,.06);
  border: 1px solid rgba(124,18,15,.16);
  z-index: -1;
  transition: transform .28s cubic-bezier(.4,0,.2,1);
}
.role-switch[data-active="admin"] .role-switch-thumb {
  transform: translateX(calc(100% + 0px));
}

.role-switch-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 12px;
  border: none;
  border-radius: 9px;
  font-family: var(--ff-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  color: var(--clr-muted);
  transition: color .2s;
  white-space: nowrap;
  letter-spacing: .01em;
}
.role-switch-btn:hover:not(.active) { color: var(--clr-ink-2); }
.role-switch-btn.active { color: var(--clr-primary); }

.tab-icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  fill: currentColor;
  transition: transform .2s;
}
.role-switch-btn.active .tab-icon { transform: scale(1.08); }

/* ── Form pill (register) ────────────────────── */
.auth-form-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  padding: 6px 13px;
  border-radius: 100px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--clr-primary);
  background: rgba(124,18,15,.07);
  border: 1px solid rgba(124,18,15,.18);
}

/* ── Form headings ───────────────────────────── */
.split-form-header { margin-bottom: 22px; }
.split-form-header h1 {
  font-family: var(--ff-display);
  font-size: clamp(23px, 3vw, 28px);
  font-weight: 800;
  color: var(--clr-ink);
  letter-spacing: -.03em;
  margin: 0 0 7px;
  line-height: 1.15;
}
.split-form-sub {
  margin: 0;
  font-size: 13.5px;
  color: var(--clr-muted);
  line-height: 1.65;
}

/* ── Form fields ─────────────────────────────── */
.form-stack { position: relative; display: flex; flex-direction: column; gap: 16px; }
.form-field  { display: flex; flex-direction: column; gap: 6px; }

/* ── Field loading overlay (shimmer skeleton) ── */
.form-loading-overlay {
  position: absolute;
  inset: -6px -8px;
  z-index: 5;
  display: none;
  flex-direction: column;
  gap: 18px;
  padding: 6px 8px;
  background: rgba(255,255,255,.72);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  border-radius: 12px;
}
.form-stack.is-loading .form-loading-overlay { display: flex; }

.skel-field { display: flex; flex-direction: column; gap: 8px; }
.skel-line {
  border-radius: 7px;
  background: linear-gradient(100deg, #ececef 30%, #f6f6f8 50%, #ececef 70%);
  background-size: 220% 100%;
  animation: skelShimmer 1.25s ease-in-out infinite;
}
.skel-line.skel-label { height: 11px; width: 38%; }
.skel-line.skel-input { height: 46px; width: 100%; }
.skel-line.skel-btn   { height: 46px; width: 100%; border-radius: 10px; margin-top: 4px; opacity: .85; }

@keyframes skelShimmer {
  0%   { background-position: 180% 0; }
  100% { background-position: -80% 0; }
}

/* Spinner badge centered over the skeleton */
.form-loading-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 3px solid rgba(124,18,15,.18);
  border-top-color: var(--clr-primary);
  animation: spin .7s linear infinite;
  z-index: 6;
}
@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .skel-line, .form-loading-spinner { animation-duration: 0ms; }
  /* Disable all decorative entrance animations — show everything in place. */
  .auth-page-header,
  .auth-page-footer,
  .auth-split-card,
  .auth-split-brand,
  .auth-split-form-inner > *,
  #formSection > * {
    animation: none !important;
  }
  .auth-page-brand:hover .auth-page-logo { transform: none; }
}

.form-field label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--clr-ink-2);
  letter-spacing: .01em;
}

/* ── Base input ──────────────────────────────── */
.form-field input {
  width: 100%;
  height: 46px;
  border-radius: 10px;
  border: 1.5px solid var(--clr-border-strong);
  padding: 0 14px;
  font-family: var(--ff-body);
  font-size: 14px;
  background: var(--clr-bg);
  color: var(--clr-ink);
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.form-field input::placeholder { color: var(--clr-subtle); opacity: 1; }
.form-field input:focus {
  outline: none;
  border-color: var(--clr-primary);
  box-shadow: 0 0 0 3px rgba(124,18,15,.1);
  background: #fff;
}

/* ── Input with prefix icon ──────────────────── */
.input-icon-wrap {
  position: relative;
  display: block;
}
.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  color: var(--clr-subtle);
  pointer-events: none;
  z-index: 1;
}
/* Reserve room for the left icon so text never overlaps it */
.input-icon-wrap input { padding-left: 42px; }
.input-icon-wrap:focus-within .input-icon { color: var(--clr-primary); }

/* ── Password field (icon left + toggle right) ── */
.password-wrap { position: relative; }
.password-wrap input { padding-right: 50px; }

/* Borderless eye toggle — just the icon, no chip/box around it. */
.password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--clr-subtle);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color .15s, transform .12s;
}
.password-toggle:hover { color: var(--clr-primary); }
.password-toggle:active { transform: translateY(-50%) scale(.9); }
.password-toggle:focus-visible {
  outline: none;
  color: var(--clr-primary);
  box-shadow: 0 0 0 3px rgba(124,18,15,.16);
}
/* Subtle swap animation when toggling show/hide */
.password-toggle svg { transition: transform .18s ease, opacity .18s ease; }
.password-toggle[aria-pressed="true"] svg { transform: scale(1.08); }

/* ── Submit button ───────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  border: none;
  font-family: var(--ff-body);
}
.btn-full { width: 100%; }
.btn-primary {
  height: 46px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .01em;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--clr-primary-dark) 0%, var(--clr-primary) 55%, var(--clr-primary-hover) 100%);
  color: #fff;
  transition: opacity .18s, box-shadow .18s, transform .12s;
  box-shadow: 0 3px 12px rgba(124,18,15,.35), 0 1px 3px rgba(124,18,15,.2);
  margin-top: 8px;
}
.btn-primary:hover {
  opacity: .92;
  box-shadow: 0 6px 20px rgba(124,18,15,.4), 0 2px 6px rgba(124,18,15,.2);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); box-shadow: 0 2px 8px rgba(124,18,15,.3); }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-arrow {
  flex-shrink: 0;
  transition: transform .15s;
}
.btn-primary:not(:disabled):hover .btn-arrow { transform: translateX(3px); }

/* ── Error ───────────────────────────────────── */
.auth-error {
  background: rgba(153,27,27,.07);
  border: 1px solid rgba(153,27,27,.22);
  color: #991b1b;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13.5px;
  line-height: 1.55;
  margin-bottom: 14px;
  animation: slideDownFade .2s ease;
}
/* Inline action inside an error (e.g. "Resend email" on the login page) */
.auth-error-action {
  display: inline;
  margin-left: 2px;
  padding: 0;
  border: none;
  background: none;
  color: #991b1b;
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  transition: color .15s;
}
.auth-error-action:hover { color: var(--clr-primary); }
.auth-error-action:disabled { opacity: .6; cursor: default; text-decoration: none; }

/* ── Footer / register link ──────────────────── */
.split-register-link {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--clr-muted);
  text-align: center;
}
.split-register-link a {
  color: var(--clr-primary);
  font-weight: 600;
  text-decoration: none;
}
.split-register-link a:hover { text-decoration: underline; }

.split-forgot-link {
  margin: -4px 0 0;
  text-align: right;
  font-size: 12.5px;
}
.split-forgot-link a {
  color: var(--clr-muted);
  font-weight: 600;
  text-decoration: none;
}
.split-forgot-link a:hover { color: var(--clr-primary); text-decoration: underline; }

/* Helper note under a form field (e.g. email requirement on register) */
.field-note {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 7px 2px 0;
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--clr-muted);
}
.field-note svg { flex-shrink: 0; margin-top: 1px; color: var(--clr-primary); }

/* Reset page: "checking your link…" loading state */
.reset-checking {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  padding: 40px 0;
}
.reset-checking-spinner {
  position: static;
  width: 30px;
  height: 30px;
}

.split-footer-note {
  margin: 16px 0 0;
  font-size: 11.5px;
  color: var(--clr-subtle);
  text-align: center;
  line-height: 1.6;
}

/* ── Responsive ──────────────────────────────── */
@media (max-width: 720px) {
  .auth-split-card {
    grid-template-columns: 1fr;
    border-radius: var(--radius-md);
  }
  .auth-split-brand {
    min-height: auto;
    padding: 36px 28px 32px;
    align-items: center;
    text-align: center;
  }
  .auth-split-brand::before,
  .auth-split-brand::after { display: none; }
  .split-brand-logo-wrap { margin-left: auto; margin-right: auto; }
  .split-brand-divider { margin-left: auto; margin-right: auto; }
  .split-brand-badge { margin: 16px auto 0; }
  /* The panel centres its children on mobile; an inline-flex pill needs auto
     margins to follow, or it stays stuck to the left edge. */
  .login-tz { margin-left: auto; margin-right: auto; }
  .split-brand-points li { justify-content: center; }
  .auth-split-form {
    min-height: auto;
    padding: 40px 28px 48px;
  }
}

@media (max-width: 400px) {
  .auth-split-form { padding: 32px 20px 40px; }
  .split-brand-stats { flex-wrap: wrap; gap: 10px; }
  .split-stat-sep { display: none; }
}

/* ── Timezone strip on the sign-in brand panel ────────────────────────────
   Kate works US Eastern while the team runs on Manila time. Stating the
   clock before sign-in stops the "why did this go overdue?" question later.
   Display only — every deadline is measured in the team timezone. */
/* One inline row, not a stacked card: the brand panel is a fixed-height
   column and a tall block pushed the stats strip past the bottom edge. */
.login-tz {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  margin: 14px 0 0;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px;
  background: rgba(255, 255, 255, .07);
  white-space: nowrap;
}
.login-tz:empty { display: none; }

.login-tz-time {
  font-family: var(--ff-display, inherit);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.login-tz-note {
  font-size: 11px;
  line-height: 1.2;
  color: rgba(255, 255, 255, .7);
}
