.htpl-zalo-auth {
  text-align: center;
  padding: clamp(14px,3vw,22px);
  margin: 0 0 20px;
  border: 1px solid #cadfff;
  border-radius: 16px;
  background: linear-gradient(145deg,#eaf3ff,#fff 72%);
  color: #152742;
}
.htpl-zalo-auth [hidden], .htpl-zalo-auth [role="status"]:empty { display: none !important; }
#htpl-zalo-auth {
  box-sizing: border-box;
  width: 100%;
  max-width: 42rem;
  margin-inline: auto;
  padding: clamp(16px,4vw,30px);
  background: linear-gradient(180deg,#edf5ff,#fff 88%);
}
.htpl-zalo-auth-header { display: grid; justify-items: center; gap: 12px; margin-bottom: 20px; }
.htpl-zalo-brand {
  display: block; width: 46px; height: 46px; object-fit: contain;
}
.htpl-zalo-auth-header .htpl-zalo-brand { border-radius: 12px; box-shadow: 0 4px 12px #0058dc20; }
.htpl-zalo-auth :is(h1,h3) { margin: 0 0 4px; font-size: 1.18rem; line-height: 1.25; font-weight: 750; color: #12396b; }
.htpl-zalo-auth p { margin: 0 0 9px; font-size: .92rem; line-height: 1.5; }
.htpl-zalo-auth-header p { max-width: 29rem; margin: 6px auto 0; color: #405a7b; }
.htpl-zalo-auth label { margin: 0 0 5px; font-weight: 650; font-size: .88rem; }
#htpl-zalo-phone-form {
  display: grid;
  grid-template-columns: minmax(0,1fr);
  gap: 8px;
  width: min(100%,22rem);
  margin-inline: auto;
}
#htpl-zalo-phone-form label { margin: 0; color: #12396b; }
#htpl-zalo-login-phone {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid #afc8e6;
  border-radius: 10px;
  background: #fff;
  color: #152742;
  font-size: 1rem;
  text-align: center;
}
#htpl-zalo-login-phone::placeholder { color: #526b89; opacity: 1; }
.htpl-zalo-auth-row { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; }
.htpl-zalo-auth .btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 42px; box-sizing: border-box;
  color: #fff !important; background: #0058dc; border: 1px solid #0058dc; border-radius: 10px;
  padding: 8px 13px; font: 650 .9rem/1.3 system-ui,sans-serif; cursor: pointer; text-decoration: none;
}
.htpl-zalo-auth .btn:hover { background: #0047b3; }
#htpl-zalo-phone-form .btn {
  gap: 8px;
  min-height: 46px;
  margin-top: 4px;
  background: #0068ff;
  border-color: #0068ff;
}
#htpl-zalo-phone-form .btn:hover { background: #0055d4; border-color: #0055d4; }
#htpl-zalo-phone-form .btn:disabled { opacity: .65; cursor: wait; }
.htpl-zalo-auth .htpl-zalo-secondary { color: #084989 !important; background: #fff; border-color: #93b9ec; }
.htpl-zalo-auth .htpl-zalo-secondary:hover { background: #eef5ff; }
.htpl-zalo-auth :is(input,.btn):focus-visible { outline: 3px solid #73aeff; outline-offset: 2px; }
.htpl-zalo-auth [role="status"]:not(:empty) { margin: 12px 0 0; }
.htpl-zalo-otp-dialog {
  position: fixed; inset: 0; margin: auto; box-sizing: border-box;
  width: min(27rem,calc(100% - 24px)); max-height: calc(100% - 24px);
  border: 1px solid #c6dbf7; border-radius: 20px; padding: clamp(20px,5vw,32px);
  background: #fff; color: #152742; text-align: center; box-shadow: 0 18px 70px #11284b40;
}
.htpl-zalo-otp-dialog::backdrop { background: #14263e85; }
.htpl-zalo-auth .htpl-zalo-otp-dialog h3 { margin-bottom: 8px; font-size: 1.4rem; }
.htpl-zalo-auth .htpl-zalo-otp-dialog #htpl-zalo-otp-help { color: #405a7b; margin-bottom: 18px; }
.htpl-zalo-otp-label {
  position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
#htpl-zalo-login-otp {
  box-sizing: border-box; width: min(100%,20rem); padding: 12px 8px;
  border: 1px solid #9ebde6; border-radius: 12px; background: #f5f9ff; color: #12396b;
  font: 750 clamp(1.55rem,6vw,2.3rem)/1.3 ui-monospace,Consolas,monospace;
  text-align: center; letter-spacing: .36em; text-indent: .36em;
}
#htpl-zalo-login-otp::placeholder { color: #647895; opacity: 1; }
#htpl-zalo-login-otp[aria-invalid="true"] { border-color: #bc2235; background: #fff5f6; }
#htpl-zalo-login-otp[aria-invalid="true"]:focus-visible { outline-color: #d4384b; }
.htpl-zalo-otp-feedback[data-error] { color: #ac1528; }
#htpl-zalo-otp-back { margin-top: 18px; }
.htpl-zalo-code-layout {
  display: grid; justify-items: center; gap: 14px;
  padding: 14px; background: #fff; border: 1px solid #dbeaff; border-radius: 13px;
}
.htpl-zalo-code-details { min-width: 0; max-width: 40rem; }
.htpl-zalo-hotline {
  display: inline-block; padding: 2px 7px; border-radius: 6px;
  background: #dbeaff; color: #0040a0; white-space: nowrap;
}
.htpl-zalo-notice {
  display: flex; gap: 9px; align-items: center; justify-content: center; margin-top: 10px; padding: 9px 11px;
  border: 1px solid #f1dcaa; border-radius: 9px; background: #fff8e7; color: #6b490d;
}
.htpl-zalo-auth .htpl-zalo-notice p { margin: 0; }
.htpl-zalo-notice-icon {
  flex: 0 0 19px; height: 19px; margin-top: 1px; border-radius: 50%;
  background: #81550b; color: #fff; text-align: center; font: 750 13px/19px system-ui,sans-serif;
}
.htpl-zalo-qr { margin: 0; text-align: center; color: #405a7b; font-size: .79rem; }
.htpl-zalo-qr img { display: block; max-width: 100%; height: auto; margin: 0 auto 4px; }
#htpl-zalo-dn-code, .htpl-zalo-scan-code {
  display: inline-block; margin: 0 0 8px; padding: 8px 13px;
  background: #eaf3ff; border: 1px dashed #7eaff3; border-radius: 8px; color: #003e9b;
  font: 750 clamp(1.18rem,5vw,1.7rem)/1.1 ui-monospace,monospace; letter-spacing: .06em; user-select: all;
}
.htpl-zalo-auth .htpl-zalo-expiry { color: #405a7b; font-size: .81rem; }
#htpl-zalo-restart { margin-top: 10px; }
.htpl-zalo-scan-page { margin: 0; padding: 24px 16px; background: #f2f7ff; font: 16px/1.5 system-ui,sans-serif; }
.htpl-zalo-scan { max-width: 420px; margin: 8vh auto 0; box-shadow: 0 6px 26px #17396b1a; }
