/* Proxy Grove — Auth pages (login / register) */
.pg-auth {
  min-height: calc(100vh - var(--pg-nav-height, 4.25rem));
  display: grid;
  place-items: center;
  padding: 2.5rem 1.25rem 3.5rem;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgb(19 0 154 / 0.08), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 90%, rgb(19 127 21 / 0.07), transparent 50%),
    var(--color-surface-body, #f9fafb);
}

.pg-auth__card {
  width: min(100%, 26rem);
  background: var(--color-surface-raised, #fff);
  border: 1px solid rgb(19 0 154 / 0.08);
  border-radius: 1.25rem;
  box-shadow: var(--shadow-glass);
  padding: 2.25rem 1.75rem 1.75rem;
}

.pg-auth__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.85rem;
  margin-bottom: 1.75rem;
}

.pg-auth__brand > a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
}

.pg-auth__mark {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 0.9rem;
}

.pg-auth__wordmark {
  display: block;
  height: 2rem;
  width: auto;
  max-width: 14rem;
  margin-top: 0.15rem;
}

.pg-auth__title {
  margin: 0.35rem 0 0;
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--color-text-heading, #13009a);
  line-height: 1.25;
}

.pg-auth__subtitle {
  margin: 0;
  font-size: 0.9rem;
  color: color-mix(in srgb, var(--color-text-body) 72%, transparent);
  line-height: 1.5;
  max-width: 22rem;
}

.pg-auth__form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pg-auth__field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.pg-auth__label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text-heading, #13009a);
}

.pg-auth__input {
  appearance: none;
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: 0.75rem;
  border: 1px solid rgb(19 0 154 / 0.14);
  background: #fff;
  color: var(--color-text-body);
  font: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.pg-auth__password {
  position: relative;
}

.pg-auth__password .pg-auth__input {
  padding-right: 2.85rem;
}

.pg-auth__eye {
  position: absolute;
  top: 50%;
  right: 0.35rem;
  transform: translateY(-50%);
  display: inline-grid;
  place-items: center;
  width: 2.15rem;
  height: 2.15rem;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0.55rem;
  background: transparent;
  color: color-mix(in srgb, var(--color-text-body, #334155) 55%, #13009a 20%);
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.pg-auth__eye:hover {
  color: #13009a;
  background: rgb(19 0 154 / 0.06);
}

.pg-auth__eye:active {
  transform: translateY(-50%) scale(0.96);
}

.pg-auth__eye:focus-visible {
  outline: 2px solid #13009a;
  outline-offset: 1px;
}

.pg-auth__eye-icon {
  width: 1.15rem;
  height: 1.15rem;
  display: block;
  pointer-events: none;
}

.pg-auth__eye-icon--hide {
  display: none;
}

.pg-auth__eye[aria-pressed="true"] {
  color: #13009a;
}

.pg-auth__eye[aria-pressed="true"] .pg-auth__eye-icon--show {
  display: none;
}

.pg-auth__eye[aria-pressed="true"] .pg-auth__eye-icon--hide {
  display: block;
}

.pg-auth__input:focus {
  outline: none;
  border-color: #13009a;
  box-shadow: 0 0 0 3px rgb(19 0 154 / 0.12);
}

.pg-auth__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.8125rem;
}

.pg-auth__check {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--color-text-body);
  cursor: pointer;
}

.pg-auth__link {
  color: #13009a;
  font-weight: 600;
  text-decoration: none;
}

.pg-auth__link:hover {
  text-decoration: underline;
}

.pg-auth__turnstile {
  display: flex;
  justify-content: stretch;
  margin: 0.15rem 0 0.1rem;
  min-height: 65px;
}

.pg-auth__turnstile .cf-turnstile,
.pg-auth__turnstile iframe {
  width: 100% !important;
  max-width: 100%;
}

.pg-auth__submit {
  margin-top: 0.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.85rem 1rem;
  border: none;
  border-radius: var(--radius-btn, 0.75rem);
  background: var(--color-button-primary-bg, #137f15);
  color: var(--color-button-primary-text, #fff);
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.pg-auth__submit:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.pg-auth__submit:focus-visible {
  outline: 2px solid #13009a;
  outline-offset: 3px;
}

.pg-auth__footer {
  margin: 1.35rem 0 0;
  text-align: center;
  font-size: 0.875rem;
  color: color-mix(in srgb, var(--color-text-body) 75%, transparent);
}

.pg-auth__back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 1.25rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #13009a;
  text-decoration: none;
}

.pg-auth__back:hover {
  text-decoration: underline;
}

html.dark .pg-auth {
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgb(19 0 154 / 0.22), transparent 55%),
    #0b0c14;
}

html.dark .pg-auth__card {
  background: #12141f;
  border-color: rgb(255 255 255 / 0.08);
}

html.dark .pg-auth__title,
html.dark .pg-auth__label,
html.dark .pg-auth__link,
html.dark .pg-auth__back {
  color: #fff;
}

html.dark .pg-auth__wordmark {
  filter: brightness(0) invert(1);
  opacity: 0.95;
}

html.dark .pg-auth__subtitle,
html.dark .pg-auth__footer,
html.dark .pg-auth__check {
  color: rgb(255 255 255 / 0.7);
}

html.dark .pg-auth__input {
  background: #0b0c14;
  border-color: rgb(255 255 255 / 0.12);
  color: #fff;
}

html.dark .pg-auth__eye {
  color: rgb(255 255 255 / 0.55);
}

html.dark .pg-auth__eye:hover,
html.dark .pg-auth__eye[aria-pressed="true"] {
  color: #fff;
  background: rgb(255 255 255 / 0.08);
}

/* Password reset / OTP extras */
.pg-nav--auth-simple .pg-nav__inner {
  justify-content: space-between;
}

.pg-auth__alert {
  display: block;
  margin: 0;
  padding: 0.65rem 0.85rem;
  border-radius: 0.6rem;
  background: rgb(180 35 24 / 0.08);
  color: #b42318;
  font-size: 0.84rem;
  font-weight: 500;
}

.pg-auth__alert[data-kind="success"] {
  background: rgb(19 127 21 / 0.1);
  color: #137f15;
}

.pg-auth__alert[hidden] {
  display: none;
}

.pg-auth__hint {
  margin: 0;
  padding: 0.65rem 0.85rem;
  border-radius: 0.6rem;
  background: rgb(19 127 21 / 0.1);
  color: #137f15;
  font-size: 0.84rem;
  font-weight: 500;
  line-height: 1.45;
}

.pg-auth__hint--muted {
  background: transparent;
  color: color-mix(in srgb, var(--color-text-body) 70%, transparent);
  text-align: center;
  font-weight: 500;
  margin-top: 1rem;
}

.pg-auth__otp {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.45rem;
}

.pg-auth__otp-input {
  appearance: none;
  width: 100%;
  aspect-ratio: 1;
  text-align: center;
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0;
  border-radius: 0.75rem;
  border: 1px solid rgb(19 0 154 / 0.14);
  background: #fff;
  color: var(--color-text-heading, #13009a);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.pg-auth__otp-input:focus {
  outline: none;
  border-color: #13009a;
  box-shadow: 0 0 0 3px rgb(19 0 154 / 0.12);
}

.pg-auth__timer {
  margin: 0;
  text-align: center;
  font-size: 0.8125rem;
  color: color-mix(in srgb, var(--color-text-body) 72%, transparent);
}

.pg-auth__timer span {
  font-weight: 700;
  color: var(--color-text-heading, #13009a);
  font-variant-numeric: tabular-nums;
}

.pg-auth__ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-btn, 0.75rem);
  border: 1px solid rgb(19 0 154 / 0.16);
  background: transparent;
  color: #13009a;
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
}

.pg-auth__ghost:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.pg-auth__ghost:not(:disabled):hover {
  background: rgb(19 0 154 / 0.05);
}

.pg-auth__strength {
  display: grid;
  gap: 0.35rem;
}

.pg-auth__strength-bar {
  height: 0.35rem;
  border-radius: 999px;
  background: rgb(19 0 154 / 0.08);
  overflow: hidden;
}

.pg-auth__strength-bar span {
  display: block;
  height: 100%;
  width: 25%;
  border-radius: inherit;
  background: #b42318;
  transition: width 0.2s ease, background 0.2s ease;
}

.pg-auth__strength[data-level="1"] .pg-auth__strength-bar span {
  width: 25%;
  background: #b42318;
}

.pg-auth__strength[data-level="2"] .pg-auth__strength-bar span {
  width: 50%;
  background: #b54708;
}

.pg-auth__strength[data-level="3"] .pg-auth__strength-bar span {
  width: 75%;
  background: #137f15;
}

.pg-auth__strength[data-level="4"] .pg-auth__strength-bar span {
  width: 100%;
  background: #0f6b12;
}

.pg-auth__strength-label {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  color: color-mix(in srgb, var(--color-text-body) 70%, transparent);
}

.pg-auth__reqs {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.78rem;
  color: color-mix(in srgb, var(--color-text-body) 72%, transparent);
}

.pg-auth__success-icon {
  width: 3.25rem;
  height: 3.25rem;
  margin: 0 auto 0.5rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgb(19 127 21 / 0.12);
  color: #137f15;
}

.pg-auth__success-icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

.pg-auth__submit:disabled {
  opacity: 0.65;
  cursor: wait;
  transform: none;
}

html.dark .pg-auth__otp-input {
  background: #0b0c14;
  border-color: rgb(255 255 255 / 0.12);
  color: #fff;
}

html.dark .pg-auth__ghost,
html.dark .pg-auth__timer span {
  color: #fff;
}

html.dark .pg-auth__ghost {
  border-color: rgb(255 255 255 / 0.16);
}

@media (max-width: 420px) {
  .pg-auth__otp {
    gap: 0.35rem;
  }

  .pg-auth__otp-input {
    font-size: 1.05rem;
  }
}
