/* Auth-only visuals — scoped to .layout-auth (LK/profile untouched) */

@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope/Manrope-VariableFont_wght.ttf") format("truetype");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Century Gothic";
  src: url("../fonts/century-gothic/centurygothic.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Century Gothic";
  src: url("../fonts/century-gothic/centurygothic_bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

.layout-auth {
  --auth-primary: #3f3fe6;
  --auth-primary-h: #3535c9;
  --auth-input-border: #f1f2ff;
  --auth-oauth-bg: #f8f8fe;
  --auth-text: #1d1d1f;
  --auth-text-2: #6e6e73;
  --auth-card-radius: 24px;
  --auth-pill: 50px;
  --auth-field-h: 35px;
  --auth-submit-w: 49px;
  position: relative;
  overflow: hidden;
  font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f5f5f8;
}

.auth-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: url("../img/auth/bg.jpg") center / cover no-repeat;
}

.layout-auth .card.auth-card {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 400px;
  min-height: 0;
  padding: 33px 30px 30px;
  border-radius: var(--auth-card-radius);
  box-shadow: 0 4px 24px rgba(63, 63, 230, 0.06);
  border: none;
  background: #fff;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
}

.auth-logo-icon {
  width: 46px;
  height: 43px;
  flex-shrink: 0;
}

.auth-logo-text {
  font-family: "Century Gothic", "CenturyGothic", sans-serif;
  font-size: 40px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.5px;
  color: var(--auth-primary);
}

.auth-title {
  text-align: center;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.2px;
  color: var(--auth-text);
  margin-bottom: 12px;
}

.auth-verify-lead {
  text-align: center;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
  color: #000;
  margin-bottom: 6px;
}

.auth-verify-email {
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
  color: #000;
  margin-bottom: 16px;
  word-break: break-all;
}

.auth-verify-mode {
  text-align: center;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.2;
  color: #000;
  margin-bottom: 12px;
}

.layout-auth .field {
  margin-bottom: 0;
}

.layout-auth .field-label {
  font-size: 14px;
  font-weight: 400;
  color: var(--auth-text-2);
  margin-bottom: 4px;
}

.auth-email-row {
  position: relative;
}

.auth-email-shell {
  position: relative;
  box-sizing: border-box;
  height: var(--auth-field-h);
  border: none;
  border-radius: var(--auth-pill);
  background: #fff;
  overflow: hidden;
  box-shadow: inset 0 0 0 2px var(--auth-input-border);
  transition: box-shadow 0.15s;
}

.auth-email-row.is-active:not(.is-error) .auth-email-shell {
  box-shadow: inset 0 0 0 2px var(--auth-primary);
}

.auth-email-row.is-error .auth-email-shell {
  box-shadow: inset 0 0 0 2px #ff5252;
}

.auth-email-shell input[type="email"] {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0 calc(var(--auth-submit-w) + 14px) 0 18px;
  border: none;
  border-radius: 0;
  font-size: 15px;
  font-family: inherit;
  background: transparent;
  box-shadow: none;
}

.auth-email-shell input[type="email"]:focus {
  outline: none;
  box-shadow: none;
}

.layout-auth input[type="email"]:focus,
.layout-auth input[type="password"]:focus,
.layout-auth input[type="text"]:focus {
  box-shadow: none;
}

.auth-submit-btn {
  position: absolute;
  top: 0;
  right: 0;
  width: var(--auth-submit-w);
  height: 100%;
  padding: 0;
  border: none;
  border-radius: 20px 0 0 20px;
  background: var(--auth-primary);
  opacity: 0;
  pointer-events: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease;
}

.auth-email-row.is-active .auth-submit-btn {
  width: calc(var(--auth-submit-w) + 2px);
  opacity: 1;
  pointer-events: auto;
}

.auth-submit-btn:hover {
  background: var(--auth-primary-h);
}

.auth-submit-btn img {
  display: block;
  width: 20px;
  height: 16px;
}

.auth-subtitle {
  text-align: center;
  font-size: 14px;
  line-height: 1.45;
  color: var(--auth-text-2);
  margin: -12px 0 24px;
}

.auth-subtitle strong {
  color: var(--auth-text);
  font-weight: 600;
}

/* OAuth / social: consent card (base auth width) */
.auth-card--consent .auth-title {
  font-family: "Century Gothic", "CenturyGothic", sans-serif;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
  color: #000;
  margin-bottom: 1rem;
}

.auth-consent-lead {
  margin: 0 0 1.25rem;
  text-align: center;
  font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: 0;
  color: #000;
}

.auth-consent-lead__email,
.auth-consent-lead strong {
  font-weight: 700;
  color: #000;
}

.auth-consents--compact {
  margin: 0 0 1.25rem;
}

.auth-consents--compact .auth-check {
  margin-bottom: 0.75rem;
}

.auth-consents--compact .auth-check:last-child {
  margin-bottom: 0;
}

.auth-card--consent .auth-check-text {
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.45;
  color: #000;
}

.auth-card--consent .auth-check-text a {
  font-weight: 400;
}

.auth-form--consent .auth-btn-primary--consent {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  margin-top: 0;
  min-height: 2.1875rem;
  padding: 0.5rem 1.125rem;
  font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0;
}

.auth-form--consent .auth-btn-primary--consent img {
  display: block;
  flex-shrink: 0;
}

.auth-field-row {
  position: relative;
}

.auth-field-shell {
  position: relative;
  box-sizing: border-box;
  height: var(--auth-field-h);
  border: none;
  border-radius: var(--auth-pill);
  background: #fff;
  overflow: hidden;
  box-shadow: inset 0 0 0 2px var(--auth-input-border);
  transition: box-shadow 0.15s;
}

.auth-field-row.is-active .auth-field-shell {
  box-shadow: inset 0 0 0 2px var(--auth-primary);
}

.auth-field-shell input {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0 18px;
  border: none;
  border-radius: 0;
  font-size: 15px;
  font-family: inherit;
  background: transparent;
  box-shadow: none;
}

.auth-field-shell input:focus {
  outline: none;
  box-shadow: none;
}

.auth-field-code {
  width: 100%;
}

.auth-otp-row {
  width: 100%;
  margin-bottom: 4px;
}

.auth-otp-shell {
  position: relative;
  width: 100%;
  max-width: 282px;
  height: 56px;
  margin: 0 auto;
  cursor: text;
  border-radius: 15px;
}

.auth-otp-slots {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 39px;
  padding: 0 12px;
  box-sizing: border-box;
  pointer-events: none;
  z-index: 1;
}

.auth-otp-slot {
  position: relative;
  width: 6px;
  height: 26px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-otp-dot {
  display: block;
  width: 6px;
  height: 6px;
}

.auth-otp-dot[hidden] {
  display: none;
}

.auth-otp-digit {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  min-width: 16px;
  font-size: 26px;
  font-weight: 600;
  line-height: 1;
  color: #000;
  text-align: center;
}

.auth-otp-slot.is-caret::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 2px;
  height: 26px;
  margin-left: -1px;
  margin-top: -13px;
  background: var(--auth-primary);
  animation: auth-caret-blink 1s step-end infinite;
}

.auth-otp-slot.is-filled.is-caret::after {
  display: none;
}

@keyframes auth-caret-blink {
  50% {
    opacity: 0;
  }
}

.auth-otp-shell .auth-otp-input {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  opacity: 0;
  color: transparent;
  -webkit-text-fill-color: transparent;
  caret-color: transparent;
  font-size: 1px;
  letter-spacing: 0;
  z-index: 2;
  box-shadow: none;
  -moz-appearance: textfield;
}

.auth-otp-shell .auth-otp-input:focus {
  outline: none;
  box-shadow: none;
}

.auth-otp-shell .auth-otp-input:-webkit-autofill,
.auth-otp-shell .auth-otp-input:-webkit-autofill:hover,
.auth-otp-shell .auth-otp-input:-webkit-autofill:focus {
  -webkit-text-fill-color: transparent;
  transition: background-color 99999s ease-out 0s;
}

.auth-otp-shell .auth-otp-input::-webkit-outer-spin-button,
.auth-otp-shell .auth-otp-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.auth-otp-row.is-active:not(.is-error) .auth-otp-shell,
.auth-otp-row.is-focused:not(.is-error) .auth-otp-shell {
  box-shadow: inset 0 0 0 2px var(--auth-primary);
}

.auth-otp-row.is-error .auth-otp-shell {
  box-shadow: inset 0 0 0 2px #ff5252;
}

.auth-otp-row.is-error.is-active .auth-otp-shell,
.auth-otp-row.is-error.is-focused .auth-otp-shell {
  box-shadow: inset 0 0 0 2px #ff5252;
}

.auth-btn-primary {
  display: block;
  width: 100%;
  height: var(--auth-field-h);
  margin-top: 20px;
  padding: 0 18px;
  border: none;
  border-radius: var(--auth-pill);
  background: var(--auth-primary);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s;
}

.auth-btn-primary:hover {
  background: var(--auth-primary-h);
}

.auth-consents {
  margin: 16px 0 4px;
}

.auth-consent-err {
  display: block;
  margin: -8px 0 10px 30px;
}

/* Custom consent checkboxes */
.layout-auth .auth-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 12px;
  cursor: pointer;
}

.layout-auth .auth-check-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.layout-auth .auth-check-box {
  flex-shrink: 0;
  box-sizing: border-box;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  border: 2px solid var(--auth-primary);
  border-radius: 5px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s;
}

.layout-auth .auth-check-icon {
  display: block;
  width: 12px;
  height: 10px;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.12s, transform 0.12s;
}

.layout-auth .auth-check-input:checked + .auth-check-box {
  background: var(--auth-primary);
  border-color: var(--auth-primary);
}

.layout-auth .auth-check-input:checked + .auth-check-box .auth-check-icon {
  opacity: 1;
  transform: scale(1);
}

.layout-auth .auth-check-input:focus-visible + .auth-check-box {
  outline: 2px solid var(--auth-primary);
  outline-offset: 2px;
}

.layout-auth .auth-check-text {
  font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: -0.05em;
  color: var(--auth-text);
}

.layout-auth .auth-check-text a {
  color: var(--auth-primary);
  text-decoration: none;
}

.layout-auth .auth-check-text a:hover {
  text-decoration: underline;
}

.auth-inline-form {
  display: block;
  margin: 0;
}

.auth-verify-body {
  display: flex;
  flex-direction: column;
}

/* Registration: footer directly under consents */
.auth-verify-body--register .auth-verify-footer {
  margin-top: 16px;
}

.auth-code-help-back {
  margin-top: 24px;
  text-align: center;
}

.auth-password-body {
  width: 100%;
}

.auth-field-password {
  margin-bottom: 0;
}

.auth-password-field-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.auth-password-field-head .field-label {
  margin-bottom: 0;
}

.auth-password-error-msg {
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
  color: #ff5252;
  text-align: right;
}

.auth-password-row {
  position: relative;
}

.auth-password-shell {
  box-shadow: inset 0 0 0 2px var(--auth-input-border);
}

.auth-password-row.is-active:not(.is-error) .auth-password-shell {
  box-shadow: inset 0 0 0 2px var(--auth-primary);
}

.auth-password-row.is-error .auth-password-shell {
  box-shadow: inset 0 0 0 2px #ff5252;
}

.auth-password-shell input[type="password"],
.auth-password-shell input[type="text"] {
  padding-right: calc(17px + 22px + 12px);
}

.auth-password-toggle {
  position: absolute;
  top: 50%;
  right: 17px;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 32px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}

.auth-password-toggle img {
  display: block;
}

.auth-password-toggle img[hidden] {
  display: none;
}

.auth-password-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.auth-submit-next {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 20px;
  background: var(--auth-primary);
  cursor: pointer;
}

.auth-submit-next:hover {
  background: var(--auth-primary-h);
}

.auth-submit-next img {
  display: block;
  width: 20px;
  height: 16px;
}

.auth-verify-resend {
  margin-top: 0;
  text-align: center;
}

.auth-verify-resend-btn {
  background: none;
  border: none;
  padding: 0;
  font-family: "Manrope", inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
  color: #999;
  cursor: pointer;
}

.auth-verify-resend-btn:disabled {
  cursor: default;
}

.auth-verify-resend-btn:not(:disabled):hover {
  color: var(--auth-primary);
}

.auth-verify-footer {
  position: relative;
  display: grid;
  grid-template-columns: 45px 1fr 45px;
  align-items: center;
  margin-top: 20px;
  min-height: 32px;
}

.auth-back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 32px;
  border-radius: 20px;
  background: #f1f2ff;
  text-decoration: none;
  flex-shrink: 0;
}

.auth-back-btn:hover {
  background: #e8e9fc;
}

.auth-footer-center-link {
  grid-column: 2;
  justify-self: center;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
  color: var(--auth-primary);
  text-decoration: none;
}

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


.layout-auth .divider {
  margin: 20px 0 16px;
  font-size: 16px;
  font-weight: 700;
  color: var(--auth-text);
  letter-spacing: 0;
}

.layout-auth .divider::before,
.layout-auth .divider::after {
  background: #e8e8ed;
}

.layout-auth .oauth-list {
  flex-direction: row;
  justify-content: space-between;
  gap: 8px;
}

.layout-auth .oauth-btn {
  flex: 1;
  min-width: 0;
  max-width: 106px;
  height: 40px;
  padding: 0 8px;
  margin: 0 auto;
  border: 2px solid var(--auth-primary);
  border-radius: 20px;
  background: var(--auth-oauth-bg);
  cursor: pointer;
  opacity: 1;
  text-decoration: none;
  position: relative;
}

.layout-auth .oauth-btn:hover {
  background: #eeeefc;
}

.layout-auth .oauth-btn .oauth-icon {
  position: absolute;
  inset: 0;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: 20px;
  max-width: 85%;
  border-radius: 0;
  background: transparent;
}

.layout-auth .oauth-btn .oauth-icon img {
  display: block;
  height: 20px;
  width: auto;
  max-width: 100%;
}

@media (max-width: 420px) {
  .layout-auth .card.auth-card {
    padding: 28px 20px 24px;
  }

  .layout-auth .oauth-list {
    gap: 6px;
  }

  .layout-auth .oauth-btn {
    max-width: none;
  }
}
