html,
body,
button,
input,
select,
textarea,
.login-screen,
.registration-screen,
.reset-password-screen {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

.form-control {
  height: 40px;
}

.form-control:focus {
  box-shadow: none;
  -webkit-box-shadow: none;
  -moz-box-shadow: none;
}


.btn.btn-success {
  background-color: #00176B;
  border-color: #00176B;
}

.btn.btn-success:hover,
.btn.btn-success:focus {
  background-color: #334589;
  border-color: #334589;
}

.btn.btn-success:active {
  background-color: #34358b;
  background-color: #34358b;
  opacity: 0.8 !important;
}

.btn.btn-success:disabled {
  background-color: #B0B7D1 !important;
  border-color: #B0B7D1 !important;
  opacity: 0.8 !important;
  color: #fff !important;
}

.zocial:before {
  line-height: 30px;
  margin: 0 0.4em 0 0;
  padding: 0 0.4em;
}

.text-inline {
  display: inline;
  color: #00176B;
}

.text-default {
  color: #333333;
}

.login-pf .container .alert-error {
  color: #cc0000;
}

.login-pf .container .alert-warning {
  color: #ec7a08;
}

.login-pf .container .alert-info {
  color: #333333;
}

.login-pf .container .alert-success {
  color: #3f9c35;
}

/* #kc-social-providers li {
  display: inline-block;
} */
.ab-header-wrapper {
  text-align: center;
  margin-bottom: 20px;
}

.ab-logo-text {
  margin-bottom: -15px !important;
  display: inline-block;
  background-color: white;
  margin-right: 5px !important;
}

.padding-right-10 {
  padding-right: 10px;
}

.padding-left-10 {
  padding-left: 10px;
}

.margin-top-10 {
  margin-top: 10px;
}

.margin-top-15 {
  margin-top: 15px;
}

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

.margin-top-30 {
  margin-top: 30px;
}

.margin-top--60 {
  margin-top: -60px;
}

.margin-bottom-0 {
  margin-bottom: 0 !important;
}

.margin-bottom-10 {
  margin-bottom: 10px;
}

.margin-bottom-12 {
  margin-bottom: 12px;
}

.margin-bottom-15 {
  margin-bottom: 15px;
}

.margin-bottom-20 {
  margin-bottom: 20px;
}

.margin-bottom-40 {
  margin-bottom: 40px;
}

.text-black-light {
  color: #bdbdbd;
}

.ab-form-control {
  border-radius: 8px;
  font-size: 14px;
  height: 40px;
  padding: 0 18px;
}

.ab-btn {
  height: 40px;
  border-radius: 8px;
  font-size: 14px;
}

.ab-btn>span {
  line-height: 26px !important;
  /* padding-left: 40px !important; */
}

.fullscreen-width {
  width: 100%;
}

/*
 * Logo social: hop 24x24 theo thiet ke. Google.svg va Facebook.svg co viewBox
 * 25x24 nen dung background-size: contain de giu ti le thay vi keo cho vuong.
 */
.microsoft-signin-logo {
  background: url('../img/microsoft-icon.svg') transparent 50% 50% / contain no-repeat;
  margin: auto;
  width: 24px;
  height: 24px;
  vertical-align: middle;
}

.facebook-signin-logo {
  background: url('../img/Facebook.svg') transparent 50% 50% / contain no-repeat;
  margin: auto;
  width: 24px;
  height: 24px;
  vertical-align: middle;
}

.google-signin-logo {
  background: url('../img/Google.svg') transparent 50% 50% / contain no-repeat;
  margin: auto;
  width: 24px;
  height: 24px;
  vertical-align: middle;
}

.zalo-signin-logo {
  background: url('../img/Zalo.svg') transparent 50% 50% / contain no-repeat;
  margin: auto;
  width: 24px;
  height: 24px;
  vertical-align: middle;
}

.custom-select-lang {
  position: relative;
  display: inline-block;
}

.selected-language {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  background-color: transparent;
  padding: 4px 6px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s ease;
}

.selected-language:hover {
  background-color: rgba(0, 0, 0, 0.04);
}

.selected-language span {
  font-weight: 500;
  font-size: 13px;
  line-height: 18px;
  letter-spacing: 0;
  color: #2C2E32;
  margin-right: 6px;
  white-space: nowrap;
}

.group-select-input-form {
  display: flex;
}

.country-code-dropdown {
  margin-right: 5px;
}

.country-code-button {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  border-radius: 8px;
  height: 40px;
  padding: 8px;
  background-color: transparent;
  border: 1px solid #F0F0F1;
  cursor: pointer;
}

.language-options {
  display: none;
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  min-width: 135px;
  background-color: #ffffff;
  border: 1px solid #EAECF0;
  border-radius: 10px;
  box-shadow: 0px 4px 16px -2px rgba(16, 24, 40, 0.1);
  padding: 4px !important;
  margin: 0;
  z-index: 1000;
  list-style: none;
}

.custom-select-lang.open .language-options {
  display: flex;
  flex-direction: column;
}

.language-options li {
  display: flex;
  cursor: pointer;
  align-items: center;
  transition: background-color 0.15s ease;
  padding: 6px 10px;
  border-radius: 6px;
}

.language-options li span {
  font-weight: 500;
  font-size: 13px;
  line-height: 18px;
  letter-spacing: 0;
  color: #2C2E32;
}

.language-options li:hover,
.country-code-list li:hover {
  background-color: #f8f9fa;
  border-radius: 6px;
}

.select-lang-arrow {
  background: url('../img/Bottom.svg') transparent 50% 50% no-repeat;
  background-size: 14px 14px;
  width: 14px;
  height: 14px;
  transform: rotate(-90deg);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.select-nation-arrow {
  background: url('../img/Bottom.svg') transparent 50% 50% no-repeat;
  width: 22.5px;
  height: 22.5px;
  transition: transform 0.3s ease;
}

.select-lang-arrow.rotate {
  transform: rotate(0deg);
}

.select-nation-arrow.rotate {
  transform: rotate(-180deg);
}

.nation-option {
  width: 17.5px;
  height: 17.5px;
  border-radius: 50%;
  margin-right: 5px;
}

.nation-option-li {
  width: 18.5px;
  height: 17.5px;
  background-repeat: no-repeat;
  background-size: contain;
  border-radius: 2px;
  margin-right: 5px;
}

.lang-option-vi {
  background: url('../img/vi.svg') transparent 50% 50% no-repeat;
  background-size: cover;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  margin-right: 8px;
  flex-shrink: 0;
}

.lang-option-en {
  background: url('../img/en.svg') transparent 50% 50% no-repeat;
  background-size: cover;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  margin-right: 8px;
  flex-shrink: 0;
}

.lang-option-id {
  background: url('https://upload.wikimedia.org/wikipedia/commons/thumb/9/9f/Flag_of_Indonesia.svg/800px-Flag_of_Indonesia.svg.png?20200822164827') transparent 50% 50% no-repeat;
  background-size: cover;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  margin-right: 8px;
  flex-shrink: 0;
}

.lang-option-th {
  background: url('../img/th.svg') transparent 50% 50% no-repeat;
  background-size: cover;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  margin-right: 8px;
  flex-shrink: 0;
}

.lang-option-ARABICS {
  background: url('../img/ARABICS.png') transparent 50% 50% no-repeat;
  background-size: cover;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 8px;
  flex-shrink: 0;
}

.show-password {
  position: absolute;
  top: 8px;
  right: 5px;
  background: url('../img/IconPW.svg') transparent 50% 50% no-repeat;
  background-size: 24px 24px;
  margin: auto;
  margin-right: 14px;
  width: 25px;
  height: 25px;
  vertical-align: middle;
  cursor: pointer;
}

.hide-password {
  position: absolute;
  top: 8px;
  right: 5px;
  background: url('../img/IconSPW.svg') transparent 50% 50% no-repeat;
  background-size: 24px 24px;
  margin: auto;
  margin-right: 14px;
  width: 25px;
  height: 25px;
  vertical-align: middle;
  cursor: pointer;
}

/*
 * Icon chon phuong thuc nhan ma OTP - theo component "Phuong thuc" trong Figma:
 * hop 20x20, net ve giu dung kich thuoc export cua tung icon (khong keo cho vua hop).
 */
.sms-otp-logo {
  background: url('../img/otp-sms.svg') transparent 50% 50% / 20px 20px no-repeat;
  margin-right: 4px;
  width: 20px;
  height: 20px;
}

.zalo-otp-logo {
  background: url('../img/otp-zalo.svg') transparent 50% 50% / 16.8px 16.8px no-repeat;
  margin-right: 4px;
  width: 20px;
  height: 20px;
}

.whatsApp-otp-logo {
  background: url('../img/otp-whatsapp.svg') transparent 50% 50% / 17.9167px 17.9167px no-repeat;
  margin-right: 4px;
  width: 20px;
  height: 20px;
}

.phone-otp-logo {
  background: url('../img/otp-call.svg') transparent 50% 50% / 14.582px 14.582px no-repeat;
  margin-right: 4px;
  width: 20px;
  height: 20px;
}

.pos-relative {
  position: relative;
}

.ab-form-break {
  display: flex;
  width: 100%;
  margin: 14px 0;
  font-size: 11px;
  line-height: 20px;
  font-weight: 500;
  color: #8da2b5;
  text-transform: uppercase;
}

.ab-form-break>div:first-child,
.ab-form-break>div:last-child {
  flex: 1;
  position: relative;
}

.ab-form-break>div:first-child:before,
.ab-form-break>div:last-child:before {
  content: ' ';
  position: absolute;
  top: 50%;
  left: 0px;
  right: 0px;
  height: 1px;
  background-color: #e1e7ea;
}

.ab-form-break>div:first-child {
  margin-right: 10px;
}

.ab-form-break>div:last-child {
  margin-left: 10px;
}

/* Disabled radio buttons for SDT and Username/Email */
.config-radio-disabled {
  opacity: 0.45;
  cursor: not-allowed !important;
  pointer-events: none;
}

.config-radio-disabled input {
  cursor: not-allowed !important;
}

.config-radio-disabled .checkmark {
  border-color: #ccc !important;
  background-color: #f0f0f0 !important;
}

@media (max-width: 446px) {
  .ab-form-control {
    font-size: 11px;
    padding: 0 10px;
  }
}

/* Auth tabs (Đăng nhập / Đăng ký) */
.kc-auth-welcome {
  font-size: 28px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 8px;
}

.kc-auth-subtitle {
  font-size: 15px;
  color: #64748b;
  margin-bottom: 24px;
}

.kc-auth-tabs {
  display: flex;
  background-color: #f1f2f6;
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 28px;
}

.kc-auth-tab {
  flex: 1;
  text-align: center;
  padding: 10px 0;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  color: #64748b;
  text-decoration: none !important;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.kc-auth-tab:hover {
  color: #0f172a;
}

.kc-auth-tab.kc-auth-tab-active {
  background-color: #ffffff;
  color: #0f172a;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.15);
}

/* Field icons (user / password) on the login form */
.kc-field-icon {
  position: absolute;
  top: 50%;
  left: 15px;
  width: 20px;
  height: 20px;
  transform: translateY(-50%);
  pointer-events: none;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  z-index: 2;
}

.kc-field-icon-user {
  background-image: url("../img/user-icon.svg");
}

.kc-field-icon-password {
  background-image: url("../img/password-icon.svg");
}

.kc-has-field-icon input {
  padding-left: 45px !important;
}

.kc-has-field-icon label {
  left: 30px !important;
}

/* Recent Logins (Đăng nhập gần đây) */
.kc-recent-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.kc-recent-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 36px;
}

.kc-recent-logo img {
  height: 36px;
  width: auto;
}

.kc-recent-logo span {
  font-size: 20px;
  font-weight: 700;
  color: #00176B;
  margin-left: 2px;
}

.kc-recent-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  width: 100%;
}

.kc-recent-header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.kc-recent-title {
  font-size: 18px;
  font-weight: 600;
  color: #2C2E32;
  line-height: 22px;
  letter-spacing: 0;
  margin: 0;
  text-align: left;
}

.kc-recent-edit-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: #64748B;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.15s ease;
  padding: 0;
}

.kc-recent-edit-btn:hover {
  color: #00176B;
  background-color: #F1F5F9;
}

.kc-recent-subtitle {
  font-size: 14px;
  color: #64748b;
  margin-bottom: 0;
  display: none;
}

.kc-recent-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 290px;
  overflow-y: auto;
  padding-right: 4px;
  margin-bottom: 16px;
  width: 100%;
}

.kc-recent-list::-webkit-scrollbar {
  width: 5px;
}

.kc-recent-list::-webkit-scrollbar-thumb {
  background-color: #cbd5e1;
  border-radius: 4px;
}

.kc-form-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 24px;
}

.kc-btn-back-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: #ffffff;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  color: #374151;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.kc-btn-back-pill:hover {
  background: #F9FAFB;
  border-color: #D1D5DB;
}

.login-brand img,
.registration-brand img {
  height: 40px;
  width: auto;
  object-fit: contain;
}

.kc-form-header-logo {
  display: flex;
  align-items: center;
}

.kc-form-header-logo img {
  height: 24px;
  object-fit: contain;
}

.kc-form-header-logo span {
  font-size: 14px;
  font-weight: 700;
  color: #00176B;
  margin-left: 2px;
}

.auth-login-heading h1,
.auth-login-heading--reauth h1,
.registration-hero h1 {
  font-size: 24px !important;
  font-weight: 600 !important;
  line-height: 30px !important;
  letter-spacing: 0 !important;
  color: #2C2E32 !important;
  margin: 0 0 6px 0 !important;
}

.auth-login-heading p,
.auth-login-heading--reauth p,
.registration-hero p {
  font-weight: 400 !important;
  font-size: 12px !important;
  line-height: 16px !important;
  letter-spacing: 0 !important;
  text-align: center !important;
  color: #686D76 !important;
  max-width: 330px !important;
  margin: 0 auto !important;
}

.auth-mode-tabs {
  display: flex;
  align-items: center;
  width: 228px;
  max-width: 100%;
  height: 40px;
  margin: 20px auto 28px;
  padding: 2px;
  border-radius: 10px;
  background: #f0f0f1;
  box-sizing: border-box;
}

.auth-mode-tab {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  width: 110px;
  height: 36px;
  border-radius: 8px;
  color: #686d76;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  box-sizing: border-box;
}

.auth-mode-tab:hover,
.auth-mode-tab:focus {
  color: #00176b;
  text-decoration: none;
}

.auth-mode-tab--active {
  color: #2c2e32;
  background: #ffffff;
  border: 1px solid #F0F0F1;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 23, 107, 0.12);
}

.auth-field label,
.registration-phone-field label,
.registration-step--phone .registration-phone-field>label,
.reset-field label {
  font-size: 13px !important;
  font-weight: 500 !important;
  line-height: 18px !important;
  letter-spacing: 0 !important;
  color: #2C2E32 !important;
  margin: 0 0 6px !important;
  display: block !important;
}

.auth-login-options>a {
  font-size: 13px;
  font-weight: 500;
  line-height: 18px;
  letter-spacing: 0;
  color: #2C2E32;
  text-decoration: none;
}

@media (min-width: 768px) {

  html,
  body {
    height: 100%;
    overflow: hidden;
  }

  body:has(.login-screen) #kc-container-wrapper,
  body:has(.registration-screen) #kc-container-wrapper,
  body:has(.reset-password-screen) #kc-container-wrapper {
    height: 100vh !important;
    max-height: 100vh !important;
    min-height: 0 !important;
    padding: 20px 24px !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  body:has(.login-screen) #kc-left-container,
  body:has(.registration-screen) #kc-left-container,
  body:has(.reset-password-screen) #kc-left-container {
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    height: 100% !important;
    box-sizing: border-box !important;
    padding: 0 40px !important;
  }

  body:has(.login-screen) #kc-content-wrapper,
  body:has(.login-screen) #kc-form,
  body:has(.login-screen) #kc-form-wrapper,
  body:has(.login-screen) .login-screen,
  body:has(.registration-screen) #kc-content-wrapper,
  body:has(.registration-screen) #kc-form,
  body:has(.registration-screen) #kc-form-wrapper,
  body:has(.registration-screen) .registration-screen,
  body:has(.registration-screen) .registration-content,
  body:has(.reset-password-screen) #kc-content-wrapper,
  body:has(.reset-password-screen) #kc-form,
  body:has(.reset-password-screen) #kc-form-wrapper,
  body:has(.reset-password-screen) .registration-screen {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 !important;
    min-height: 0 !important;
  }

  .login-brand,
  .registration-nav,
  .registration-brand {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    flex: 0 0 auto !important;
  }

  .auth-login-form {
    margin-top: auto !important;
    margin-bottom: 0 !important;
    flex: 0 0 auto !important;
  }

  /* When registration hero title is visible, group it with the form and center together */
  .registration-hero:not(.ng-hide) {
    margin-top: auto !important;
    margin-bottom: 24px !important;
    flex: 0 0 auto !important;
  }

  .registration-hero:not(.ng-hide) + #kc-register-form,
  .registration-hero:not(.ng-hide) + .registration-auth-flow,
  .registration-hero:not(.ng-hide) + .reset-password-flow,
  .registration-hero:not(.ng-hide) + #kc-idp-onboarding-form {
    margin-top: 0 !important;
    margin-bottom: auto !important;
    flex: 0 0 auto !important;
  }

  /* When registration hero is hidden (e.g. OTP step 1 & 2), center form alone */
  body:has(.registration-screen) #kc-register-form,
  body:has(.registration-screen) .registration-auth-flow,
  body:has(.reset-password-screen) .reset-password-flow {
    margin-top: auto !important;
    margin-bottom: auto !important;
    flex: 0 0 auto !important;
  }

  body:has(.registration-screen) #kc-register-form > .registration-auth-flow,
  body:has(.registration-screen) #kc-register-form > .registration-step,
  body:has(.registration-screen) #kc-register-form > .registration-wizard {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }

  body:has(.login-screen) .kc-recent-container {
    margin-top: auto !important;
    margin-bottom: auto !important;
  }

  body:has(.login-screen) .kc-auth-terms,
  body:has(.login-screen) .auth-login-form:last-child,
  body:has(.login-screen) .auth-social-login:last-child {
    margin-bottom: auto !important;
  }

  body:has(.login-screen) #kc-footer-wrapper,
  body:has(.registration-screen) #kc-footer-wrapper,
  body:has(.reset-password-screen) #kc-footer-wrapper {
    flex: 0 0 auto !important;
    margin-top: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* Footer Consistency across Login & Registration */
#kc-footer-wrapper {
  width: 100% !important;
  max-width: 100% !important;
}

#kc-footer {
  width: 100% !important;
  border-top: none !important;
}

#kc-footer hr {
  display: block !important;
  border: 0 !important;
  border-top: 1px solid #F0F0F1 !important;
  margin: 16px 0 !important;
  width: 100% !important;
}

.footer-groups {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
}

#kc-copyright,
#kc-copyright span {
  font-size: 12px !important;
  font-weight: 400 !important;
  color: #686D76 !important;
}

.login-brand {
  margin-bottom: 20px !important;
}

.auth-login-heading {
  margin: 0 0 14px !important;
}

.auth-mode-tabs {
  margin: 14px auto 20px !important;
}

.auth-field {
  margin-bottom: 12px !important;
}

.auth-login-options {
  margin: 12px 0 16px !important;
}

.auth-social-login {
  margin-top: 14px !important;
}

.auth-social-divider {
  margin: 0 0 14px !important;
}

.kc-auth-terms {
  margin-top: 14px !important;
  font-size: 11px !important;
  line-height: 15px !important;
}

.auth-remember {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  cursor: pointer;
}

.auth-remember input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin: 0;
  border-radius: 6px;
  border: 1px solid #BABCC0;
  opacity: 1;
  accent-color: #00176B;
  cursor: pointer;
}

.auth-remember span {
  font-weight: 400;
  font-size: 13px;
  line-height: 18px;
  letter-spacing: 0;
  color: #4A4D54;
}

.kc-recent-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 12px 16px;
  background: #ffffff;
  border: 1px solid #EAECF0;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  user-select: none;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  margin-bottom: 0;
}

.kc-recent-card:hover {
  border-color: #CBD5E1;
  background-color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(16, 24, 40, 0.08);
}

.kc-recent-card-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

.kc-recent-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: #2563EB;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 18px;
  flex-shrink: 0;
  border: none;
  box-shadow: none;
}

.kc-recent-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.kc-recent-info {
  display: flex;
  flex-direction: column;
  text-align: left;
  flex: 1;
  min-width: 0;
  justify-content: center;
}

.kc-recent-name {
  font-size: 14px;
  font-weight: 500;
  color: #2C2E32;
  line-height: 20px;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kc-recent-identifier {
  font-size: 12px;
  font-weight: 400;
  color: #686D76;
  line-height: 16px;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kc-recent-arrow {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  flex-shrink: 0;
  margin-left: 8px;
  transition: transform 0.2s ease, color 0.2s ease;
}

.kc-recent-card:hover .kc-recent-arrow {
  transform: translateX(3px);
}

.kc-recent-card:hover .kc-recent-arrow svg path {
  stroke: #00176B;
}

.kc-recent-delete-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
  margin-left: 8px;
  font-size: 18px;
}

.kc-recent-delete-btn:hover {
  background-color: #fee2e2;
  color: #ef4444;
}

.kc-btn-add-account {
  width: 100%;
  height: 44px;
  border: 0;
  border-radius: 8px;
  background: #00176B;
  color: #ffffff;
  font-weight: 600;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 20px;
}

.kc-btn-add-account:hover {
  background-color: #0c247b;
  color: #ffffff;
}

.kc-btn-register-account {
  width: 100%;
  height: 44px;
  margin-top: 10px;
  border: 1px solid #D0D5DD;
  border-radius: 8px;
  color: #1D2939;
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.kc-btn-register-account:hover {
  background-color: #F8FAFC;
  border-color: #98A2B3;
  color: #1D2939;
  text-decoration: none;
}

/* Selected Account Card (Horizontal Rounded Box matching Figma) */
.kc-selected-account-banner {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  padding: 12px 16px;
  background: #F8FAFC;
  border: 1px solid #F1F5F9;
  border-radius: 14px;
  margin: 0 0 20px;
  width: 100%;
  box-sizing: border-box;
}

.kc-selected-account-user {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  min-width: 0;
  width: 100%;
}

.kc-selected-account-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: #2563EB;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 16px;
  flex-shrink: 0;
  border: none;
  box-shadow: none;
}

.kc-selected-account-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.kc-selected-account-text {
  text-align: left;
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.kc-selected-account-name {
  font-size: 15px;
  font-weight: 600;
  color: #1E293B;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.kc-selected-account-identifier {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  color: #64748B;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.auth-submit:disabled,
.auth-submit--inactive {
  background-color: #B4BFD8 !important;
  color: #ffffff !important;
  cursor: not-allowed !important;
  opacity: 0.85;
}

.kc-auth-terms,
.registration-step--phone .registration-terms,
.registration-terms {
  margin-top: 20px !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  color: #686D76 !important;
  text-align: center !important;
  line-height: 16px !important;
  padding: 0 8px !important;
}

.kc-auth-terms a,
.registration-step--phone .registration-terms a,
.registration-terms a {
  color: #0066FF !important;
  text-decoration: none !important;
  font-weight: 500 !important;
}

.kc-auth-terms a:hover,
.registration-step--phone .registration-terms a:hover,
.registration-terms a:hover {
  text-decoration: underline !important;
}

.kc-btn-change-account {
  align-self: flex-start;
  color: #2c2e32;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  margin: 0 0 22px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid #e1e5ec;
  transition: all 0.15s ease;
}

.kc-btn-change-account:hover {
  background-color: #e0e7ff;
  color: #00176B;
  text-decoration: none;
}

/* Modal Popup Confirm Delete */
.kc-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  animation: kcFadeIn 0.15s ease-out;
}

.kc-modal-dialog {
  background: #FFFFFF;
  border-radius: 18px;
  padding: 24px;
  width: 90%;
  max-width: 380px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  text-align: center;
  animation: kcScaleUp 0.15s ease-out;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

@keyframes kcFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes kcScaleUp {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.kc-modal-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #fee2e2;
  color: #ef4444;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 22px;
}

.kc-modal-header-icon--edit {
  border-radius: 12px;
  width: 48px;
  height: 48px;
  background: #f1f5f9;
  color: #64748b;
}

.kc-modal-header-icon--edit svg {
  width: 20px;
  height: 20px;
}

.kc-modal-header-icon--edit img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.kc-modal-dialog--delete {
  max-width: 380px;
  text-align: center;
}

.kc-modal-title {
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 8px;
}

.kc-modal-message {
  font-size: 14px;
  color: #64748b;
  margin-bottom: 20px;
  line-height: 1.5;
}

.kc-modal-actions {
  display: flex;
  gap: 12px;
}

.kc-modal-btn {
  flex: 1;
  height: 42px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  border: none;
}

.kc-modal-btn-cancel {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.kc-modal-btn-cancel:hover {
  background: #e2e8f0;
  color: #1e293b;
}

.kc-modal-btn-delete {
  background: #ef4444;
  color: #ffffff;
}

.kc-modal-btn-delete:hover {
  background: #dc2626;
}

/* Manage modal (Gỡ tài khoản khỏi trình duyệt này) — multi-row, reuses kc-modal-* + kc-recent-* */
.kc-modal-dialog--manage {
  position: relative;
  width: 480px;
  max-width: calc(100vw - 24px);
  min-height: 384px;
  text-align: center;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  gap: 0;
  box-sizing: border-box;
  border: 1px solid #f0f0f1;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.kc-modal-dialog--manage .kc-modal-close {
  position: absolute;
  width: 24px;
  height: 24px;
  right: 20px;
  top: 20px;
  z-index: 3;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kc-modal-dialog--manage .kc-modal-close::before,
.kc-modal-dialog--manage .kc-modal-close::after {
  content: "";
  position: absolute;
  width: 13.5px;
  height: 1.5px;
  left: 5.25px;
  top: 11.25px;
  background: #4A4D54;
}

.kc-modal-dialog--manage .kc-modal-close::before {
  transform: rotate(45deg);
}

.kc-modal-dialog--manage .kc-modal-close::after {
  transform: rotate(-45deg);
}

.kc-manage-header {
  position: relative;
  width: 100%;
  min-height: 128px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  isolation: isolate;
  background:
    radial-gradient(50% 50% at 50% 50%, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0) 100%),
    linear-gradient(rgba(234, 236, 240, 0.9) 1px, transparent 1px),
    linear-gradient(90deg, rgba(234, 236, 240, 0.9) 1px, transparent 1px);
  background-size: 336px 336px, 24px 24px, 24px 24px;
  background-position: center -4px, center, center;
}

.kc-manage-header::after {
  content: "";
  position: absolute;
  width: 336px;
  height: 336px;
  left: 50%;
  top: -116px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(50% 50% at 50% 50%, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
  z-index: 0;
}

.kc-modal-dialog--manage .kc-modal-header-icon {
  position: relative;
  width: 40px;
  height: 40px;
  margin: 0;
  background: linear-gradient(180deg, #ffffff 0%, #d9dee7 100%);
  border: 1px solid #d8dde6;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  z-index: 1;
}

.kc-modal-dialog--manage .kc-modal-header-icon img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.kc-modal-dialog--manage .kc-modal-title {
  width: 100%;
  max-width: 432px;
  font-style: normal;
  font-weight: 500;
  font-size: 16px;
  line-height: 24px;
  text-align: center;
  color: #2C2E32;
  margin: 0;
  padding: 0;
  z-index: 1;
}

.kc-modal-header-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #f1f5f9;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 24px;
}

.kc-modal-header-icon svg {
  width: 24px;
  height: 24px;
}

.kc-modal-dialog--removed {
  max-width: 420px;
  text-align: center;
  padding: 0;
  overflow: hidden;
}

.kc-modal-dialog--removed .kc-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
}

.kc-modal-dialog--removed>div:nth-child(2),
.kc-modal-dialog--removed .kc-modal-header-icon,
.kc-modal-dialog--removed .kc-modal-title {
  padding-left: 24px;
  padding-right: 24px;
}

.kc-modal-dialog--removed>div:first-of-type {
  padding: 24px 24px 0;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 20px;
  margin-bottom: 0;
}

.kc-manage-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 232px;
  overflow-y: auto;
  margin: 0;
  padding: 0 24px 24px;
  width: 100%;
  box-sizing: border-box;
}

.kc-manage-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 16px 12px;
  border: 1px solid #eaecf0;
  border-radius: 16px;
  background: #FFFFFF;
  box-sizing: border-box;
  box-shadow: none;
}

.kc-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.kc-modal-close::before,
.kc-modal-close::after {
  content: "";
  position: absolute;
  top: 13px;
  left: 7px;
  width: 14px;
  height: 2px;
  border-radius: 2px;
  background: #6b7280;
}

.kc-modal-close::before {
  transform: rotate(45deg);
}

.kc-modal-close::after {
  transform: rotate(-45deg);
}

.kc-recent-avatar--sm {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #2563EB;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  flex-shrink: 0;
  border-width: 0;
  overflow: hidden;
}

.kc-recent-avatar--sm img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.kc-modal-dialog--manage .kc-recent-info {
  gap: 2px;
  align-items: flex-start;
  flex: 1;
  min-width: 0;
}

.kc-modal-dialog--manage .kc-recent-name {
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  color: #2c2e32;
}

.kc-modal-dialog--manage .kc-recent-identifier {
  font-size: 12px;
  line-height: 18px;
  color: #686D76;
}

.kc-manage-remove-btn {
  flex-shrink: 0;
  min-width: 52px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid #d0d5dd;
  border-radius: 10px;
  background: #FFFFFF;
  color: #2C2E32;
  font-size: 13px;
  line-height: 20px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  box-sizing: border-box;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
}

.kc-manage-remove-btn:hover {
  background: #F8FAFB;
  border-color: #c7ceda;
  color: #2C2E32;
}

.kc-manage-list::-webkit-scrollbar {
  width: 6px;
}

.kc-manage-list::-webkit-scrollbar-thumb {
  background: rgba(208, 213, 221, 0.9);
  border-radius: 999px;
}

.kc-manage-list::-webkit-scrollbar-track {
  background: transparent;
}

.kc-manage-empty {
  width: calc(100% - 48px);
  margin: 0 24px 24px;
  padding: 24px 16px;
  border: 1px solid #eaecf0;
  border-radius: 16px;
  background: #FFFFFF;
  box-sizing: border-box;
}

@media (max-width: 767px) {
  .kc-modal-dialog--manage {
    width: calc(100vw - 24px);
    min-height: 0;
    border-radius: 20px;
  }

  .kc-modal-dialog--manage .kc-modal-close {
    right: 20px;
    top: 20px;
  }

  .kc-manage-header {
    min-height: 128px;
    padding: 24px 20px;
    gap: 18px;
    background-size: 336px 336px, 24px 24px, 24px 24px;
  }

  .kc-modal-dialog--manage .kc-modal-header-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
  }

  .kc-modal-dialog--manage .kc-modal-header-icon img {
    width: 20px;
    height: 20px;
  }

  .kc-modal-dialog--manage .kc-modal-title {
    max-width: 260px;
    font-size: 16px;
    line-height: 1.4;
  }

  .kc-manage-list {
    gap: 12px;
    padding: 0 16px;
    padding-bottom: 16px;
    max-height: min(50vh, 320px);
  }

  .kc-manage-row {
    min-height: 72px;
    gap: 12px;
    padding: 16px 12px;
    border-radius: 16px;
  }

  .kc-recent-avatar--sm {
    width: 40px;
    height: 40px;
    font-size: 13px;
  }

  .kc-modal-dialog--manage .kc-recent-info {
    gap: 2px;
  }

  .kc-modal-dialog--manage .kc-recent-name {
    font-size: 14px;
  }

  .kc-modal-dialog--manage .kc-recent-identifier {
    font-size: 12px;
  }

  .kc-manage-remove-btn {
    min-width: 52px;
    height: 36px;
    padding: 0 14px;
    border-width: 1px;
    border-radius: 10px;
    font-size: 13px;
  }

  .kc-manage-empty {
    width: calc(100% - 32px);
    margin: 0 16px 16px;
    padding: 24px 16px;
    border-radius: 16px;
  }
}

.kc-modal-btn--full {
  width: 100%;
}

.kc-link-saved-accounts {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #00176B;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 18px;
  text-decoration: none;
  transition: color 0.15s ease;
}

.kc-link-saved-accounts:hover {
  color: #34358b;
  text-decoration: none;
}


/* Registration wizard overrides: this file loads after login.css. */
.registration-screen .registration-wizard--step-3 .registration-progress-item.is-active {
  min-height: 54px;
  padding: 10px 10px 4px;
  border-bottom: 0;
  border-radius: 16px 16px 0 0;
}

.registration-screen .registration-wizard--step-3 .registration-step--profile {
  /* Track the wizard column so the card halves stay flush on small screens. */
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0 16px 12px 41px;
  border: 1px solid #f0f0f1;
  border-top: 0;
  border-radius: 0 0 16px 16px;
  box-shadow: 0 2px 4px -1px rgba(0, 0, 0, .06), 0 4px 6px -1px rgba(0, 0, 0, .10);
}

.registration-screen .registration-wizard--step-3 .registration-step-description {
  margin: 0 0 16px !important;
  color: #686d76;
  font-size: 12px;
  font-weight: 400;
  line-height: 16px;
  text-align: left;
}

.registration-screen .registration-wizard--step-3 .registration-personal-fields .custom-input-wrapper {
  display: flex;
  flex-direction: column;
  margin: 0 0 10px;
  padding-top: 0 !important;
}

.registration-screen .registration-wizard--step-3 .registration-personal-fields .custom-input-wrapper>label {
  position: static !important;
  top: auto !important;
  right: auto !important;
  order: -1;
  display: block;
  margin: 0 0 6px;
  padding: 0;
  transform: none !important;
  color: #2c2e32;
  font-size: 13px;
  font-weight: 500;
  line-height: 16px;
}

.registration-screen .registration-wizard--step-3 .registration-personal-fields .custom-input-wrapper>input.form-control {
  box-sizing: border-box;
  width: 100%;
  height: 40px;
  min-height: 40px;
  padding: 0 34px 0 10px;
  border: 1px solid #f0f0f1;
  border-radius: 10px;
  background: #ffffff;
  color: #2c2e32;
  font-size: 13px;
  line-height: 40px;
}

.registration-screen .registration-wizard--step-3 .registration-personal-fields .custom-input-wrapper>input.form-control::placeholder {
  color: #babcc0;
  opacity: 1;
}

.registration-screen .registration-wizard--step-3 .registration-personal-fields .custom-input-wrapper>input.form-control.is-filled {
  background: #f7f9fc;
}

.registration-screen .registration-wizard--step-3 .registration-personal-fields .custom-input-wrapper>input.form-control.input-error {
  border-color: #f30c0c;
}

.registration-screen .registration-wizard--step-3 .registration-personal-fields .registration-field-error-icon {
  right: 10px;
  bottom: 12px;
  width: 16px;
  height: 16px;
  background: url('../img/danger.svg') center / 16px 16px no-repeat;
}

.registration-screen .registration-wizard--step-3 .registration-personal-fields .text-danger {
  margin-top: -4px;
  color: #f30c0c;
  font-size: 12px;
  line-height: 16px;
}

.registration-screen .registration-wizard--step-3 .registration-wizard-action--next {
  width: auto;
  min-width: 0;
  height: 36px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  line-height: 36px;
}

/* Keep the organization domain label above its field, not centered in the row. */
.registration-screen .registration-wizard--step-4 .org-group-input {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding-top: 0 !important;
}

.registration-screen .registration-wizard--step-4 .org-group-input>label {
  position: static !important;
  top: auto !important;
  left: auto !important;
  order: -1;
  align-self: flex-start;
  margin: 0 0 6px;
  padding: 0;
  transform: none !important;
  color: #2c2e32;
  font-size: 13px;
  font-weight: 500;
  line-height: 16px;
}

.registration-screen .registration-wizard--step-4 .registration-field-valid-icon {
  width: 15px;
  height: 15px;
  border: 0;
  border-radius: 0;
  background: url('../img/success.svg') center / 15px 15px no-repeat;
  color: transparent;
  font-size: 0;
}

.registration-screen .registration-wizard--step-4 .registration-field-error-icon {
  width: 16px;
  height: 16px;
  background: url('../img/danger.svg') center / 16px 16px no-repeat;
}

/*
 * Domain status icons belong inside the domain input, not in the
 * ".antbuddy.com" suffix that sits next to it — the input stops 98px short of
 * the row's right edge, so inset the icons past the suffix.
 */
.registration-screen .registration-wizard--step-4 .org-group-input>.registration-field-error-icon,
.registration-screen .registration-wizard--step-4 .org-group-input>.registration-field-valid-icon {
  right: 106px;
  bottom: 12px;
}

.registration-screen .registration-wizard--step-4 .registration-field-success {
  margin: -4px 0 8px;
  color: #28b83e;
  font-size: 12px;
  font-weight: 400;
  line-height: 16px;
}

/* Password setup (step 3): compact default, filled, and error states. */
.registration-screen .registration-wizard--step-5 .registration-step--profile {
  /* Track the wizard column so the card halves stay flush on small screens. */
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0 16px 12px 41px;
  border: 1px solid #f0f0f1;
  border-top: 0;
  border-radius: 0 0 16px 16px;
  box-shadow: 0 2px 4px -1px rgba(0, 0, 0, .06), 0 4px 6px -1px rgba(0, 0, 0, .10);
}

.registration-screen .registration-wizard--step-5 .registration-step-description {
  margin: 0 0 16px !important;
  color: #686d76;
  font-size: 12px;
  font-weight: 400;
  line-height: 16px;
  text-align: left;
}

.registration-screen .registration-wizard--step-5 .registration-password-fields .custom-input-wrapper {
  display: flex;
  flex-direction: column;
  margin: 0 0 10px;
  padding-top: 0 !important;
}

.registration-screen .registration-wizard--step-5 .registration-password-fields .custom-input-wrapper>label {
  position: static !important;
  top: auto !important;
  right: auto !important;
  order: -1;
  display: block;
  margin: 0 0 6px;
  padding: 0;
  transform: none !important;
  color: #2c2e32;
  font-size: 13px;
  font-weight: 500;
  line-height: 16px;
}

.registration-screen .registration-wizard--step-5 .registration-password-fields .custom-input-wrapper>input.form-control {
  box-sizing: border-box;
  width: 100%;
  height: 40px;
  min-height: 40px;
  padding: 0 58px 0 10px;
  border: 1px solid #f0f0f1;
  border-radius: 10px;
  background: #ffffff;
  color: #2c2e32;
  font-size: 13px;
  line-height: 40px;
}

.registration-screen .registration-wizard--step-5 .registration-password-fields .custom-input-wrapper>input.form-control::placeholder {
  color: #babcc0;
  opacity: 1;
}

.registration-screen .registration-wizard--step-5 .registration-password-fields .custom-input-wrapper>input.form-control.is-filled {
  background: #f7f9fc;
}

.registration-screen .registration-wizard--step-5 .registration-password-fields .custom-input-wrapper>input.form-control.input-error {
  border-color: #f30c0c;
  box-shadow: none;
}

.registration-screen .registration-wizard--step-5 .registration-password-fields .show-password,
.registration-screen .registration-wizard--step-5 .registration-password-fields .hide-password {
  top: auto;
  right: 8px;
  bottom: 11px;
  width: 18px;
  height: 18px;
  margin: 0;
  background-size: 18px 18px;
}

.registration-screen .registration-wizard--step-5 .registration-password-fields .registration-field-error-icon {
  right: 36px;
  bottom: 12px;
  width: 16px;
  height: 16px;
  background: url('../img/danger.svg') center / 16px 16px no-repeat;
}

.registration-screen .registration-wizard--step-5 .registration-password-fields .text-danger,
.registration-screen .registration-wizard--step-5 .registration-password-fields .registration-field-success {
  margin: -4px 0 8px;
  font-size: 12px;
  font-weight: 400;
  line-height: 16px;
}

.registration-screen .registration-wizard--step-5 .registration-password-fields .text-danger {
  color: #f30c0c;
}

.registration-screen .registration-wizard--step-5 .registration-password-fields .registration-field-success {
  color: #28b83e;
}

.registration-screen .registration-wizard--step-5 .registration-wizard-action--submit {
  display: flex;
  width: 100% !important;
  height: 36px;
  min-height: 36px;
  margin: 16px 0 10px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  line-height: 36px;
}

.registration-screen .registration-wizard--step-5 .registration-wizard-terms {
  margin: 0;
  color: #4a4d54;
  font-size: 12px;
  line-height: 16px;
  text-align: center;
}

/* Password Re-authentication Form (Screen 2: Nhập lại mật khẩu) */
.kc-reauth-form {
  display: flex !important;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
}

.kc-reauth-back-btn {
  align-self: flex-start;
  color: #2c2e32;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  margin: 0 0 22px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid #e1e5ec;
  transition: all 0.15s ease;
}

.kc-reauth-back-btn:hover {
  background-color: #e0e7ff;
  color: #00176B;
  text-decoration: none;
}

.kc-reauth-header {
  text-align: center;
  margin-bottom: 28px;
}

.kc-reauth-header h1 {
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.kc-reauth-account-banner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  padding: 0;
  background: transparent;
  border: 0;
}

.kc-reauth-account-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  background: #00176B;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 30px;
  flex-shrink: 0;
  border: 6px solid #ffffff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.14);
}

.kc-reauth-account-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.kc-reauth-account-text {
  text-align: center;
  min-width: 0;
  width: 100%;
}

.kc-reauth-account-name {
  display: block;
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kc-reauth-account-identifier {
  display: block;
  margin-top: 8px;
  font-size: 16px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kc-reauth-remember-password {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 14px;
  margin-bottom: 14px;
  cursor: pointer;
}

.kc-reauth-remember-password input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  margin-right: 8px;
  accent-color: #00176B;
}

.kc-reauth-remember-password span:first-of-type {
  font-weight: 600;
  color: #0f172a;
  font-size: 14px;
  display: flex;
  align-items: center;
}

.kc-reauth-remember-password span:first-of-type input {
  margin-right: 8px;
}

.kc-reauth-remember-hint {
  font-size: 12px;
  color: #64748b;
  font-weight: 400;
  margin-left: 26px;
}

/* Modal Popup Styles */
.kc-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.kc-modal-content {
  background: white;
  border-radius: 12px;
  padding: 32px;
  max-width: 400px;
  width: 90%;
  position: relative;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.kc-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: #f0f0f0;
  border: none;
  border-radius: 6px;
  width: 32px;
  height: 32px;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kc-modal-close:hover {
  background: #e0e0e0;
}

.kc-modal-header {
  text-align: center;
  margin-bottom: 24px;
}

.kc-modal-icon {
  width: 48px;
  height: 48px;
}

.kc-modal-account {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 8px;
  margin-bottom: 20px;
}

.kc-modal-account-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.kc-modal-account-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.kc-modal-account-info {
  flex: 1;
  min-width: 0;
}

.kc-modal-account-name {
  display: block;
  font-weight: 600;
  font-size: 14px;
  color: #000;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kc-modal-account-email {
  display: block;
  font-size: 12px;
  color: #64748b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kc-modal-edit-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.kc-modal-edit-btn img {
  width: 20px;
  height: 20px;
}

.kc-modal-title {
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  color: #000;
  margin-bottom: 20px;
}

.kc-modal-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.kc-modal-form .auth-field {
  margin: 0;
}

.kc-modal-form input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d0d0d0;
  border-radius: 6px;
  font-size: 14px;
}

.kc-modal-form input:focus {
  outline: none;
  border-color: #00176b;
  box-shadow: 0 0 0 3px rgba(0, 23, 107, 0.1);
}

.kc-modal-submit {
  width: 100%;
  padding: 10px 12px;
  background: #00176b;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.kc-modal-submit:hover:not(:disabled) {
  background: #001856;
}

.kc-modal-submit:disabled {
  background: #b0b7d1;
  cursor: not-allowed;
}

/* Right Banner Styling */
#kc-right-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: linear-gradient(180deg, #F0F4FF 0%, #F8FAFC 100%);
  border-radius: 24px;
  border: 1px solid #E2E8F0;
  overflow: hidden;
  padding: 32px 32px 24px;
  box-sizing: border-box;
}

.kc-right-banner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 100%;
  min-height: 0;
  text-align: center;
}

.kc-banner-header {
  margin-top: 0;
  margin-bottom: 0;
  flex: 0 0 auto;
}

.kc-banner-title {
  font-weight: 700;
  font-size: 28px;
  line-height: 100%;
  letter-spacing: 0;
  text-align: center;
  text-transform: uppercase;
  color: #090A0A;
  margin: 0 0 6px 0;
}

.kc-banner-subtitle {
  font-weight: 500;
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0;
  color: #00176B;
  margin: 0;
}

.kc-banner-graphic {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  width: 100%;
  max-width: 680px;
  min-height: 0;
  margin: 16px 0;
  overflow: hidden;
}

.kc-banner-graphic img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.kc-banner-footer {
  margin-top: 0;
  margin-bottom: 0;
  flex: 0 0 auto;
}

.kc-banner-footer p {
  font-weight: 600;
  font-size: 16px;
  line-height: 100%;
  letter-spacing: 0;
  color: #2C2E32;
  margin: 0;
}

.kc-banner-footer .text-pink {
  color: #EF3E67;
}

.text-pink {
  color: #FF3867;
}

/* Phone prefix placeholder color sync */
.registration-phone-prefix {
  color: #babcc0 !important;
  transition: color 0.15s ease;
}

.registration-phone-control:has(input:not(:placeholder-shown)) .registration-phone-prefix,
.registration-phone-control:has(input.ng-not-empty) .registration-phone-prefix,
.registration-phone-control:has(input:focus) .registration-phone-prefix,
.registration-phone-control:has(input:-webkit-autofill) .registration-phone-prefix {
  color: #2c2e32 !important;
}

/* Ensure inner input inside phone control has no border or background of its own */
.registration-phone-control input,
.registration-phone-control input:focus,
.registration-phone-control input:not(:placeholder-shown),
.registration-phone-control .form-control,
.registration-phone-control .form-control:focus,
.registration-phone-control .form-control:not(:placeholder-shown) {
  border: none !important;
  border-left: none !important;
  outline: none !important;
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
}

/* Input font consistency */
.auth-field input,
.registration-phone-control input,
.form-control {
  font-size: 14px !important;
  font-weight: 400 !important;
  color: #2C2E32 !important;
}

/* Ensure .auth-input-control parent wrapper never draws background or border of its own */
.auth-input-control {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

/* Input focused/typing state -> Background WHITE #ffffff */
.registration-phone-control:focus-within,
.custom-input-wrapper:focus-within,
.auth-field input:focus,
.login-screen input:focus,
.form-control:not(.registration-phone-control input):focus {
  background: #ffffff !important;
  background-color: #ffffff !important;
  border: 1px solid #F0F0F1 !important;
  border-radius: 10px !important;
  box-shadow: none !important;
}

/* Input filled state (has value / autofilled and unfocused) -> Background #F7F9FC */
.registration-phone-control:has(input:not(:placeholder-shown)):not(:focus-within),
.registration-phone-control:has(input.ng-not-empty):not(:focus-within),
.registration-phone-control:has(input:-webkit-autofill):not(:focus-within),
.custom-input-wrapper:has(input:not(:placeholder-shown)):not(:focus-within),
.custom-input-wrapper:has(input.ng-not-empty):not(:focus-within),
.custom-input-wrapper:has(input:-webkit-autofill):not(:focus-within),
.auth-field input:not(:placeholder-shown):not(:focus),
.auth-field input.ng-not-empty:not(:focus),
.login-screen input:not(:placeholder-shown):not(:focus),
.login-screen input.ng-not-empty:not(:focus),
.form-control:not(.registration-phone-control input):not(:placeholder-shown):not(:focus),
.form-control:not(.registration-phone-control input).ng-not-empty:not(:focus) {
  background: #F7F9FC !important;
  background-color: #F7F9FC !important;
  border: 1px solid #F0F0F1 !important;
  border-radius: 10px !important;
  box-shadow: none !important;
}

.registration-phone-control.has-error,
.auth-field--invalid .auth-input-control,
.auth-field--invalid input {
  border-color: #f30c0c !important;
}

/* Fix browser autofill background tint override */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px #F7F9FC inset !important;
  -webkit-text-fill-color: #2C2E32 !important;
  caret-color: #2C2E32 !important;
  transition: background-color 5000s ease-in-out 0s;
}

input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
  -webkit-text-fill-color: #2C2E32 !important;
}

/* Fix vertical alignment for registration continue button and arrow icon */
.registration-phone-continue,
.registration-step--phone .registration-phone-continue {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  line-height: normal !important;
}

.registration-phone-continue > span,
.registration-step--phone .registration-phone-continue > span {
  display: inline-flex !important;
  align-items: center !important;
  line-height: 1 !important;
}

.registration-phone-continue > span:last-child,
.registration-step--phone .registration-phone-continue > span:last-child {
  font-size: 20px !important;
  font-weight: 400 !important;
  line-height: 1 !important;
  transform: none !important;
  margin: 0 !important;
}

.auth-input--readonly,
input.auth-input--readonly {
  background: #F7F9FC !important;
  background-color: #F7F9FC !important;
  border: 1px solid #F0F0F1 !important;
  border-radius: 10px !important;
  color: #2C2E32 !important;
  text-align: center !important;
  font-weight: 500 !important;
  height: 44px !important;
  padding: 0 16px !important;
  cursor: default !important;
  user-select: all !important;
}