/* GLOBAL*/

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  background: #f3f6fb;
}

/* LOGIN PAGE*/

.sso-page {
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 30px;
  position: relative;
  overflow-x: hidden;
  background:
    radial-gradient(
      circle at top left,
      rgba(66, 133, 244, 0.08),
      transparent 35%
    ),
    #f3f6fb;
}

/* LOGIN CONTAINER*/

.sso-container {
  width: min(1180px, 100%);
  min-height: 650px;
  display: grid;
  grid-template-columns: 1.35fr 0.9fr;
  background: #fff;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 25px 70px rgba(31, 45, 61, 0.12);
  position: relative;
  z-index: 2;
  margin: auto 0;
}

/* LOGIN IMAGE / BACKGROUND*/

.sso-image-panel {
  position: relative;
  min-height: 650px;
  overflow: hidden;
  background: #111;
}

.sso-image-panel .sso-background-image,
.sso-background-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.sso-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.72) 0%,
    rgba(0, 0, 0, 0.2) 48%,
    rgba(0, 0, 0, 0.05) 100%
  );
  z-index: 2;
}

.sso-image-content {
  position: absolute;
  left: 45px;
  right: 45px;
  bottom: 40px;
  z-index: 3;
  color: #fff;
}

.sso-logo {
  width: 90px;
  height: 90px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 18px;
  padding: 10px;
  margin-bottom: 20px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.18);
}

.sso-image-content h1 {
  margin: 0 0 10px;
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 700;
  line-height: 1.15;
  color: #fff;
}

.sso-image-content p {
  margin: 0;
  max-width: 600px;
  font-size: 16px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.9);
}

/* LOGIN FORM PANEL*/

.sso-form-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 55px;
  background: #fff;
  text-align: center;
}

.sso-form-content {
  width: 100%;
  max-width: 460px;
}

/* LOGIN HEADER*/

.login-header {
  width: 100%;
  margin-bottom: 32px;
}

.login-header h2 {
  margin: 0 0 8px;
  font-size: 30px;
  font-weight: 700;
  color: #263238;
  line-height: 1.3;
}

.login-header p {
  margin: 0;
  color: #7b8794;
  font-size: 14px;
  line-height: 1.6;
}

/* LOGIN ICON*/

.sso-icon-wrapper {
  width: 130px;
  height: 130px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sso-icon-wrapper .avatar-lg {
  width: 100%;
  height: 100%;
}

.sso-icon-wrapper .avatar-title {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sso-icon-wrapper i {
  font-size: 42px;
}

.sso-lord-icon {
  width: 180px;
  height: 180px;
}

/* LOGIN TITLE */

.sso-form-panel h2,
.sso-form-panel h3,
.sso-form-panel h4 {
  color: #263238;
  font-weight: 700;
  line-height: 1.3;
}

.sso-form-panel h2 {
  margin: 0 0 12px;
  font-size: 27px;
}

.sso-form-panel h3 {
  margin: 0 0 12px;
  font-size: 25px;
}

.sso-form-panel h4 {
  margin: 0 0 12px;
  font-size: 21px;
}

.sso-description {
  margin: 0;
  color: #7b8794;
  font-size: 14px;
  line-height: 1.7;
}

.sso-description .fw-semibold {
  color: #455a64;
}

/* LOGIN FORM*/

.sso-form {
  width: 100%;
  margin-top: 25px;
  text-align: left;
}

.sso-form .form-label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #455a64;
}

.sso-form .form-control {
  width: 100%;
  min-height: 48px;
  box-sizing: border-box;
  border-radius: 10px;
  border: 1px solid #dce3eb;
  padding: 10px 14px;
  font-size: 14px;
}

.sso-form .form-control:focus {
  border-color: #3282f6;
  box-shadow: 0 0 0 3px rgba(50, 130, 246, 0.1);
  outline: none;
}

/* PASSWORD - LOGIN*/

.password-input {
  padding-right: 48px !important;
}

.sso-password-wrapper {
  position: relative;
  width: 100%;
}

.sso-password-wrapper .form-control {
  padding-right: 48px;
}

.sso-password-toggle {
  position: absolute;
  top: 0;
  right: 0;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #7b8794;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
}

.sso-password-toggle:hover {
  color: #3282f6;
}

.sso-password-toggle i {
  font-size: 18px;
}

/* LOGIN OPTIONS / DIVIDER*/

.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 25px 0 18px;
  color: #9aa6b2;
  font-size: 12px;
}

.login-divider::before,
.login-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e8edf2;
}

.login-option-btn {
  height: 46px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.login-option-btn img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.login-info {
  margin-top: 25px;
  text-align: center;
}

/* SSO MESSAGE*/

.sso-message {
  width: 100%;
  margin-top: 20px;
  padding: 12px 15px;
  box-sizing: border-box;
  border-radius: 10px;
  background: #f7f9fc;
  border: 1px solid #edf1f5;
  color: #687581;
  font-size: 12px;
  line-height: 1.6;
}

.sso-alert {
  width: 100%;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.6;
}

/* RESET PASSWORD*/

.reset-password-form,
.sso-reset-password {
  width: 100%;
  margin-top: 25px;
  text-align: left;
}

.reset-password-form .form-group {
  margin-bottom: 18px;
}

.reset-password-form .form-label,
.sso-reset-password .form-label {
  display: block;
  margin-bottom: 7px;
  font-weight: 500;
  color: #344054;
}

.reset-password-form .form-control {
  width: 100%;
  min-height: 46px;
  box-sizing: border-box;
  border-radius: 9px;
  border: 1px solid #dee2e6;
  padding: 10px 14px;
}

.reset-password-form .form-control:focus {
  border-color: #3282f6;
  box-shadow: 0 0 0 0.15rem rgba(50, 130, 246, 0.12);
  outline: none;
}

.sso-reset-password .mb-3 {
  margin-bottom: 18px !important;
}

/* RESET PASSWORD - PASSWORD TOGGLE*/

.password-wrapper {
  position: relative;
  width: 100%;
}

.password-wrapper .form-control {
  padding-right: 52px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 5px;
  width: 40px;
  height: 40px;
  padding: 0;
  transform: translateY(-50%);
  border: 0;
  outline: none;
  background: transparent;
  color: #7b8794;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  cursor: pointer;
  z-index: 5;
  transition:
    color 0.2s ease,
    background 0.2s ease;
}

.password-toggle:hover {
  color: #3282f6;
  background: #f1f6ff;
}

.password-toggle:focus {
  outline: none;
  box-shadow: none;
}

.password-toggle i {
  display: block;
  font-size: 18px;
  line-height: 1;
}

.password-rules {
  margin-top: 8px;
  color: #8a96a3;
  font-size: 11px;
  line-height: 1.6;
  text-align: left;
}

/* RESET PASSWORD BUTTON*/

.btn-reset-password {
  width: 100%;
  min-height: 48px;
  margin-top: 5px;
  padding: 10px 15px;
  border: 0;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #3282f6;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
}

.btn-reset-password:hover {
  color: #fff;
  background: #2674e8;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(50, 130, 246, 0.25);
}

.btn-reset-password:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-reset-password i {
  font-size: 17px;
}

.reset-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 18px;
  color: #7b8794;
  font-size: 13px;
  text-decoration: none;
}

.reset-back:hover {
  color: #3282f6;
}

/* OTP VERIFICATION*/

.otp-form {
  width: 100%;
  max-width: 460px;
  margin-top: 25px;
  text-align: center;
}

.sso-otp-container,
.otp-input-row {
  display: flex;
  gap: 10px;
  width: 100%;
  margin-top: 25px;
}

.otp-input-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}

.sso-otp-input,
.otp-input {
  flex: 1;
  min-width: 0;
  box-sizing: border-box;
  height: 58px;
  padding: 0;
  text-align: center;
  font-size: 22px;
  font-weight: 600;
  border-radius: 10px;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  color: #263238;
  outline: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.otp-input {
  height: 52px;
  background: #f8fafc;
  border-color: #dce3eb;
  font-weight: 700;
}

.sso-otp-input:focus,
.otp-input:focus {
  background: #fff;
  border-color: #3282f6;
  box-shadow: 0 0 0 0.15rem rgba(50, 130, 246, 0.12);
}

.otp-input:disabled {
  background: #f1f3f5;
  cursor: not-allowed;
}

/* OTP INFORMATION*/

.otp-info {
  width: 100%;
  max-width: 460px;
  margin-top: 20px;
  margin-bottom: 22px;
  padding: 12px 15px;
  box-sizing: border-box;
  border-radius: 10px;
  background: #f7f9fc;
  border: 1px solid #edf1f5;
  color: #687581;
  font-size: 12px;
  line-height: 1.6;
  text-align: left;
}

.otp-info strong {
  color: #455a64;
}

.sso-confirm-message {
  margin-top: 12px;
  color: #7b8794;
  font-size: 13px;
  line-height: 1.6;
}

/* OTP BUTTON*/

.otp-button {
  width: 100%;
  min-height: 48px;
  margin-top: 22px;
  border: 0;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #3282f6;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
}

.otp-button:hover:not(:disabled) {
  background: #2674e8;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(50, 130, 246, 0.25);
}

.otp-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* OTP RESEND*/

.otp-resend {
  width: 100%;
  min-height: 46px;
  margin-top: 10px;
  border: 1px solid #e0e5eb;
  border-radius: 10px;
  background: #fff;
  color: #687581;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

.otp-resend:hover {
  background: #f7f9fc;
  color: #3282f6;
  border-color: #cfd9e5;
}

/* OTP BACK*/

.otp-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 20px;
  color: #7b8794;
  font-size: 13px;
  text-decoration: none;
}

.otp-back:hover {
  color: #3282f6;
}

/* SSO BUTTON*/

.sso-button {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
}

.sso-button:hover {
  transform: translateY(-1px);
}

.sso-button i {
  font-size: 17px;
}

/* SSO BUTTON - PRIMARY*/
.sso-button-primary {
  background: #3282f6;
  color: #fff;
}

.sso-button-primary:hover {
  background: #2674e8;
  color: #fff;
  box-shadow: 0 8px 20px rgba(50, 130, 246, 0.25);
}

/* SSO BUTTON - SUCCESS*/
.sso-button-success {
  background: #0ab39c;
  color: #fff;
}

.sso-button-success:hover {
  background: #099782;
  color: #fff;
  box-shadow: 0 8px 20px rgba(10, 179, 156, 0.25);
}

/* SSO BUTTON - DANGER*/
.sso-button-danger {
  background: #f06548;
  color: #fff;
}

.sso-button-danger:hover {
  background: #d9563b;
  color: #fff;
}

/* SSO BUTTON GROUP*/
.sso-button-group {
  width: 100%;
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sso-button-group .sso-button {
  margin: 0;
}

/* BACK / RETURN BUTTON*/
.sso-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 20px;
  color: #7b8794;
  font-size: 13px;
  text-decoration: none;
  transition: color 0.2s ease;
}

.sso-back:hover {
  color: #3282f6;
}

.sso-back i {
  font-size: 15px;
}

/* FACE ID LOGIN*/
#faceModal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  padding: 15px;
  background: rgba(0, 0, 0, 0.65);
  align-items: center;
  justify-content: center;
}

.face-modal-content {
  width: min(430px, 100%);
  padding: 18px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.face-modal-title {
  margin: 0 0 12px;
  font-weight: 600;
}

.face-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 12px;
  background: #000;
}

#faceVideo,
#faceOverlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#faceVideo.is-mirrored,
#faceOverlay.is-mirrored {
  transform: scaleX(-1);
}

.face-status {
  margin: 10px 0 0;
  font-size: 14px;
}

.face-status small {
  color: #666;
}

/* GOOGLE TRANSLATE*/
.google-translate-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  z-index: 9999;
}

/* FOOTER*/
.sso-footer {
  width: 100%;
  max-width: 1180px;
  padding: 15px 20px 5px;
  text-align: center;
  font-size: 11px;
  line-height: 1.5;
  color: #9aa6b2;
  flex-shrink: 0;
  z-index: 3;
}

.sso-footer a {
  color: inherit;
  text-decoration: none;
}

.sso-footer a:hover {
  text-decoration: underline;
}

/* RESPONSIVE - TABLET*/

@media (max-width: 991px) {
  .sso-page {
    padding: 20px;
  }

  .sso-container {
    grid-template-columns: 1fr;
    min-height: auto;
    max-width: 600px;
    margin: auto 0;
  }

  .sso-image-panel {
    min-height: 300px;
    height: 300px;
  }

  .sso-image-content {
    left: 28px;
    right: 28px;
    bottom: 25px;
  }

  .sso-logo {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    margin-bottom: 12px;
  }

  .sso-image-content h1 {
    font-size: 24px;
  }

  .sso-image-content p {
    font-size: 13px;
  }

  .sso-form-panel {
    padding: 40px 35px 45px;
  }

  .login-header {
    margin-bottom: 25px;
  }

  .login-header h2 {
    font-size: 27px;
  }
}

/* RESPONSIVE - MOBILE*/
@media (max-width: 575px) {
  html,
  body {
    width: 100%;
    min-height: 100%;
  }

  body {
    min-height: 100vh;
  }

  .sso-page {
    width: 100%;
    min-height: 100vh;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    overflow-x: hidden;
  }

  .sso-container {
    width: 100%;
    max-width: none;
    min-height: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    flex: 0 0 auto;
    border-radius: 0;
    box-shadow: none;
  }

  /* Mobile - Login Image*/

  .sso-image-panel {
    width: 100%;
    height: 220px;
    min-height: 220px;
    flex-shrink: 0;
  }

  .sso-image-panel .sso-background-image {
    object-position: center;
  }

  .sso-image-content {
    left: 20px;
    right: 20px;
    bottom: 18px;
  }

  .sso-logo {
    width: 48px;
    height: 48px;
    padding: 7px;
    border-radius: 10px;
    margin-bottom: 8px;
  }

  .sso-image-content h1 {
    margin-bottom: 5px;
    font-size: 20px;
    line-height: 1.15;
  }

  .sso-image-content p {
    display: none;
  }

  /* Mobile - Login Panel*/

  .sso-form-panel {
    width: 100%;
    padding: 30px 22px 25px;
    display: block;
    flex: 0 0 auto;
    text-align: center;
  }

  .sso-form-content {
    max-width: none;
  }

  /* Mobile - Login Header*/

  .login-header {
    margin-bottom: 22px;
  }

  .login-header h2 {
    font-size: 24px;
    line-height: 1.2;
  }

  .login-header p {
    font-size: 13px;
  }

  /* Mobile - Login Icon*/

  .sso-icon-wrapper {
    width: 110px;
    height: 110px;
    margin: 0 auto 12px;
  }

  .sso-lord-icon {
    width: 125px;
    height: 125px;
  }

  .sso-icon-wrapper i {
    font-size: 36px;
  }

  /* Mobile - Login Title*/

  .sso-form-panel h2 {
    font-size: 23px;
    line-height: 1.3;
    margin-bottom: 10px;
  }

  .sso-form-panel h3 {
    font-size: 21px;
  }

  .sso-form-panel h4 {
    font-size: 19px;
  }

  .sso-description {
    font-size: 13px;
    line-height: 1.6;
  }

  .sso-message {
    margin-top: 18px;
    font-size: 11px;
  }

  /* Mobile - Login Form*/

  .sso-form {
    margin-top: 20px;
  }

  .sso-button {
    min-height: 47px;
    font-size: 13px;
  }

  .login-divider {
    margin-top: 22px;
  }

  .login-option-btn {
    height: 44px;
    font-size: 12px;
  }

  .login-info {
    margin-top: 20px;
  }

  /* Mobile - Reset Password*/

  .reset-password-form {
    margin-top: 20px;
  }

  .reset-password-form .form-group {
    margin-bottom: 16px;
  }

  .reset-password-form .form-control {
    min-height: 46px;
    font-size: 14px;
  }

  .password-toggle {
    width: 38px;
    height: 38px;
    right: 4px;
  }

  .password-toggle i {
    font-size: 17px;
  }

  .password-rules {
    font-size: 10px;
  }

  .btn-reset-password {
    min-height: 47px;
    font-size: 13px;
  }

  /* Mobile - OTP*/

  .otp-form {
    margin-top: 20px;
  }

  .otp-info {
    margin-top: 18px;
    margin-bottom: 20px;
    font-size: 11px;
  }

  .otp-input-row {
    gap: 6px;
  }

  .sso-otp-container {
    gap: 6px;
    margin-top: 20px;
  }

  .sso-otp-input {
    height: 52px;
    font-size: 20px;
    border-radius: 8px;
  }

  .otp-input {
    height: 48px;
    border-radius: 8px;
    font-size: 19px;
  }

  .otp-button {
    min-height: 47px;
    margin-top: 20px;
    font-size: 13px;
  }

  .otp-resend {
    min-height: 45px;
    font-size: 12px;
  }

  .otp-back {
    margin-top: 18px;
    font-size: 12px;
  }

  .sso-button-group {
    margin-top: 18px;
  }

  /* Mobile - Face ID*/

  .face-modal-content {
    padding: 15px;
  }

  /* Mobile - Footer*/

  .sso-footer {
    width: 100%;
    max-width: none;
    margin-top: auto;
    padding: 15px 20px 18px;
    text-align: center;
    font-size: 10px;
    line-height: 1.5;
    flex-shrink: 0;
  }
}

/* 32. RESPONSIVE - SMALL MOBILE*/

@media (max-width: 360px) {
  .sso-image-panel {
    height: 190px;
    min-height: 190px;
  }

  .sso-form-panel {
    padding: 25px 18px 20px;
  }

  .sso-icon-wrapper {
    width: 95px;
    height: 95px;
  }

  .sso-lord-icon {
    width: 105px;
    height: 105px;
  }

  .sso-form-panel h2 {
    font-size: 21px;
  }

  .sso-otp-container,
  .otp-input-row {
    gap: 4px;
  }

  .sso-otp-input {
    height: 48px;
    font-size: 18px;
  }

  .otp-input {
    height: 44px;
    font-size: 17px;
    border-radius: 7px;
  }

  .otp-button {
    min-height: 47px;
  }

  .password-toggle {
    width: 36px;
    height: 36px;
  }

  .password-toggle i {
    font-size: 16px;
  }

  .btn-reset-password {
    min-height: 47px;
    font-size: 13px;
  }
}
