/**
 * Auth pages — đăng nhập / đăng ký (port từ html_templates).
 */

.auth-page {
  min-height: 100vh;
  background: #e4f3ff;
}

.auth-page .page-login {
  background: #e4f3ff;
}



.auth {
  min-height: 100vh;
  padding: 40px 0;
}

.auth .container {
  max-width: 1168px;
}

.auth-card {
  max-width: 1170px;
  margin: 0 auto;
  padding: 16px;
  background: #fff;
  border-radius: 28px;
  box-shadow: 0 30px 80px rgba(15, 30, 58, 0.14);
  overflow: hidden;
}

.auth-panel {
  position: relative;
  min-height: 646px;
  height: 100%;
  padding: 40px 32px;
  border-radius: 20px;
  overflow: hidden;
  gap: 32px;
  background: url('../assets/auth/auth-illustration.jpg');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: bottom;
  ;
}

.auth-panel__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.auth-panel__character {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 78%;
  max-width: 407px;
  height: auto;
  pointer-events: none;
}

.auth-panel__brand,
.auth-panel__intro {
  position: relative;
  z-index: 1;
}

.auth-panel__brand {
  gap: 8px;
}

.auth-panel__brand img {
  width: 59px;
  height: 56px;
  object-fit: contain;
}

.auth-panel__name {
  font-weight: 600;
  font-size: 18px;
  line-height: 26px;
  color: #fff;
}

.auth-panel__tagline {
  font-weight: 600;
  font-size: 12px;
  line-height: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

.auth-panel__intro {
  gap: 18px;
}

.auth-panel__badge {
  font-weight: 600;
  align-self: flex-start;
  padding: 6px 16px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.15);
  font-size: 12px;
  line-height: 20px;
  text-transform: uppercase;
  color: #19ff71;
}

.auth-panel__title {
  font-weight: 700;
  margin: 0;
  font-size: 32px;
  line-height: 40px;
  color: #fff;
}

.auth-panel__desc {
  font-weight: 400;
  margin: 0;
  font-size: 16px;
  line-height: 24px;
  color: rgba(255, 255, 255, 0.7);
}

.auth-form {
  gap: 24px;
  height: 100%;
  padding: 50px 27px;
}

.auth-form__head {
  gap: 8px;
  width: 100%;
  text-align: center;
}

.auth-form__title {
  font-weight: 600;
  margin: 0;
  font-size: 24px;
  line-height: 32px;
  color: #0f1e3a;
}

.auth-form__subtitle {
  font-weight: 400;
  margin: 0;
  font-size: 16px;
  line-height: 24px;
  color: #66738d;
}

.auth-role {
  gap: 0;
  width: 100%;
  height: 48px;
  padding: 4px;
  border-radius: 11px;
  background: #e7ecf4;
}

.auth-role__btn {
  flex: 1;
  gap: 7px;
  height: 100%;
  padding: 0 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  font-weight: 600;
  font-size: 16px;
  line-height: 24px;
  color: #6e7788;
  cursor: pointer;
}

.auth-role__btn img {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  filter: grayscale(1) opacity(0.65);
}

.auth-role__btn.is-active {
  background: #fff;
  color: #274792;
  box-shadow: 0 3px 10px rgba(79, 70, 229, 0.12);
}

.auth-role__btn.is-active img {
  filter: none;
}

.auth-form__fields,
form.auth-form__fields {
  gap: 16px;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.auth-form__fields>.row {
  width: 100%;
  margin-left: -8px;
  margin-right: -8px;
}

.auth-form__fields>.row>[class*="col-"] {
  padding-left: 8px;
  padding-right: 8px;
}

.auth-field {
  gap: 2px;
  width: 100%;
}

.auth-field__label {
  font-weight: 600;
  margin: 0;
  font-size: 14px;
  line-height: 20px;
  color: #1e283a;
}

.auth-field__label span {
  color: #e20800;
}

.auth-field__control {
  gap: 8px;
  width: 100%;
  height: 48px;
  padding: 8px 10px;
  border: 1px solid #e7ecf4;
  border-radius: 10px;
  background: #fafbfd;
  transition: border-color 0.2s ease;
}

.auth-field__control:focus-within,
.auth-field__control.is-focus {
  border-color: #274792;
}

.auth-field__control>img,
.auth-field__control>i {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  opacity: 0.6;
  color: #6e7788;
  font-size: 18px;
  line-height: 20px;
  text-align: center;
}

.auth-field__control input,
.auth-field__control select {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: none;
  outline: none;
  background: transparent;
  font-weight: 400;
  font-size: 14px;
  line-height: 24px;
  color: #000e20;
  appearance: none;
  padding: 0 10px;
  box-shadow: none;
  margin: 0px;
}

.auth-field__control input::placeholder {
  color: #6e7788;
}

.auth-field__control select {
  cursor: pointer;
  color: #000e20;
}

.auth-field__control--select>i {
  pointer-events: none;
}

.auth-field__toggle {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  padding: 0;
  border: none;
  background: transparent;
  opacity: 0.9;
  color: #6e7788;
  cursor: pointer;
}

.auth-field__toggle i {
  width: 20px;
  height: 20px;
  display: block;
  font-size: 18px;
  line-height: 20px;
  color: inherit;
}

.auth-form__meta {
  width: 100%;
}

.auth-check {
  gap: 8px;
  margin: 0;
  font-weight: 400;
  font-size: 16px;
  line-height: 24px;
  color: #6e7788;
  cursor: pointer;
  position: relative;
}

.auth-check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.auth-check--terms {
  align-items: flex-start;
  color: #000e20;
}

.auth-check--terms .auth-check__box {
  margin-top: 2px;
}

.auth-check--terms .auth-check__text a {
  font-weight: 600;
  color: #e48012;
  text-decoration: underline;
}

.auth-check--terms .auth-check__text a:hover {
  color: #c46d0f;
}

.auth-check__box {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: #fff url("../assets/auth/icon-check.svg") center/18px 18px no-repeat;
}

.auth-check input:not(:checked)+.auth-check__box {
  background: #fff;
  border: 1.5px solid #e7ecf4;
}

.auth-check input:checked+.auth-check__box {
  background: #fff url("../assets/auth/icon-check.svg") center/18px 18px no-repeat;
  border-color: #274792;
}

.auth-form__submit,
.auth-form input.auth-form__submit,
.auth-form button.auth-form__submit,
.auth-form__fields .form-submit {
  width: 100%;
  height: 48px;
  border: none;
  border-radius: 10px;
  background: #274792;
  font-weight: 600;
  font-size: 16px;
  line-height: 24px;
  color: #fff;
  cursor: pointer;
}

.auth-form__submit:hover,
.auth-form__fields .form-submit:hover {
  background: #1f3b78;
}

.auth-social {
  gap: 16px;
  width: 100%;
}

.auth-social__signup {
  font-weight: 400;
  margin: 0;
  font-size: 16px;
  line-height: 24px;
  text-align: center;
  color: #6e7788;
}

.auth-social__signup a {
  font-weight: 600;
  color: #274792;
  text-decoration: none;
}

.auth-social__signup a:hover {
  text-decoration: underline;
}

.auth-form__hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.page-auth .messages,
.auth-page .messages {
  max-width: 1168px;
  margin: 16px auto 0;
  padding: 0 15px;
}

@media (max-width: 991px) {
  .auth {
    padding: 24px 0;
  }

  .auth-card {
    padding: 12px;
    border-radius: 20px;
  }

  .auth-card .auth-panel {
    display: none !important;
  }

  .auth-form {
    min-height: 0;
    padding: 32px 20px;
  }
}

@media (max-width: 575px) {

  .auth-role__btn span {
    font-size: 14px;
  }
}

/* Auth validation popup (custom div, không dùng BS modal) */
.auth-popup {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-popup[hidden] {
  display: none !important;
}

.auth-popup__backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: rgba(15, 30, 58, 0.45);
}

.auth-popup__dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  padding: 28px 24px 24px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(15, 30, 58, 0.22);
  text-align: center;
}

.auth-popup__x {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 2;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  color: #6e7788;
  cursor: pointer;
}

.auth-popup__ok {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 44px;
  border: none;
  border-radius: 10px;
  background: #274792;
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-size: 16px;
  color: #fff;
  cursor: pointer;
}

.auth-popup__ok:hover {
  background: #1f3b78;
}

.auth-popup__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: #fdecec;
  color: #e20800;
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
}

.auth-popup.is-success .auth-popup__icon {
  background: #e8f8ef;
  color: #1a9f4a;
}

.auth-popup__title {
  margin: 0 0 10px;
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-size: 20px;
  line-height: 28px;
  color: #0f1e3a;
}

.auth-popup__body {
  margin-bottom: 20px;
}

.auth-popup__text,
.auth-popup__list {
  margin: 0;
  font-family: "Inter", sans-serif;
  font-size: 15px;
  line-height: 24px;
  color: #66738d;
  text-align: left;
}

.auth-popup__text {
  text-align: center;
}

.auth-popup__list {
  padding-left: 20px;
}

.auth-popup__list li+li {
  margin-top: 6px;
}

body.auth-popup-open {
  overflow: hidden;
}
