/* =========================================================================
   BD HOst - login / register / password pages
   Everything is scoped under .au-page so the admin login (which uses its own
   old markup) is not touched at all.
   Palette is the theme's own:
     primary #6777ef | dark #34395e | muted #6c757d | danger #fc544b
     warning #ffa426 | info #3abaf4 | success #47c363
   ========================================================================= */

.au-page {
  --au-primary: #6777ef;
  --au-primary-dark: #4c5ce0;
  --au-primary-soft: rgba(103, 119, 239, 0.08);
  --au-dark: #34395e;
  --au-muted: #6c757d;
  --au-danger: #fc544b;
  --au-warning: #ffa426;
  --au-success: #47c363;
  --au-line: #e6e9f4;
  --au-field: #f7f8fc;
}

/* the old loader can never come back */
#loader,
#page-overlay,
.loader-wrapper-outer,
.lds-double-ring {
  display: none !important;
}

body:has(.au-page) {
  background: #f6f6f6;
}

.au-page {
  min-height: 100vh;
  display: flex;
  background: #f6f6f6;
  color: var(--au-dark);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* ---------------- left brand side ---------------- */
.au-side {
  width: 46%;
  max-width: 620px;
  position: relative;
  overflow: hidden;
  padding: 48px 52px;
  display: flex;
  flex-direction: column;
  color: #fff;
  background: linear-gradient(150deg, #7383f2 0%, var(--au-primary) 42%, var(--au-primary-dark) 100%);
}

.au-side:before,
.au-side:after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.au-side:before {
  width: 520px;
  height: 520px;
  right: -190px;
  top: -190px;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0) 68%);
}

.au-side:after {
  width: 420px;
  height: 420px;
  left: -150px;
  bottom: -170px;
  background: radial-gradient(circle at 60% 40%, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0) 70%);
}

.au-side-grid {
  position: absolute;
  inset: 0;
  opacity: 0.16;
  background-image: linear-gradient(rgba(255, 255, 255, 0.6) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.6) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 30% 20%, #000 10%, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse at 30% 20%, #000 10%, transparent 72%);
}

.au-side > * {
  position: relative;
  z-index: 2;
}

.au-logo img {
  max-height: 42px;
  max-width: 190px;
  width: auto;
  filter: brightness(0) invert(1);
}

.au-side-mid {
  margin-top: auto;
  margin-bottom: auto;
  padding: 34px 0;
}

.au-side h1 {
  font-size: 33px;
  line-height: 1.22;
  font-weight: 800;
  letter-spacing: -0.7px;
  margin: 0 0 14px;
  color: #fff;
}

.au-side h1 span {
  display: block;
  color: rgba(255, 255, 255, 0.66);
  font-weight: 700;
}

.au-side p.au-lead {
  font-size: 14.5px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.82);
  margin: 0 0 30px;
  max-width: 420px;
}

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

.au-feats li {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  font-size: 13.5px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.94);
}

.au-feats i {
  width: 34px;
  min-width: 34px;
  height: 34px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.17);
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 14px;
}

.au-feats strong {
  display: block;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 1px;
}

.au-feats small {
  color: rgba(255, 255, 255, 0.66);
  font-size: 12.5px;
}

.au-side-foot {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.6);
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.au-side-foot a {
  color: rgba(255, 255, 255, 0.86);
  text-decoration: none;
}

.au-side-foot a:hover {
  color: #fff;
  text-decoration: underline;
}

/* ---------------- right form side ---------------- */
.au-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  min-width: 0;
}

.au-card {
  width: 100%;
  max-width: 440px;
  animation: auRise 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.au-card.au-wide {
  max-width: 560px;
}

@keyframes auRise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .au-card {
    animation: none;
  }
}

.au-mob-logo {
  display: none;
  margin-bottom: 22px;
}

.au-mob-logo img {
  max-height: 40px;
  max-width: 170px;
}

.au-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--au-primary);
  background: var(--au-primary-soft);
  border: 1px solid rgba(103, 119, 239, 0.16);
  padding: 5px 11px;
  border-radius: 20px;
  margin-bottom: 14px;
}

.au-card h2 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.6px;
  color: var(--au-dark);
  margin: 0 0 7px;
}

.au-card > p.au-sub {
  color: var(--au-muted);
  font-size: 13.5px;
  line-height: 1.6;
  margin: 0 0 26px;
}

/* fields */
.au-field {
  margin-bottom: 17px;
}

.au-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 15px;
}

.au-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--au-dark);
  margin-bottom: 7px;
}

.au-label a {
  font-size: 12px;
  font-weight: 700;
  color: var(--au-primary);
  text-decoration: none;
}

.au-label a:hover {
  text-decoration: underline;
}

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

.au-input > i {
  position: absolute;
  left: 15px;
  font-size: 14px;
  color: #a7adc8;
  pointer-events: none;
  transition: color 0.16s ease;
  z-index: 2;
}

.au-page .au-input .form-control {
  width: 100%;
  height: 50px;
  padding: 0 15px 0 43px;
  border: 1.5px solid var(--au-line);
  border-radius: 13px;
  background: var(--au-field);
  color: var(--au-dark);
  font-size: 14px;
  font-weight: 500;
  box-shadow: none;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.au-page .au-input .form-control::placeholder {
  color: #aab0c6;
  font-weight: 400;
}

.au-page .au-input .form-control:focus {
  outline: 0;
  background: #fff;
  border-color: var(--au-primary);
  box-shadow: 0 0 0 4px var(--au-primary-soft);
}

.au-input:focus-within > i {
  color: var(--au-primary);
}

.au-input.au-has-eye .form-control {
  padding-right: 46px;
}

.au-eye {
  position: absolute;
  right: 6px;
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: #a7adc8;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  z-index: 3;
  transition: color 0.16s ease, background 0.16s ease;
}

.au-eye:hover {
  color: var(--au-primary);
  background: var(--au-primary-soft);
}

.au-page .invalid-feedback {
  flex: 0 0 100%;
  width: 100%;
  font-size: 12px;
  font-weight: 600;
  color: var(--au-danger);
  margin-top: 5px;
  display: none;
}

/* blithe/js/scripts.js adds .was-validated on submit, so the message below the
   field is what tells the user what is wrong. Bootstrap's own green tick /
   red cross background images are turned off - the border says enough. */
.au-page .was-validated .au-input .form-control:invalid,
.au-page .au-input .form-control.is-invalid {
  border-color: var(--au-danger);
  background-color: #fff;
  background-image: none;
  padding-right: 15px;
}

.au-page .au-input.au-has-eye .form-control.is-invalid,
.au-page .was-validated .au-input.au-has-eye .form-control:invalid {
  padding-right: 46px;
}

.au-page .was-validated .au-input .form-control:invalid:focus,
.au-page .au-input .form-control.is-invalid:focus {
  border-color: var(--au-danger);
  box-shadow: 0 0 0 4px rgba(252, 84, 75, 0.12);
}

.au-page .was-validated .au-input .form-control:valid,
.au-page .au-input .form-control.is-valid {
  border-color: var(--au-line);
  background-image: none;
  padding-right: 15px;
}

.au-page .was-validated .au-input .form-control:valid:focus {
  border-color: var(--au-primary);
  box-shadow: 0 0 0 4px var(--au-primary-soft);
}

.au-page .was-validated .au-input .form-control:invalid ~ .invalid-feedback,
.au-page .au-input .form-control.is-invalid ~ .invalid-feedback {
  display: block;
}

.au-page .was-validated .au-input .form-control:invalid + .au-eye {
  color: var(--au-danger);
}

.au-page .was-validated .au-check input:invalid {
  outline: 2px solid var(--au-danger);
  outline-offset: 2px;
  border-radius: 4px;
}

/* checkbox */
.au-check {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 13px;
  color: var(--au-muted);
  cursor: pointer;
  margin: 0;
  line-height: 1.45;
  user-select: none;
}

.au-check input {
  width: 17px;
  height: 17px;
  min-width: 17px;
  margin-top: 1px;
  accent-color: var(--au-primary);
  cursor: pointer;
}

.au-check a {
  color: var(--au-primary);
  font-weight: 700;
  text-decoration: none;
}

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

/* buttons */
.au-page .au-btn {
  width: 100%;
  height: 50px;
  border: 0;
  border-radius: 13px;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: 0.2px;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  background: linear-gradient(180deg, #7383f2, var(--au-primary));
  box-shadow: 0 12px 24px -12px rgba(103, 119, 239, 0.95);
  transition: transform 0.14s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.au-page .au-btn:hover {
  filter: brightness(1.04);
  box-shadow: 0 16px 30px -14px rgba(103, 119, 239, 1);
  transform: translateY(-1px);
}

.au-page .au-btn:active {
  transform: translateY(0);
}

.au-page .au-btn:disabled {
  opacity: 0.72;
  cursor: not-allowed;
  transform: none;
}

.au-page .au-btn-success {
  background: linear-gradient(180deg, #5ed07a, var(--au-success));
  box-shadow: 0 12px 24px -12px rgba(71, 195, 99, 0.95);
}

.au-page .au-btn-ghost {
  width: 100%;
  height: 48px;
  border: 1.5px solid var(--au-line);
  border-radius: 13px;
  background: #fff;
  color: var(--au-dark);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.14s ease;
}

.au-page .au-btn-ghost:hover {
  border-color: #cfd5ea;
  background: #fcfcff;
  color: var(--au-dark);
  transform: translateY(-1px);
}

/* or divider */
.au-or {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 22px 0 16px;
  color: #a7adc8;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.au-or:before,
.au-or:after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--au-line);
}

/* alt line */
.au-alt {
  margin-top: 24px;
  text-align: center;
  font-size: 13.5px;
  color: var(--au-muted);
}

.au-alt a {
  color: var(--au-primary);
  font-weight: 700;
  text-decoration: none;
}

.au-alt a:hover {
  text-decoration: underline;
}

/* password strength (keeps the app's own pwstrength ids working) */
.au-page .pwindicator {
  margin-top: 7px;
}

.au-page .pwindicator .bar {
  height: 4px;
  border-radius: 4px;
  transition: width 0.2s ease, background 0.2s ease;
}

.au-page .pwindicator .label {
  font-size: 11.5px;
  font-weight: 700;
  margin-top: 4px;
}

/* small note box */
.au-note {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 13px 15px;
  border-radius: 13px;
  background: var(--au-primary-soft);
  border: 1px solid rgba(103, 119, 239, 0.16);
  font-size: 12.8px;
  line-height: 1.55;
  color: var(--au-dark);
  margin-bottom: 22px;
}

.au-note i {
  color: var(--au-primary);
  font-size: 15px;
  margin-top: 1px;
}

.au-note.au-note-success {
  background: rgba(71, 195, 99, 0.09);
  border-color: rgba(71, 195, 99, 0.2);
}

.au-note.au-note-success i {
  color: var(--au-success);
}

.au-note.au-note-warning {
  background: rgba(255, 164, 38, 0.09);
  border-color: rgba(255, 164, 38, 0.22);
}

.au-note.au-note-warning i {
  color: var(--au-warning, #ffa426);
}

.au-note.au-note-danger {
  background: rgba(252, 84, 75, 0.08);
  border-color: rgba(252, 84, 75, 0.2);
}

.au-note.au-note-danger i {
  color: var(--au-danger);
}

/* big centered icon (activation page) */
.au-hero-icon {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  color: #fff;
  margin-bottom: 20px;
  background: linear-gradient(160deg, #5ed07a, var(--au-success));
  box-shadow: 0 16px 30px -14px rgba(71, 195, 99, 0.95);
}

.au-hero-icon.au-hero-primary {
  background: linear-gradient(160deg, #7383f2, var(--au-primary));
  box-shadow: 0 16px 30px -14px rgba(103, 119, 239, 0.95);
}

.au-center {
  text-align: center;
}

/* otp boxes */
.au-otp .form-control {
  padding-left: 15px !important;
  text-align: center;
  letter-spacing: 8px;
  font-size: 19px !important;
  font-weight: 800 !important;
}

/* ---------------- responsive ---------------- */
@media (max-width: 1100px) {
  .au-side {
    width: 42%;
    padding: 38px 34px;
  }

  .au-side h1 {
    font-size: 28px;
  }
}

@media (max-width: 900px) {
  .au-page {
    display: block;
    min-height: 100vh;
  }

  .au-side {
    display: none;
  }

  .au-mob-logo {
    display: block;
  }

  .au-main {
    padding: 34px 20px 44px;
    min-height: 100vh;
    align-items: flex-start;
  }

  .au-card,
  .au-card.au-wide {
    max-width: 480px;
    margin: 0 auto;
  }
}

@media (max-width: 560px) {
  .au-main {
    padding: 26px 16px 36px;
  }

  .au-card h2 {
    font-size: 22px;
  }

  .au-row {
    grid-template-columns: 1fr;
  }
}

/* ---- toast on the auth pages ------------------------------------------
   Moved out of this file in patch O. The toast is drawn by
   public/assets/css/toast-ui.css now, which every layout loads last - the
   panel, the admin side and these sign in pages - so one design covers the
   whole site and the icon can no longer end up underneath the text.
   -------------------------------------------------------------------- */
