/* =============================================================
   PEVLO — Auth pages (login, register, forgot, reset, 2FA)
   Colors follow the Pevlo logo: cyan → blue → violet on navy.
   ============================================================= */
.pv-auth {
  --pv-cyan: #06acfa;
  --pv-blue: #265dfa;
  --pv-indigo: #3b2fd9;
  --pv-violet: #6d28d9;
  --pv-navy: #0b1533;
  --pv-grad: linear-gradient(135deg, #06acfa 0%, #265dfa 45%, #6d28d9 100%);

  --a-bg: #f4f7ff;
  --a-card: #ffffff;
  --a-field: #f6f8fd;
  --a-border: #e3e8f4;
  --a-text: #0b1533;
  --a-muted: #5b6785;
  --a-ring: rgba(38, 93, 250, .22);

  position: relative;
  min-height: calc(100vh - 140px);
  padding: clamp(24px, 5vw, 64px) 16px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--a-bg);
  color: var(--a-text);
}
html[data-theme="dark"] .pv-auth {
  --a-bg: #060a1a;
  --a-card: #0d1430;
  --a-field: #111a3b;
  --a-border: #1f2a52;
  --a-text: #e8edff;
  --a-muted: #95a0c4;
  --a-ring: rgba(6, 172, 250, .28);
}

/* soft brand glow in the background */
.pv-auth::before,
.pv-auth::after {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .35;
  pointer-events: none;
}
.pv-auth::before { top: -180px; left: -140px; background: #06acfa; }
.pv-auth::after  { bottom: -200px; right: -160px; background: #6d28d9; }
html[data-theme="dark"] .pv-auth::before,
html[data-theme="dark"] .pv-auth::after { opacity: .28; }

/* ---------- layout ---------- */
.pv-auth__card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1040px;
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  border-radius: 28px;
  overflow: hidden;
  background: var(--a-card);
  border: 1px solid var(--a-border);
  box-shadow: 0 30px 80px rgba(11, 21, 51, .14);
}
html[data-theme="dark"] .pv-auth__card { box-shadow: 0 30px 80px rgba(0, 0, 0, .55); }
.pv-auth__card--narrow {
  max-width: 480px;
  grid-template-columns: 1fr;
}

/* ---------- brand side ---------- */
.pv-auth__brand {
  position: relative;
  padding: 48px 44px;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 18px;
  background:
    radial-gradient(circle at 85% 10%, rgba(255,255,255,.18), transparent 40%),
    var(--pv-grad);
  overflow: hidden;
}
html[data-theme="dark"] .pv-auth__brand {
  background:
    radial-gradient(circle at 85% 10%, rgba(6,172,250,.35), transparent 45%),
    radial-gradient(circle at 10% 95%, rgba(109,40,217,.45), transparent 50%),
    #0a1230;
  border-right: 1px solid var(--a-border);
}
.pv-auth__brand::after { /* subtle shoe-track stripes */
  content: "";
  position: absolute;
  right: -60px;
  bottom: -40px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  border: 38px solid rgba(255,255,255,.08);
}
.pv-auth__logo {
  display: inline-flex;
  align-self: flex-start;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,.95);
}
.pv-auth__logo img { height: 34px; width: auto; display: block; }
html[data-theme="dark"] .pv-auth__logo { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); }
.pv-auth__logo .logo-img-dark { display: none; }
html[data-theme="dark"] .pv-auth__logo .logo-img-light { display: none; }
html[data-theme="dark"] .pv-auth__logo .logo-img-dark { display: block; }

.pv-auth__eyebrow {
  align-self: flex-start;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.22);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.pv-auth .pv-auth__brand h1 {
  margin: 0;
  color: #fff !important;
  font-size: clamp(2rem, 3.6vw, 2.9rem);
  line-height: 1.08;
  letter-spacing: -.02em;
}
.pv-auth__brand p {
  margin: 0;
  color: rgba(255,255,255,.86);
  line-height: 1.7;
  max-width: 400px;
}
.pv-auth__perks {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.pv-auth__perks li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.14);
  backdrop-filter: blur(6px);
  font-weight: 600;
  font-size: .95rem;
}
.pv-auth__perks svg { flex: none; width: 20px; height: 20px; }

/* ---------- form side ---------- */
.pv-auth__form {
  padding: 44px clamp(24px, 4vw, 48px);
  display: grid;
  gap: 18px;
  align-content: center;
}
.pv-auth__head h2 {
  margin: 0 0 6px;
  color: var(--a-text);
  font-size: 1.85rem;
  letter-spacing: -.02em;
}
.pv-auth__head p { margin: 0; color: var(--a-muted); line-height: 1.6; }
.pv-auth__icon {
  width: 56px;
  height: 56px;
  margin-bottom: 14px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--pv-grad);
  box-shadow: 0 12px 28px rgba(38, 93, 250, .35);
}
.pv-auth__icon svg { width: 26px; height: 26px; }

.pv-field { display: grid; gap: 7px; }
.pv-field > span {
  font-size: .88rem;
  font-weight: 700;
  color: var(--a-text);
}
.pv-input {
  position: relative;
  display: flex;
  align-items: center;
}
.pv-input > svg {
  position: absolute;
  left: 15px;
  width: 18px;
  height: 18px;
  color: var(--a-muted);
  pointer-events: none;
  transition: color .2s;
}
.pv-input input {
  width: 100%;
  height: 52px;
  padding: 0 16px 0 46px;
  border-radius: 14px;
  border: 1.5px solid var(--a-border);
  background: var(--a-field);
  color: var(--a-text);
  font-size: 1rem;
  outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.pv-input input::placeholder { color: var(--a-muted); opacity: .75; }
.pv-input input:focus {
  border-color: var(--pv-blue);
  background: var(--a-card);
  box-shadow: 0 0 0 4px var(--a-ring);
}
.pv-input:focus-within > svg { color: var(--pv-blue); }
html[data-theme="dark"] .pv-input input:focus { border-color: var(--pv-cyan); }
html[data-theme="dark"] .pv-input:focus-within > svg { color: var(--pv-cyan); }
.pv-input input.is-invalid { border-color: #ef4444; }
.pv-input input.is-valid { border-color: #10b981; }
.pv-input--pw input { padding-right: 52px; }
.pv-eye {
  position: absolute;
  right: 8px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--a-muted);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.pv-eye:hover { background: var(--a-ring); color: var(--a-text); }
.pv-eye svg { width: 20px; height: 20px; }
.pv-eye .eye-off { display: none; }
.pv-eye.is-on .eye-on { display: none; }
.pv-eye.is-on .eye-off { display: block; }

.pv-hint {
  min-height: 0;
  font-size: .8rem;
  color: var(--a-muted);
}
.pv-hint--warn { color: #f59e0b; font-weight: 600; }
.pv-hint--bad { color: #ef4444; font-weight: 600; }
.pv-hint--good { color: #10b981; font-weight: 600; }

/* password strength */
.pv-strength {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 2px;
}
.pv-strength i {
  height: 5px;
  border-radius: 99px;
  background: var(--a-border);
  transition: background .25s;
}
.pv-strength[data-level="1"] i:nth-child(-n+1) { background: #ef4444; }
.pv-strength[data-level="2"] i:nth-child(-n+2) { background: #f59e0b; }
.pv-strength[data-level="3"] i:nth-child(-n+3) { background: #06acfa; }
.pv-strength[data-level="4"] i { background: #10b981; }

.pv-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.pv-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: .92rem;
}
.pv-check {
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--a-text);
  cursor: pointer;
  line-height: 1.45;
}
.pv-check input {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  accent-color: var(--pv-blue);
  flex: none;
}
.pv-auth a.pv-link,
.pv-auth .pv-check a,
.pv-auth__foot a {
  color: var(--pv-blue);
  font-weight: 700;
  text-decoration: none;
}
html[data-theme="dark"] .pv-auth a.pv-link,
html[data-theme="dark"] .pv-auth .pv-check a,
html[data-theme="dark"] .pv-auth__foot a { color: var(--pv-cyan); }
.pv-auth a.pv-link:hover,
.pv-auth__foot a:hover { text-decoration: underline; }

/* buttons */
.pv-btn {
  position: relative;
  height: 54px;
  width: 100%;
  border: 0;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 1.02rem;
  font-weight: 700;
  color: #fff;
  background: var(--pv-grad);
  background-size: 160% 160%;
  box-shadow: 0 14px 30px rgba(38, 93, 250, .32);
  cursor: pointer;
  transition: transform .15s, box-shadow .2s, background-position .4s;
  text-decoration: none;
}
.pv-btn:hover { background-position: 100% 0; box-shadow: 0 18px 36px rgba(109, 40, 217, .35); transform: translateY(-1px); }
.pv-btn:active { transform: translateY(0); }
.pv-btn svg { width: 20px; height: 20px; }
.pv-btn.is-loading { pointer-events: none; opacity: .85; }
.pv-btn.is-loading .pv-btn__label { visibility: hidden; }
.pv-btn.is-loading::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  border: 3px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: pv-spin .7s linear infinite;
}
@keyframes pv-spin { to { transform: rotate(360deg); } }

.pv-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--a-muted);
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.pv-divider::before,
.pv-divider::after { content: ""; flex: 1; height: 1px; background: var(--a-border); }

.pv-btn--ghost {
  background: var(--a-card);
  color: var(--a-text);
  border: 1.5px solid var(--a-border);
  box-shadow: none;
}
.pv-btn--ghost:hover { background: var(--a-field); box-shadow: none; border-color: var(--pv-blue); }

.pv-auth__foot {
  margin: 0;
  text-align: center;
  color: var(--a-muted);
}

/* flash messages inside the auth card */
.pv-auth .flash-message {
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: .92rem;
  font-weight: 600;
  border: 1px solid transparent;
}
.pv-auth .flash-error   { background: rgba(239,68,68,.1);  color: #dc2626; border-color: rgba(239,68,68,.25); }
.pv-auth .flash-success { background: rgba(16,185,129,.1); color: #059669; border-color: rgba(16,185,129,.25); }
.pv-auth .flash-warning { background: rgba(245,158,11,.1); color: #b45309; border-color: rgba(245,158,11,.25); }
.pv-auth .flash-info    { background: rgba(6,172,250,.1);  color: #0369a1; border-color: rgba(6,172,250,.25); }
html[data-theme="dark"] .pv-auth .flash-error   { color: #fca5a5; }
html[data-theme="dark"] .pv-auth .flash-success { color: #6ee7b7; }
html[data-theme="dark"] .pv-auth .flash-warning { color: #fcd34d; }
html[data-theme="dark"] .pv-auth .flash-info    { color: #7dd3fc; }

/* OTP boxes */
.pv-otp {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}
.pv-otp input {
  height: 58px;
  width: 100%;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 800;
  border-radius: 14px;
  border: 1.5px solid var(--a-border);
  background: var(--a-field);
  color: var(--a-text);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.pv-otp input:focus { border-color: var(--pv-blue); box-shadow: 0 0 0 4px var(--a-ring); }

/* responsive */
@media (max-width: 900px) {
  .pv-auth__card { grid-template-columns: 1fr; max-width: 560px; }
  .pv-auth__brand { padding: 30px 26px; }
  .pv-auth__brand .pv-auth__perks { display: none; }
  .pv-auth__brand h1 { font-size: 1.8rem; }
}
@media (max-width: 560px) {
  .pv-grid-2 { grid-template-columns: 1fr; }
  .pv-auth__form { padding: 28px 20px; }
  .pv-otp { gap: 6px; }
  .pv-otp input { height: 50px; font-size: 1.25rem; }
}
