/* Townsay public authentication pages */
:root {
  --auth-blue: #0869f6;
  --auth-ink: #11182f;
  --auth-muted: #748099;
  --auth-border: #c9cfda;
}

html.auth-page,
body.auth-page {
  min-height: 100%;
}

body.auth-page {
  margin: 0;
  background: #11182f;
  color: var(--auth-ink);
  font-family: 'Poppins', Arial, sans-serif;
}

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

.auth-screen {
  position: relative;
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  align-items: center;
  justify-content: center;
  padding: 38px 24px;
  overflow: hidden;
  background-image: linear-gradient(180deg, rgba(8, 13, 28, .08), rgba(5, 8, 18, .28)), url('../theme/images/sign_in_desktop_view.png');
  background-position: center;
  background-size: cover;
}

.auth-shell {
  position: relative;
  z-index: 1;
  width: min(100%, 380px);
}

.auth-brand {
  margin-bottom: 12px;
  color: #fff;
  text-align: center;
  text-decoration: none;
}

.auth-brand:hover,
.auth-brand:focus {
  color: #fff;
  text-decoration: none;
}

.auth-brand img {
  display: block;
  width: 100px;
  height: 64px;
  margin: 0 auto 7px;
  object-fit: contain;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, .28));
}

.auth-brand-name {
  display: block;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -.9px;
  line-height: 1.1;
}

.auth-brand-tagline {
  display: block;
  margin-top: 4px;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: -.2px;
}

.auth-card {
  position: relative;
  padding: 0px 40px 30px;
  border: 1px solid rgba(255, 255, 255, .75);
  border-radius: 24px;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 18px 45px rgba(0, 0, 0, .25);
}

.auth-card--signup {
  padding: 0px 28px 16px;
}

.auth-card--signup .auth-heading {
  font-size: 23px;
}

.auth-card--signup .auth-intro {
  margin: 4px 0 13px;
  font-size: 13px;
  line-height: 1.35;
}

.auth-card--signup .auth-field {
  margin-bottom: 5px;
}

.auth-card--signup .auth-label {
  margin-bottom: 4px;
  font-size: 14px;
}

.auth-card--signup .auth-input {
  min-height: 40px;
  padding-top: 9px;
  padding-bottom: 9px;
  font-size: 14px;
}

.auth-card--signup .auth-password-toggle {
  width: 34px;
  height: 34px;
}

.auth-card--signup .auth-captcha {
  margin: 4px 0 6px;
}

.auth-card--signup .auth-terms {
  gap: 8px;
  margin-bottom: 11px;
  font-size: 12px;
  line-height: 1.4;
}

.auth-card--signup .auth-check {
  width: 17px;
  min-width: 17px;
  height: 17px;
}

.auth-card--signup .auth-primary-button,
.auth-card--signup .auth-primary-button.btn.btn-primary,
.auth-card--signup .auth-google-button {
  min-height: 42px;
  font-size: 14px;
}

.auth-card--signup .auth-divider {
  margin: 11px 0;
}

.auth-card--signup .auth-switch {
  margin-top: 13px;
  font-size: 12px;
}

@media (min-width: 768px) {
  .auth-screen {
    padding: 22px 24px;
  }
}

.auth-heading {
  margin: 0;
  color: var(--auth-ink);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -.75px;
  line-height: 1.18;
}

.auth-intro {
  margin: 6px 0 20px;
  color: var(--auth-muted);
  font-size: 15px;
  line-height: 1.45;
}

.auth-message {
  margin: 0 0 14px;
  color: #cf2538;
  font-size: 13px;
  line-height: 1.45;
}

.auth-card .alert {
  position: relative;
  margin: 0 0 14px;
  padding: 10px 35px 10px 12px;
  border: 1px solid #f2b9c0;
  border-radius: 8px;
  background: #fff2f3;
  color: #a51d2e;
  font-size: 13px;
}

.auth-card .alert-success {
  border-color: #b9dec7;
  background: #f1fbf4;
  color: #176c35;
}

.auth-card .alert .close {
  position: absolute;
  top: 3px;
  right: 7px;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 21px;
  line-height: 1;
}

.auth-card #loder {
  position: absolute;
  z-index: 2;
  inset: 0;
  background: rgba(255, 255, 255, .72);
}

.auth-card #loder img {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 36px;
  transform: translate(-50%, -50%);
}

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

.auth-label {
  display: block;
  margin: 0 0 6px;
  color: var(--auth-ink);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.25;
}

.auth-input-wrap {
  position: relative;
}

.auth-page .auth-input {
  display: block;
  width: 100%;
  min-height: 51px;
  padding: 12px 15px;
  border: 1px solid var(--auth-border);
  border-radius: 10px;
  outline: 0;
  background: rgba(255, 255, 255, .92);
  box-shadow: none;
  color: var(--auth-ink);
  font-family: inherit;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.25;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.auth-page .auth-input::placeholder {
  color: #8791a5;
  opacity: 1;
}

.auth-page .auth-input:focus {
  border-color: var(--auth-blue);
  box-shadow: 0 0 0 3px rgba(8, 105, 246, .13);
}

.auth-input-wrap .auth-input {
  padding-right: 48px;
}

.auth-password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  width: 38px;
  height: 38px;
  padding: 0;
  transform: translateY(-50%);
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #7c8595;
  cursor: pointer;
  font-size: 16px;
}

.auth-password-toggle:hover,
.auth-password-toggle:focus {
  background: #eef4ff;
  color: var(--auth-blue);
  outline: 0;
}

.auth-password-toggle .fa-eye {
  display: none;
}

.auth-password-toggle.is-visible .fa-eye-slash {
  display: none;
}

.auth-password-toggle.is-visible .fa-eye {
  display: inline-block;
}

.auth-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 24px;
  margin: -3px 0 14px;
}

.auth-link {
  color: var(--auth-blue);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.auth-link:hover,
.auth-link:focus {
  color: #0057d8;
  text-decoration: underline;
}

.auth-terms {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 1px 0 17px;
  color: #273047;
  font-size: 13px;
  line-height: 1.5;
}

.auth-page .auth-check {
  width: 19px;
  min-width: 19px;
  height: 19px;
  margin: 1px 0 0;
  appearance: auto;
  accent-color: var(--auth-blue);
  cursor: pointer;
}

.auth-terms label {
  margin: 0;
  cursor: pointer;
}

.auth-captcha {
  display: flex;
  justify-content: center;
  margin: 4px 0 15px;
}

.auth-primary-button,
.auth-page .auth-primary-button.btn.btn-primary {
  display: inline-flex;
  width: 100%;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  padding: 11px 20px;
  border: 1px solid var(--auth-blue);
  border-radius: 999px;
  background: var(--auth-blue);
  box-shadow: 0 5px 12px rgba(8, 105, 246, .18);
  color: #fff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  transition: background .15s ease, transform .15s ease;
}

.auth-primary-button:hover,
.auth-primary-button:focus,
.auth-page .auth-primary-button.btn.btn-primary:hover,
.auth-page .auth-primary-button.btn.btn-primary:focus {
  border-color: #005bdb;
  background: #005bdb;
  color: #fff;
  outline: 0;
  transform: translateY(-1px);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: #8490a5;
  font-size: 12px;
  font-weight: 500;
}

.auth-divider::before,
.auth-divider::after {
  width: 100%;
  height: 1px;
  content: '';
  background: #d4d9e1;
}

.auth-page .auth-google-button,
.auth-page form .button.auth-google-button {
  display: flex;
  width: 100%;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 11px;
  margin: 0;
  padding: 11px 16px;
  border: 1px solid #bfc6d1;
  border-radius: 999px;
  background: #fff;
  color: var(--auth-ink);
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
}

.auth-page .auth-google-button:hover,
.auth-page .auth-google-button:focus {
  border-color: #8794a8;
  background: #f7f9fc;
  color: var(--auth-ink);
  outline: 0;
  text-decoration: none;
}

.auth-google-button .img {
  width: 22px;
  max-width: 22px;
  height: 22px;
  margin: 0;
  object-fit: contain;
}

.auth-google-button .fa-google {
  color: #4285f4;
  font-size: 21px;
}

.auth-switch {
  margin: 20px 0 0;
  color: #7d879a;
  font-size: 14px;
  line-height: 1.4;
  text-align: center;
}

.auth-switch .auth-link {
  margin-left: 3px;
}

.auth-page .parsley-errors-list {
  margin: 5px 0 0;
  padding: 0;
  color: #cf2538;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.35;
  list-style: none;
}

.auth-page .parsley-error {
  border-color: #cf2538;
}

.auth-page .parsley-success {
  border-color: #28a15d;
}

@media (max-width: 767px) {
  .auth-screen {
    align-items: flex-start;
    padding: 12px 16px 28px;
    background-image: linear-gradient(180deg, rgba(6, 10, 20, .05), rgba(4, 7, 16, .28)), url('../theme/images/sign_in_mobile_view.png');
    background-position: center top;
  }

  .auth-shell {
    width: min(100%, 520px);
  }

  .auth-brand {
    margin-bottom: 56px;
  }

  .auth-brand img {
    width: 200px;
    height: 128px;
    margin-bottom: 8px;
  }

  .auth-brand-name {
    font-size: 39px;
  }

  .auth-brand-tagline {
    font-size: 19px;
  }

  .auth-card {
    padding: 0px 30px 31px;
    border-radius: 25px;
  }

  .auth-heading {
    font-size: 31px;
  }

  .auth-card--signup {
    padding: 34px 30px 31px;
  }

  .auth-card--signup .auth-heading {
    font-size: 31px;
  }

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

  .auth-card--signup .auth-label {
    margin-bottom: 8px;
    font-size: 16px;
  }

  .auth-card--signup .auth-input {
    min-height: 58px;
    padding-top: 12px;
    padding-bottom: 12px;
    font-size: 16px;
  }

  .auth-card--signup .auth-captcha {
    margin: 4px 0 15px;
  }

  .auth-card--signup .auth-terms {
    gap: 10px;
    margin-bottom: 20px;
    font-size: 15px;
    line-height: 1.5;
  }

  .auth-card--signup .auth-check {
    width: 22px;
    min-width: 22px;
    height: 22px;
  }

  .auth-card--signup .auth-primary-button,
  .auth-card--signup .auth-primary-button.btn.btn-primary,
  .auth-card--signup .auth-google-button {
    min-height: 59px;
    font-size: 17px;
  }

  .auth-card--signup .auth-divider {
    margin: 18px 0;
  }

  .auth-card--signup .auth-switch {
    margin-top: 24px;
    font-size: 15px;
  }

  .auth-intro {
    display: none;
  }

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

  .auth-label {
    margin-bottom: 8px;
    font-size: 16px;
  }

  .auth-page .auth-input {
    min-height: 58px;
    border-radius: 11px;
    font-size: 16px;
  }

  .auth-page .parsley-errors-list {
    margin-top: 6px;
    font-size: 15px;
  }

  .auth-terms {
    margin-top: 4px;
    margin-bottom: 20px;
    font-size: 15px;
  }

  .auth-page .auth-check {
    width: 22px;
    min-width: 22px;
    height: 22px;
  }

  .auth-primary-button,
  .auth-page .auth-primary-button.btn.btn-primary,
  .auth-page .auth-google-button,
  .auth-page form .button.auth-google-button {
    min-height: 59px;
    font-size: 17px;
  }

  .auth-switch {
    margin-top: 24px;
    font-size: 15px;
  }
}

@media (max-width: 420px) {
  .auth-screen {
    padding-right: 12px;
    padding-left: 12px;
  }

  .auth-brand {
    margin-bottom: 42px;
  }

  .auth-brand-name {
    font-size: 35px;
  }

  .auth-brand-tagline {
    font-size: 17px;
  }

  .auth-card {
    padding: 0px 22px 26px;
  }

  .auth-heading {
    font-size: 29px;
  }

  .auth-captcha {
    justify-content: flex-start;
    height: 72px;
    overflow: visible;
  }

  .auth-captcha .g-recaptcha {
    transform: scale(.93);
    transform-origin: left top;
  }
}

@media (max-width: 340px) {
  .auth-captcha .g-recaptcha {
    transform: scale(.8);
  }
}

/* Login: compact, single-screen layout (no logo / intro) */
.auth-card--login { padding: 28px 36px 22px; }
.auth-card--login .form-title { margin-bottom: 16px; }
.auth-card--login .auth-field { margin-bottom: 12px; }
.auth-card--login .auth-terms { margin: 10px 0 14px; }
.auth-card--login .auth-divider { margin: 12px 0; }
@media (max-width: 767px) {
  .auth-screen:has(.auth-card--login) { align-items: center; padding: 16px; }
  .auth-card--login { padding: 24px 22px 20px; }
  .auth-card--login .auth-heading { font-size: 26px; }
}
