.stg-login {
  --stg-login-primary: #075eab;
  --stg-login-primary-dark: #034879;
  --stg-login-border: #d9e2ec;
  --stg-login-muted: #66788a;
  width: 100%;
  max-width: 440px;
  margin-inline: auto;
  color: #1f2d3d;
  font-family: "Noto Sans Khmer", "Battambang", "Khmer OS Battambang", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.7;
}

.stg-login__pretext,
.stg-login__posttext {
  margin-bottom: 1rem;
  color: var(--stg-login-muted);
  line-height: 1.7;
}

.stg-login__field {
  margin-bottom: 1rem;
}

.stg-login .form-label {
  display: block;
  margin-bottom: 0.45rem;
  color: #243b53;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.65;
}

.stg-login .input-group {
  overflow: hidden;
  border: 1px solid var(--stg-login-border);
  border-radius: 0.7rem;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.stg-login .input-group:focus-within {
  border-color: var(--stg-login-primary);
  box-shadow: 0 0 0 0.2rem rgba(7, 94, 171, 0.14);
}

.stg-login .input-group-text,
.stg-login .input-password-toggle {
  min-width: 50px;
  border: 0;
  border-radius: 0;
  background: #f3f7fb;
  color: #52677b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.stg-login .form-control {
  min-height: 50px;
  border: 0;
  border-radius: 0;
  background: #fff;
  color: #172b3a;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.6;
  box-shadow: none;
}

.stg-login .form-control:focus {
  box-shadow: none;
}

.stg-login .form-control::placeholder {
  color: #8a9bac;
  opacity: 1;
}

.stg-login .input-password-toggle:hover,
.stg-login .input-password-toggle:focus-visible {
  background: #e7f0f8;
  color: var(--stg-login-primary);
}

.stg-login__remember {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0.15rem 0 1rem;
}

.stg-login__remember .form-check-input {
  flex: 0 0 auto;
  width: 1.1rem;
  height: 1.1rem;
  margin: 0;
}

.stg-login__remember .form-check-label {
  color: #43576a;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.6;
}

.stg-login__submit .btn,
.stg-login__extra-action .btn {
  min-height: 50px;
  border-radius: 0.7rem;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.6;
}

.stg-login__submit .btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border-color: var(--stg-login-primary);
  background: linear-gradient(135deg, var(--stg-login-primary), var(--stg-login-primary-dark));
  background: linear-gradient(135deg, #0d4c8f, var(--stg-login-primary-dark));
  box-shadow: 0 0.45rem 1.1rem rgba(3, 72, 121, 0.22);
}

.stg-login__submit .btn-primary:hover,
.stg-login__submit .btn-primary:focus-visible {
  border-color: var(--stg-login-primary-dark);
  background: var(--stg-login-primary-dark);
}

.stg-login__extra-action {
  margin-bottom: 0.75rem;
}

.stg-login__options {
  display: grid;
  gap: 0.5rem;
  margin: 1.15rem 0 0;
  padding: 1rem 0 0;
  border-top: 1px solid #e5ebf1;
  list-style: none;
}

.stg-login__options a {
  display: inline-flex;
  min-height: 44px;
  width: 100%;
  align-items: center;
  gap: 0.65rem;
  padding: 8px 10px;
  border: 1px solid #e6ebf2;
  border-radius: 10px;
  background: #f8fafc;
  color: var(--stg-login-primary);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.6;
  text-decoration: none;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.stg-login__options a:hover,
.stg-login__options a:focus-visible {
  border-color: rgba(255, 198, 0, 0.72);
  background: #fff9e8;
  color: var(--stg-login-primary-dark);
  outline: none;
  text-decoration: none;
}

.stg-login__options .fas {
  display: inline-flex;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #e7f0fa;
  color: #075eab;
  margin-top: 0;
  text-align: center;
}

#jollyany-login-content .uk-modal-dialog {
  width: min(calc(100vw - 32px), 460px);
  padding: 30px;
  overflow: hidden;
  border: 1px solid rgba(37, 61, 107, 0.12);
  border-top: 4px solid #ffc600;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 1.6rem 4.5rem rgba(21, 40, 60, 0.26);
  font-family: "Noto Sans Khmer", "Battambang", "Khmer OS Battambang", Arial, sans-serif;
}

#jollyany-login-content .uk-modal-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 0 1.35rem;
  color: #15396d;
  font-family: "Noto Sans Khmer", "Battambang", "Khmer OS Battambang", Arial, sans-serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.55;
  text-align: center;
}

#jollyany-login-content .uk-modal-title::before {
  content: "\f2f6";
  display: inline-flex;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #e8f0fb;
  color: #075eab;
  font-family: "Font Awesome 7 Free", "Font Awesome 6 Free", "Font Awesome 5 Free";
  font-size: 17px;
  font-weight: 900;
}

#jollyany-login-content .uk-modal-close-default {
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: #f3f6fa;
  color: #52677b;
}

#jollyany-login-content .uk-modal-close-default:hover,
#jollyany-login-content .uk-modal-close-default:focus-visible {
  background: #e7eef7;
  color: #15396d;
}

@media (max-width: 575.98px) {
  #jollyany-login-content .uk-modal-dialog {
    width: calc(100vw - 24px);
    padding: 25px 18px 22px;
    border-radius: 17px;
  }

  #jollyany-login-content .uk-modal-title {
    padding-right: 28px;
    font-size: 19px;
    justify-content: flex-start;
    text-align: left;
  }

  #jollyany-login-content .uk-modal-title::before {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  .stg-login .form-control {
    font-size: 16px;
  }

  .stg-login__options a {
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .stg-login .input-group {
    transition: none;
  }
}

[data-bs-theme="dark"] .stg-login {
  --stg-login-border: #425466;
  --stg-login-muted: #a9b7c5;
  color: #ecf2f7;
}

[data-bs-theme="dark"] .stg-login .form-label,
[data-bs-theme="dark"] .stg-login__remember .form-check-label {
  color: #dce6ef;
}

[data-bs-theme="dark"] .stg-login .input-group,
[data-bs-theme="dark"] .stg-login .form-control {
  background: #1f2b36;
  color: #fff;
}

[data-bs-theme="dark"] .stg-login .input-group-text,
[data-bs-theme="dark"] .stg-login .input-password-toggle {
  background: #2b3946;
  color: #c3d0dc;
}
