/* ==========================================================================
   DivinIQ admin - authentication screens
   Self-contained: login, login errors, forgot password, password updated.
   Deliberately does not depend on the theme's login100 / wrap-login100
   classes so these pages cannot be broken by a switcher or skin change.
   ========================================================================== */

:root {
  --auth-primary: #6c5ffc;
  --auth-primary-dark: #5546e8;
  --auth-primary-soft: #eeecff;
  --auth-accent: #ff9f43;
  --auth-ink: #1c1c3c;
  --auth-body: #5b5f7b;
  --auth-muted: #8b8fa7;
  --auth-line: #e5e7f2;
  --auth-danger: #e0384f;
  --auth-success: #16a877;
  --auth-radius: 16px;
  --auth-shadow: 0 24px 60px -20px rgba(28, 28, 60, .28);
}

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

html,
body {
  height: 100%;
}

body.auth-body {
  margin: 0;
  min-height: 100%;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  font-size: 15px;
  line-height: 1.55;
  color: var(--auth-body);
  background: #f4f5fb;
  -webkit-font-smoothing: antialiased;
}

/* ------------------------------------------------------------------ shell */

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

/* --------------------------------------------------------- brand (left) */

.auth-brand {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 56px 60px;
  color: #fff;
  background:
    radial-gradient(1100px 520px at 12% 8%, rgba(255, 255, 255, .18), transparent 62%),
    linear-gradient(145deg, #5b4bf5 0%, #6c5ffc 42%, #9a6bff 100%);
}

/* soft mandala-ish rings, drawn in CSS so there is no extra image request */
.auth-brand::before,
.auth-brand::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .16);
  pointer-events: none;
}

.auth-brand::before {
  width: 620px;
  height: 620px;
  right: -230px;
  bottom: -260px;
  box-shadow:
    inset 0 0 0 60px rgba(255, 255, 255, .05),
    inset 0 0 0 120px rgba(255, 255, 255, .04);
}

.auth-brand::after {
  width: 300px;
  height: 300px;
  left: -120px;
  top: 18%;
  border-style: dashed;
  opacity: .5;
}

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

.auth-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #fff;
}

.auth-logo img {
  max-height: 46px;
  max-width: 190px;
  width: auto;
  display: block;
}

.auth-logo .auth-wordmark {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: .3px;
}

.auth-brand-copy {
  max-width: 460px;
  padding: 40px 0;
}

.auth-eyebrow {
  display: inline-block;
  margin-bottom: 18px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .22);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .8px;
  text-transform: uppercase;
}

.auth-brand-copy h2 {
  margin: 0 0 14px;
  font-size: 34px;
  line-height: 1.22;
  font-weight: 700;
  color: #fff;
}

.auth-brand-copy p {
  margin: 0;
  font-size: 15.5px;
  color: rgba(255, 255, 255, .82);
}

.auth-points {
  list-style: none;
  margin: 30px 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.auth-points li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14.5px;
  color: rgba(255, 255, 255, .9);
}

.auth-points svg {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  opacity: .95;
}

.auth-brand-foot {
  font-size: 13px;
  color: rgba(255, 255, 255, .7);
}

/* ----------------------------------------------------------- form (right) */

.auth-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 32px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 40px 38px 34px;
  background: #fff;
  border: 1px solid var(--auth-line);
  border-radius: var(--auth-radius);
  box-shadow: var(--auth-shadow);
}

.auth-card-logo {
  display: none;
  margin-bottom: 22px;
  text-align: center;
}

.auth-card-logo img {
  max-height: 44px;
  max-width: 170px;
}

/* shown only if the logo image cannot be loaded */
.auth-wordmark-sm {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .3px;
  color: var(--auth-primary);
}

.auth-card h1 {
  margin: 0 0 6px;
  font-size: 24px;
  font-weight: 700;
  color: var(--auth-ink);
  letter-spacing: -.2px;
}

.auth-card .auth-sub {
  margin: 0 0 26px;
  font-size: 14.5px;
  color: var(--auth-muted);
}

/* alerts ------------------------------------------------------------------ */

.auth-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 22px;
  padding: 12px 14px;
  border-radius: 11px;
  font-size: 14px;
  border: 1px solid transparent;
}

.auth-alert svg {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 1px;
}

.auth-alert-danger {
  color: #93132a;
  background: #fdecef;
  border-color: #f7ccd4;
}

.auth-alert-warning {
  color: #8a5300;
  background: #fff5e6;
  border-color: #ffe0b2;
}

/* fields ------------------------------------------------------------------ */

.auth-field {
  margin-bottom: 18px;
}

.auth-field label {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--auth-ink);
}

.auth-input {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input .auth-icon {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  color: var(--auth-muted);
  pointer-events: none;
}

.auth-input input {
  width: 100%;
  height: 48px;
  padding: 0 14px 0 44px;
  font: inherit;
  font-size: 15px;
  color: var(--auth-ink);
  background: #fbfbfe;
  border: 1px solid var(--auth-line);
  border-radius: 11px;
  outline: 0;
  transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}

.auth-input input::placeholder {
  color: #adb1c6;
}

.auth-input input:hover {
  border-color: #d3d6ea;
}

.auth-input input:focus {
  background: #fff;
  border-color: var(--auth-primary);
  box-shadow: 0 0 0 4px rgba(108, 95, 252, .14);
}

.auth-input.has-toggle input {
  padding-right: 46px;
}

.auth-toggle {
  position: absolute;
  right: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  color: var(--auth-muted);
  background: transparent;
  border: 0;
  border-radius: 9px;
  cursor: pointer;
  transition: color .16s ease, background-color .16s ease;
}

.auth-toggle:hover {
  color: var(--auth-primary);
  background: var(--auth-primary-soft);
}

.auth-toggle svg {
  width: 18px;
  height: 18px;
}

.auth-toggle .icon-hide {
  display: none;
}

.auth-toggle.is-on .icon-show {
  display: none;
}

.auth-toggle.is-on .icon-hide {
  display: block;
}

.auth-hint {
  margin: 7px 0 0;
  font-size: 12.5px;
  color: var(--auth-muted);
}

.auth-hint.is-error {
  color: var(--auth-danger);
}

/* row + button ------------------------------------------------------------ */

.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0 24px;
}

.auth-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--auth-body);
  cursor: pointer;
  user-select: none;
}

.auth-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--auth-primary);
  cursor: pointer;
}

.auth-link {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--auth-primary);
  text-decoration: none;
}

.auth-link:hover {
  text-decoration: underline;
}

.auth-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 48px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--auth-primary) 0%, #8b6bff 100%);
  border: 0;
  border-radius: 11px;
  cursor: pointer;
  box-shadow: 0 10px 22px -10px rgba(108, 95, 252, .85);
  transition: transform .14s ease, box-shadow .14s ease, filter .14s ease;
}

.auth-btn:hover {
  filter: brightness(1.04);
  box-shadow: 0 14px 26px -10px rgba(108, 95, 252, .9);
}

.auth-btn:active {
  transform: translateY(1px);
}

.auth-btn:focus-visible {
  outline: 3px solid rgba(108, 95, 252, .35);
  outline-offset: 2px;
}

.auth-btn[disabled] {
  cursor: default;
  filter: saturate(.7);
  opacity: .85;
}

.auth-spinner {
  display: none;
  width: 17px;
  height: 17px;
  border: 2px solid rgba(255, 255, 255, .45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: auth-spin .7s linear infinite;
}

.auth-btn.is-busy .auth-spinner {
  display: block;
}

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

/* status page ------------------------------------------------------------- */

.auth-status-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 74px;
  height: 74px;
  margin: 0 auto 22px;
  border-radius: 50%;
  color: var(--auth-success);
  background: #e6f8f1;
}

.auth-status-icon svg {
  width: 36px;
  height: 36px;
}

.auth-centered {
  text-align: center;
}

.auth-centered .auth-sub {
  margin-bottom: 26px;
}

/* footer ------------------------------------------------------------------ */

.auth-foot {
  margin: 26px 0 0;
  font-size: 12.5px;
  color: var(--auth-muted);
  text-align: center;
}

.auth-foot a {
  color: var(--auth-muted);
  text-decoration: none;
}

.auth-foot a:hover {
  color: var(--auth-primary);
}

/* ------------------------------------------------------------ responsive */

@media (max-width: 1100px) {
  .auth-brand {
    padding: 46px 42px;
  }

  .auth-brand-copy h2 {
    font-size: 29px;
  }
}

@media (max-width: 900px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-brand {
    display: none;
  }

  .auth-card-logo {
    display: block;
  }

  .auth-main {
    padding: 32px 20px;
    min-height: 100vh;
    background:
      radial-gradient(900px 380px at 50% -12%, rgba(108, 95, 252, .16), transparent 70%),
      #f4f5fb;
  }
}

@media (max-width: 480px) {
  .auth-card {
    padding: 30px 22px 26px;
    border-radius: 14px;
    box-shadow: 0 16px 40px -22px rgba(28, 28, 60, .35);
  }

  .auth-card h1 {
    font-size: 21px;
  }
}

@media (prefers-reduced-motion: reduce) {

  .auth-btn,
  .auth-input input,
  .auth-toggle {
    transition: none;
  }

  .auth-spinner {
    animation-duration: 2s;
  }
}
