/*
 * Sign-in and registration pages (dashboard/includes/auth-page.php). Loaded after dashboard.css, whose tokens, form
 * controls, buttons and alerts these pages use. Blue for actions, the coral red as the second brand colour, never
 * blended in one gradient.
 */

body.oa-auth {
  min-height: 100vh;
  margin: 0;
}

/* These pages don't load the old theme, which set this for everything: without it inputs overflow their column. */
.oa-auth *,
.oa-auth *::before,
.oa-auth *::after {
  box-sizing: border-box;
}

/* Icons are inline SVG (oa_auth_icon()), not the icon font, which browsers block on the customer portal's own host. */
.oa-auth .oa-icon {
  flex: none;
  width: 1em;
  height: 1em;
  overflow: visible;
  vertical-align: -0.125em;
}

.oa-auth__alert > .oa-icon {
  margin-top: 2px;
  color: var(--oa-danger-text);
}

.oa-auth__toggle[aria-pressed="true"] .oa-auth__eye,
.oa-auth__toggle[aria-pressed="false"] .oa-auth__eye-slash {
  display: none;
}

.oa-auth__spin {
  animation: oa-auth-spin 0.9s linear infinite;
}

@keyframes oa-auth-spin {
  to { transform: rotate(360deg); }
}

.oa-auth__wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  min-height: 100vh;
}

/* ---------- Brand panel ---------- */

.oa-auth__brand {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 48px;
  padding: 40px clamp(32px, 5vw, 72px);
  overflow: hidden;
  border-right: 1px solid var(--oa-border);
  background:
    radial-gradient(640px 420px at 0% 0%, rgba(37, 99, 235, 0.22), transparent 70%),
    radial-gradient(560px 380px at 100% 100%, rgba(231, 106, 95, 0.16), transparent 70%),
    var(--oa-sidebar);
}

.oa-auth__brand::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(140, 170, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(140, 170, 255, 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 30% 40%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 70% at 30% 40%, #000 20%, transparent 75%);
  pointer-events: none;
}

.oa-auth__brand > * {
  position: relative;
}

.oa-body .oa-auth__logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  align-self: flex-start;
  color: var(--oa-text);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.oa-body .oa-auth__logo:hover {
  color: var(--oa-text);
}

.oa-auth__tag {
  padding: 3px 8px;
  border: 1px solid var(--oa-border-strong);
  border-radius: 999px;
  color: var(--oa-text-2);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0;
}

.oa-auth__pitch h2 {
  max-width: 16ch;
  margin: 0 0 28px;
  color: var(--oa-text);
  font-size: clamp(30px, 3.2vw, 44px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.oa-auth__pitch h2 em {
  font-style: normal;
  background: linear-gradient(92deg, #7cb4ff 0%, #e9eef8 50%, #e76a5f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}


.oa-auth__points {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.oa-auth__points li {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--oa-text-2);
  font-size: 14.5px;
}

.oa-auth__point-icon {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(37, 99, 235, 0.24), rgba(37, 99, 235, 0.06));
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.22);
  color: #bfdbfe;
  font-size: 14px;
}

.oa-auth__point-icon.is-red {
  background: linear-gradient(145deg, rgba(231, 106, 95, 0.24), rgba(231, 106, 95, 0.06));
  box-shadow: inset 0 0 0 1px rgba(231, 106, 95, 0.26);
  color: #fbd3cf;
}

.oa-auth__fine {
  margin: 0;
  color: var(--oa-text-3);
  font-size: 12.5px;
}

.oa-body .oa-auth__fine a {
  color: var(--oa-text-2);
}

.oa-body .oa-auth__fine a:hover {
  color: var(--oa-text);
}

/* ---------- Form panel ---------- */

.oa-auth__panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}

.oa-auth__card {
  width: 100%;
  max-width: 400px;
}

.oa-body .oa-auth__logo--mobile {
  display: none;
}

.oa-auth__card h1 {
  margin: 0 0 6px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.oa-auth__lead {
  margin: 0 0 28px;
  color: var(--oa-text-2);
  font-size: 14.5px;
}

.oa-auth__alert {
  margin-bottom: 20px;
}

.oa-auth__field {
  margin-bottom: 16px;
}

.oa-auth__control {
  position: relative;
}

.oa-auth__control > .oa-icon {
  position: absolute;
  top: 50%;
  left: 13px;
  transform: translateY(-50%);
  color: var(--oa-text-3);
  font-size: 13.5px;
  pointer-events: none;
  transition: color 0.15s ease;
}

.oa-auth__control:focus-within > .oa-icon {
  color: var(--oa-accent-text);
}

.oa-body.oa-auth .form-control {
  width: 100%;
  height: 46px;
  padding-left: 38px;
  font-size: 14.5px;
}

.oa-body.oa-auth .oa-auth__password {
  padding-right: 46px;
}

/* Browsers' saved-password fill keeps the dark field instead of a pale one. */
.oa-body.oa-auth .form-control:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px var(--oa-surface-2) inset;
  -webkit-text-fill-color: var(--oa-text);
  caret-color: var(--oa-text);
}

.oa-auth__toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  transform: translateY(-50%);
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--oa-text-3);
  cursor: pointer;
}

.oa-auth__toggle:hover {
  background: var(--oa-surface-3);
  color: var(--oa-text);
}

.oa-auth__toggle:focus-visible {
  outline: 2px solid var(--oa-accent-text);
  outline-offset: 1px;
  color: var(--oa-text);
}

.oa-auth__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0 22px;
}

.oa-auth__check {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--oa-text-2);
  font-size: 13.5px;
  cursor: pointer;
  user-select: none;
}

.oa-auth__check input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--oa-accent);
  color-scheme: dark;
  cursor: pointer;
}

.oa-body.oa-auth .oa-btn--primary.oa-btn--block {
  height: 46px;
  font-size: 14.5px;
  font-weight: 600;
}

.oa-auth__busy {
  margin-left: 2px;
}

.oa-auth__captcha {
  display: flex;
  justify-content: center;
  min-height: 78px;
  margin: 6px 0 20px;
}

.oa-auth__terms {
  margin: 16px 0 0;
  color: var(--oa-text-3);
  font-size: 12.5px;
  text-align: center;
}

.oa-auth__divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 26px 0 18px;
  color: var(--oa-text-3);
  font-size: 12px;
}

.oa-auth__divider::before,
.oa-auth__divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--oa-border);
}

.oa-auth__alt {
  margin: 0;
  color: var(--oa-text-2);
  font-size: 13.5px;
  text-align: center;
}

.oa-body .oa-auth__alt a,
.oa-body .oa-auth__switch a {
  font-weight: 600;
}

.oa-auth__switch {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid var(--oa-border);
  border-radius: var(--oa-radius-md);
  background: var(--oa-surface);
  color: var(--oa-text-2);
  font-size: 13px;
  line-height: 1.45;
}

.oa-auth__switch > .oa-icon {
  flex: none;
  color: var(--oa-text-3);
  font-size: 15px;
}

/* ---------- Small screens: the form alone, with the logo above it ---------- */

@media (max-width: 900px) {
  .oa-auth__wrap {
    grid-template-columns: minmax(0, 1fr);
  }

  .oa-auth__brand {
    display: none;
  }

  .oa-auth__panel {
    align-items: flex-start;
    padding: 28px 16px 40px;
    background:
      radial-gradient(480px 300px at 0% 0%, rgba(37, 99, 235, 0.18), transparent 70%),
      radial-gradient(420px 280px at 100% 100%, rgba(231, 106, 95, 0.1), transparent 70%);
  }

  .oa-body .oa-auth__logo--mobile {
    display: inline-flex;
    margin-bottom: 32px;
  }

  .oa-auth__card h1 {
    font-size: 23px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .oa-auth__control > .oa-icon {
    transition: none;
  }

  .oa-auth__spin {
    animation-duration: 2.4s;
  }
}
