/* =================================================================
   AUTH V2 — WonderWP
   auth-v2.css | v=20260328a
================================================================= */

/* ── Base reset for auth shell ── */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: #fff;
  color: #0f172a;
}

/* ── Shell: full-viewport flex column ── */
.auth-v2-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Minimal sticky header ── */
.auth-v2-nav {
  position: sticky;
  top: 0;
  z-index: 200;
  height: 60px;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border, #e2e8f0);
}

.auth-v2-nav__hint {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 0.875rem;
  color: var(--muted, #64748b);
}

/* ── Main split layout ── */
.auth-v2-main {
  flex: 1;
  display: flex;
  min-height: 0;
}

/* ── Left brand panel ── */
.auth-v2-left {
  display: none;
  width: 42%;
  flex-shrink: 0;
  padding: 3rem 2.75rem;
  background: linear-gradient(145deg, #312e81 0%, #4338ca 40%, #4f46e5 70%, #6366f1 100%);
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

@media (min-width: 960px) {
  .auth-v2-left {
    display: flex;
  }
}

/* decorative orbs */
.auth-v2-left::before,
.auth-v2-left::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.auth-v2-left::before {
  width: 420px;
  height: 420px;
  top: -120px;
  right: -130px;
  background: rgba(255, 255, 255, 0.06);
}

.auth-v2-left::after {
  width: 280px;
  height: 280px;
  bottom: -80px;
  left: -80px;
  background: rgba(255, 255, 255, 0.04);
}

.auth-v2-brand {
  position: relative;
  z-index: 1;
}

.auth-v2-brand__eyebrow {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #a5b4fc;
  background: rgba(165, 180, 252, 0.12);
  border: 1px solid rgba(165, 180, 252, 0.25);
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  margin-bottom: 1.5rem;
}

.auth-v2-brand__h2 {
  font-family: var(--font-head, 'Space Grotesk', 'Inter', sans-serif);
  font-size: clamp(1.55rem, 2.3vw, 2rem);
  font-weight: 700;
  line-height: 1.22;
  color: #fff;
  margin: 0 0 1rem;
}

.auth-v2-brand__h2 em {
  font-style: normal;
  color: #a5b4fc;
}

.auth-v2-brand__sub {
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.65;
  margin: 0 0 2rem;
}

/* Signal list */
.auth-v2-signals {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.auth-v2-signals li {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.4;
}

.auth-v2-signals li i {
  flex-shrink: 0;
  font-size: 1rem;
  color: #6ee7b7;
  margin-top: 0.1rem;
}

/* Stats row at bottom of left panel */
.auth-v2-brand__stats {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  gap: 0;
}

.auth-v2-brand__stat {
  flex: 1;
  text-align: center;
}

.auth-v2-brand__stat strong {
  display: block;
  font-family: var(--font-head, 'Space Grotesk', sans-serif);
  font-size: 1.1875rem;
  font-weight: 700;
  color: #fff;
}

.auth-v2-brand__stat span {
  font-size: 0.7125rem;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.auth-v2-brand__stat-sep {
  width: 1px;
  height: 32px;
  background: rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
}

/* ── Right form panel ── */
.auth-v2-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.5rem;
  background: #fff;
  overflow-y: auto;
}

/* ── Auth card ── */
.auth-v2-card {
  width: 100%;
  max-width: 460px;
}

.auth-v2-card__heading {
  font-family: var(--font-head, 'Space Grotesk', 'Inter', sans-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.25rem;
  line-height: 1.25;
}

.auth-v2-card__sub {
  font-size: 0.875rem;
  color: var(--muted, #64748b);
  margin: 0 0 1.5rem;
  line-height: 1.5;
}

/* ── Flash alerts ── */
.auth-v2-flashes {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.125rem;
}

.auth-v2-flash {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.625rem 0.875rem;
  border-radius: 8px;
  font-size: 0.8375rem;
  font-weight: 500;
  line-height: 1.45;
}

.auth-v2-flash i {
  margin-top: 0.1rem;
  flex-shrink: 0;
  font-size: 0.9rem;
}

.auth-v2-flash--success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.auth-v2-flash--danger,
.auth-v2-flash--error   { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.auth-v2-flash--warning { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.auth-v2-flash--info    { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

/* ── Form layout ── */
.auth-v2-form {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.auth-v2-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

@media (max-width: 480px) {
  .auth-v2-row { grid-template-columns: 1fr; }
}

/* ── Form fields ── */
.auth-v2-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.auth-v2-field > label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #0f172a;
  user-select: none;
}

.auth-v2-field input,
.auth-v2-field select {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1.5px solid var(--border, #e2e8f0);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.9rem;
  color: #0f172a;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

.auth-v2-field input:focus,
.auth-v2-field select:focus {
  border-color: var(--indigo, #4f46e5);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.auth-v2-field input::placeholder {
  color: var(--muted-2, #94a3b8);
}

/* custom select arrow */
.auth-v2-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.875rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

/* ── Password toggle wrapper ── */
.auth-v2-pw-wrap {
  position: relative;
}

.auth-v2-pw-wrap input {
  padding-right: 2.75rem;
}

.auth-v2-pw-toggle {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted, #64748b);
  font-size: 1rem;
  padding: 0.2rem;
  line-height: 1;
  display: flex;
  align-items: center;
}

.auth-v2-pw-toggle:hover { color: var(--indigo, #4f46e5); }

/* ── Password strength indicator ── */
.auth-v2-strength {
  margin-top: 0.3rem;
}

.auth-v2-strength__bar {
  height: 3px;
  border-radius: 2px;
  background: var(--border, #e2e8f0);
  overflow: hidden;
}

.auth-v2-strength__fill {
  height: 100%;
  width: 0;
  border-radius: 2px;
  transition: width 0.2s ease, background 0.2s ease;
}

.auth-v2-strength__label {
  font-size: 0.73rem;
  color: var(--muted, #64748b);
  margin-top: 0.2rem;
  display: block;
}

/* ── Primary submit button ── */
.auth-v2-btn-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--indigo, #4f46e5);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: var(--font-head, 'Space Grotesk', 'Inter', sans-serif);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
  margin-top: 0.25rem;
  text-decoration: none;
  text-align: center;
}

.auth-v2-btn-submit:hover {
  background: #4338ca;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.28);
}

.auth-v2-btn-submit:active { transform: translateY(0); box-shadow: none; }

/* ── Secondary button ── */
.auth-v2-btn-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.625rem 1rem;
  background: #fff;
  color: var(--indigo, #4f46e5);
  border: 1.5px solid #c7d2fe;
  border-radius: 8px;
  font-family: var(--font-head, 'Space Grotesk', 'Inter', sans-serif);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  text-decoration: none;
  text-align: center;
}

.auth-v2-btn-secondary:hover {
  background: var(--indigo-bg, #eef2ff);
  border-color: var(--indigo, #4f46e5);
}

.auth-v2-btn-secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── Divider line ── */
.auth-v2-divider {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted, #64748b);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin: 0.875rem 0;
}

.auth-v2-divider::before,
.auth-v2-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border, #e2e8f0);
}

/* ── Resend section ── */
.auth-v2-resend {
  background: var(--bg-2, #f1f5f9);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 10px;
  padding: 1rem 1.125rem;
  font-size: 0.85rem;
}

.auth-v2-resend > p {
  color: #0f172a;
  margin: 0 0 0.75rem;
  line-height: 1.5;
}

.auth-v2-resend-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.auth-v2-resend__meta,
.auth-v2-resend__hint {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted, #64748b);
}

.auth-v2-resend__meta {
  margin-top: -0.35rem;
  margin-bottom: 0.85rem;
}

.auth-v2-resend__hint {
  margin-top: 0.75rem;
}

/* ── Card footer text ── */
.auth-v2-card__foot {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.84rem;
  color: var(--muted, #64748b);
}

.auth-v2-card__foot a {
  color: var(--indigo, #4f46e5);
  font-weight: 600;
  text-decoration: none;
}

.auth-v2-card__foot a:hover { text-decoration: underline; }

/* ── Result / Status pages ── */
.auth-v2-result {
  text-align: center;
  padding: 0.25rem 0 0.75rem;
}

.auth-v2-result__icon {
  font-size: 3.75rem;
  line-height: 1;
  margin-bottom: 1rem;
}

.auth-v2-result__icon--success { color: #10b981; }
.auth-v2-result__icon--error   { color: #ef4444; }
.auth-v2-result__icon--pending { color: var(--indigo, #4f46e5); }

.auth-v2-result__title {
  font-family: var(--font-head, 'Space Grotesk', sans-serif);
  font-size: 1.375rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.5rem;
}

.auth-v2-result__message {
  font-size: 0.9rem;
  color: var(--muted, #64748b);
  line-height: 1.65;
  margin: 0 0 1.5rem;
}

.auth-v2-result__actions {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

/* ── Info box (pending email detail) ── */
.auth-v2-info-box {
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  border-radius: 10px;
  padding: 0.875rem 1rem;
  font-size: 0.875rem;
  text-align: left;
  margin-bottom: 1.25rem;
  line-height: 1.55;
}

.auth-v2-info-box p { margin: 0 0 0.25rem; color: #0f172a; }
.auth-v2-info-box p:last-child { margin: 0; }
.auth-v2-info-box strong { color: var(--indigo, #4f46e5); }
[data-resend-note] { font-size: 0.8rem; color: var(--muted, #64748b); margin-top: 0.375rem !important; }

/* ── Minimal page footer ── */
.auth-v2-footer {
  padding: 0.875rem 1.5rem;
  border-top: 1px solid var(--border, #e2e8f0);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: var(--muted, #64748b);
  background: #fff;
}

.auth-v2-footer a {
  color: var(--muted, #64748b);
  text-decoration: none;
  transition: color 0.15s;
}

.auth-v2-footer a:hover { color: var(--indigo, #4f46e5); }

.auth-v2-footer__links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .auth-v2-right  { padding: 1.75rem 1rem 2rem; }
  .auth-v2-card__heading { font-size: 1.3rem; }
  .auth-v2-nav    { padding: 0 1rem; }
  .auth-v2-footer { padding: 0.75rem 1rem; }
}

html[data-bs-theme='dark'] .auth-v2-nav,
html[data-bs-theme='dark'] .auth-v2-right,
html[data-bs-theme='dark'] .auth-v2-resend,
html[data-bs-theme='dark'] .auth-v2-btn-secondary,
html[data-bs-theme='dark'] .auth-v2-footer,
html[data-bs-theme='dark'] .auth-v2-info-box {
  background: #0c1424;
  border-color: #22314d;
  color: #e5eefc;
}

html[data-bs-theme='dark'] .auth-v2-nav {
  background: rgba(12, 20, 36, 0.92);
}

html[data-bs-theme='dark'] .auth-v2-nav__hint,
html[data-bs-theme='dark'] .auth-v2-card__sub,
html[data-bs-theme='dark'] .auth-v2-card__foot,
html[data-bs-theme='dark'] .auth-v2-divider,
html[data-bs-theme='dark'] .auth-v2-strength__label,
html[data-bs-theme='dark'] .auth-v2-resend__meta,
html[data-bs-theme='dark'] .auth-v2-resend__hint,
html[data-bs-theme='dark'] [data-resend-note],
html[data-bs-theme='dark'] .auth-v2-result__message,
html[data-bs-theme='dark'] .auth-v2-footer a {
  color: #9fb0ca;
}

html[data-bs-theme='dark'] .auth-v2-card__heading,
html[data-bs-theme='dark'] .auth-v2-field > label,
html[data-bs-theme='dark'] .auth-v2-resend > p,
html[data-bs-theme='dark'] .auth-v2-result__title,
html[data-bs-theme='dark'] .auth-v2-info-box p {
  color: #e5eefc;
}

html[data-bs-theme='dark'] .auth-v2-field input,
html[data-bs-theme='dark'] .auth-v2-field select {
  background: #08111f;
  border-color: #22314d;
  color: #e5eefc;
}

html[data-bs-theme='dark'] .auth-v2-field input::placeholder {
  color: #6e82a3;
}

html[data-bs-theme='dark'] .auth-v2-pw-toggle {
  color: #9fb0ca;
}

html[data-bs-theme='dark'] .auth-v2-btn-secondary:hover {
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(129, 140, 248, 0.5);
}

html[data-bs-theme='dark'] .auth-v2-divider::before,
html[data-bs-theme='dark'] .auth-v2-divider::after,
html[data-bs-theme='dark'] .auth-v2-strength__bar {
  background: #22314d;
}

html[data-bs-theme='dark'] .auth-v2-flash--success { background: rgba(16, 185, 129, 0.14); color: #bbf7d0; border-color: rgba(16, 185, 129, 0.32); }
html[data-bs-theme='dark'] .auth-v2-flash--danger,
html[data-bs-theme='dark'] .auth-v2-flash--error   { background: rgba(239, 68, 68, 0.14); color: #fecaca; border-color: rgba(239, 68, 68, 0.32); }
html[data-bs-theme='dark'] .auth-v2-flash--warning { background: rgba(245, 158, 11, 0.14); color: #fde68a; border-color: rgba(245, 158, 11, 0.32); }
html[data-bs-theme='dark'] .auth-v2-flash--info    { background: rgba(59, 130, 246, 0.14); color: #bfdbfe; border-color: rgba(59, 130, 246, 0.32); }
