:root{
  --auth-purple:#5b21c9;
  --auth-purple-dark:#4a17b0;
  --auth-field:#cfbdf2;
  --auth-field-text:#5c2bbd;
  --auth-hint:#8d8d97;
}
html,body{background:linear-gradient(180deg,#f3e6ff 0%,#8d43ff 100%)!important}
body{display:flex!important;justify-content:center!important;margin:0!important;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif!important}
.wrap{
  width:430px!important;max-width:430px!important;min-width:430px!important;
  min-height:100vh!important;margin:0 auto!important;
  background:linear-gradient(180deg,#f4e7ff 0%,#8b3fff 100%)!important;
  padding:0 10px 26px!important;position:relative!important;box-sizing:border-box!important;
}
.au-header{height:72px!important;display:flex!important;align-items:center!important;justify-content:center!important;position:relative!important;background:transparent!important;border:0!important}
.au-header .back{position:absolute!important;left:2px!important;top:20px!important;font-size:24px!important;color:#7a3de0!important;width:32px!important}
.au-header .au-logo{height:52px!important;display:flex!important;align-items:center!important;justify-content:center!important}
.au-header .au-logo img{height:52px!important;width:auto!important;object-fit:contain!important}
.au-header .au-cskh{position:absolute!important;right:2px!important;top:24px!important;color:#7a3de0!important;font-size:12px!important}

.au-banner{margin:0 0 10px!important;border-radius:18px!important;overflow:hidden!important;line-height:0!important;background:transparent!important}
.au-banner img{width:100%!important;height:auto!important;display:block!important;object-fit:contain!important}

.auth-tabs{display:flex!important;gap:0!important;margin:0!important;padding:0!important;border-radius:14px 14px 0 0!important;overflow:hidden!important}
.auth-tabs a{
  flex:1!important;height:58px!important;display:flex!important;align-items:center!important;justify-content:center!important;
  background:#d8c4fa!important;color:#5b21c9!important;font-size:22px!important;font-weight:700!important;text-decoration:none!important;
}
.auth-tabs a.active{
  background:linear-gradient(180deg,#6f34e6 0%,#5a20c6 100%)!important;color:#fff!important;
  border-radius:0 0 16px 0!important;
}
.auth-tabs a:first-child.active{border-radius:0 0 0 16px!important}

.au-form{
  margin:0!important;padding:18px 16px 20px!important;
  background:linear-gradient(180deg,#f7ecff 0%,#f3e5ff 100%)!important;
  border-radius:0 0 20px 20px!important;
  box-shadow:0 4px 18px #4b16903d!important;
}
.au-title,.au-sub{display:none!important}

.field{margin:0 0 4px!important}
.field .f-label{display:none!important}
.field .auth-plain-label{
  display:block!important;margin:0 0 8px 4px!important;color:#5423bd!important;
  font-size:18px!important;font-weight:700!important;line-height:1.3!important;
}
.field .f-wrap{
  height:78px!important;display:flex!important;align-items:center!important;
  padding:0 16px!important;border:0!important;border-radius:12px!important;
  background:var(--auth-field)!important;box-shadow:none!important;
}
.field .f-wrap.focus{box-shadow:0 0 0 2px #7d40f2 inset!important}
.field .f-wrap .f-ic{
  width:26px!important;height:26px!important;margin-right:14px!important;
  background-color:transparent!important;background-repeat:no-repeat!important;background-position:center!important;background-size:contain!important;
  opacity:1!important;
}
.f-ic-acc,.f-ic-user{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='7.5' r='4.2' fill='%235b21c9'/%3E%3Cpath d='M3.6 21c.6-4.2 4-6.6 8.4-6.6s7.8 2.4 8.4 6.6z' fill='%235b21c9'/%3E%3C/svg%3E")!important}
.f-ic-pass{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='4.5' y='10' width='15' height='11' rx='2.2' fill='%235b21c9'/%3E%3Cpath d='M7.5 10V7.6a4.5 4.5 0 0 1 9 0V10' fill='none' stroke='%235b21c9' stroke-width='2.4'/%3E%3Ccircle cx='12' cy='15.4' r='1.7' fill='%23d6c4f6'/%3E%3C/svg%3E")!important}
.f-ic-phone{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.6 10.8c1.4 2.8 3.8 5.1 6.6 6.6l2.2-2.2c.3-.3.7-.4 1-.2 1.1.4 2.3.6 3.6.6.6 0 1 .4 1 1V20c0 .6-.4 1-1 1C10.6 21 3 13.4 3 4c0-.6.4-1 1-1h3.5c.6 0 1 .4 1 1 0 1.2.2 2.4.6 3.6.1.4 0 .8-.2 1l-2.3 2.2z' fill='%235b21c9'/%3E%3C/svg%3E")!important}

.field .f-wrap input{
  flex:1!important;min-width:0!important;height:100%!important;border:0!important;outline:0!important;
  background:transparent!important;color:var(--auth-field-text)!important;
  font-size:19px!important;font-weight:700!important;letter-spacing:.1px!important;
}
.field .f-wrap input::placeholder{color:var(--auth-field-text)!important;opacity:.92!important;font-weight:700!important;font-size:19px!important}
.field .f-remind,.field .f-hint,.field .f-help{
  display:block!important;margin:8px 2px 14px!important;color:var(--auth-hint)!important;
  font-size:15px!important;line-height:1.35!important;font-weight:400!important;
}
.pw-bar{display:none!important}

.eye-btn{width:30px!important;height:30px!important;color:#5b21c9!important;opacity:1!important;font-size:22px!important}
.eye-btn{background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b21c9' stroke-width='1.9'%3E%3Cpath d='M2.5 12S6 5.5 12 5.5 21.5 12 21.5 12 18 18.5 12 18.5 2.5 12 2.5 12z'/%3E%3Ccircle cx='12' cy='12' r='3.1'/%3E%3Cpath d='M4 20 20 4'/%3E%3C/svg%3E") center/22px 22px no-repeat!important}
.eye-btn i{display:none!important}

.agree{display:flex!important;align-items:center!important;gap:8px!important;margin:12px 0 20px!important;color:#6b35d6!important;font-size:15px!important;line-height:1.4!important}
.agree input{width:22px!important;height:22px!important;accent-color:#5b21c9!important;flex:0 0 auto!important}
.agree a{color:#6b35d6!important;text-decoration:underline!important}

.submit-btn{
  display:block!important;width:100%!important;height:64px!important;margin:6px 0 0!important;
  border:3px solid #b774f0!important;border-radius:34px!important;
  background:linear-gradient(180deg,#6f34e6 0%,#5a20c6 100%)!important;
  color:#fff!important;font-size:27px!important;font-weight:800!important;letter-spacing:.5px!important;
  box-shadow:0 2px 0 #3f129b!important;
}
.submit-btn:disabled{opacity:.7!important}

.auth-links{display:block!important;margin:0!important;padding:0!important}
.auth-footer{margin:18px 0 0!important;text-align:center!important}
.auth-footer .line{display:none!important}
.auth-footer .reg-btn,.auth-footer .login-btn{
  display:flex!important;align-items:center!important;justify-content:center!important;
  width:100%!important;height:58px!important;border:3px solid #a05cf0!important;border-radius:30px!important;
  background:transparent!important;color:#fff!important;font-size:24px!important;font-weight:800!important;text-decoration:none!important;
}

.auth-extra{margin-top:16px!important;background:#cc73f219!important;border-radius:16px!important;padding:0!important}
.au-form .auth-extra:first-of-type{margin-top:16px!important}
.auth-extra img{width:100%!important;display:block!important;border-radius:14px!important}
body:has(.auth-form) .au-form:after{display:none!important;content:none!important}
.auth-apps{display:none!important}
.auth-links-bottom{display:none!important}
.auth-extra:last-of-type{display:none!important}
.au-form > .auth-extra + .auth-domain + .auth-links-bottom{display:none!important}
.auth-tabs{display:flex!important;gap:6px!important}
.wrap,body{overflow-x:hidden!important}
html,body{width:100%!important;max-width:100%!important}
.au-form{padding-left:18px!important;padding-right:18px!important}
.submit-btn{width:100%!important;max-width:100%!important;box-sizing:border-box!important;font-size:24px!important}
.field .f-wrap{box-sizing:border-box!important;width:100%!important;max-width:100%!important}
.auth-tabs a{min-width:0!important;font-size:21px!important}
#formRegister{padding-top:12px!important;padding-bottom:14px!important}
#formRegister .field{margin-bottom:2px!important}
#formRegister .field .f-wrap{height:62px!important;border-radius:10px!important;padding:0 14px!important}
#formRegister .field .f-wrap .f-ic{width:23px!important;height:23px!important;margin-right:12px!important}
#formRegister .field .f-wrap input,#formRegister .field .f-wrap input::placeholder{font-size:17px!important}
#formRegister .field .f-help{margin:5px 2px 7px!important;font-size:13px!important;line-height:1.25!important}
#formRegister .agree{margin:8px 0 12px!important;font-size:14px!important}
#formRegister .submit-btn{height:56px!important;font-size:23px!important}
#formRegister .auth-extra,#formRegister .auth-domain,#formRegister .auth-links-bottom,#formRegister .auth-footer{display:none!important}
.auth-tabs a{clip-path:none!important;background:#d9c7fa!important}
.auth-tabs a.active{background:linear-gradient(180deg,#6f34e6 0%,#5a20c6 100%)!important}
.auth-tabs a:first-child{border-radius:14px 0 0 0!important}
.auth-tabs a:last-child{border-radius:0 14px 0 0!important}
.auth-tabs a:first-child{clip-path:polygon(0 0,92% 0,100% 100%,0 100%)!important;margin-right:-10px!important;z-index:2!important}
.auth-tabs a:last-child{clip-path:polygon(8% 0,100% 0,100% 100%,0 100%)!important;padding-left:8px!important}
.au-header .back{cursor:pointer!important}

body:has(.auth-form) .auth-tabs{background:transparent!important}
body:has(.auth-form) .wrap{min-height:100vh!important}
.auth-tabs a.active{
  border-bottom-left-radius:0!important;
  border-bottom-right-radius:0!important;
}
.auth-tabs a.active:first-child{border-top-right-radius:0!important}
.auth-tabs a.active:last-child{border-top-left-radius:0!important}

.auth-forgot{
  background:transparent!important;border:3px solid #fff!important;border-radius:30px!important;
}

.bet88-support{
  width:78px!important;height:78px!important;background:linear-gradient(135deg,#7fd0ff,#6a4bff 55%,#e34cff)!important;
  padding:0!important;overflow:hidden!important;
}
.bet88-support img{width:100%!important;height:100%!important;object-fit:cover!important;border-radius:50%!important}
.bet88-support:after{content:"HỖ TRỢ"!important;position:absolute!important;left:50%!important;transform:translateX(-50%)!important;bottom:-16px!important;color:#fff!important;font-size:10px!important;font-weight:700!important;white-space:nowrap!important}
.auth-domain{margin:10px 0 0!important;text-align:center!important;color:#6b35d6!important;font-size:19px!important;font-weight:700!important}
.auth-links-bottom{margin-top:16px!important;display:flex!important;flex-direction:column!important;align-items:center!important;gap:14px!important}
.auth-forgot{display:flex!important;align-items:center!important;justify-content:center!important;min-width:230px!important;height:52px!important;padding:0 22px!important;border:3px solid #fff!important;border-radius:28px!important;color:#fff!important;font-size:20px!important;font-weight:800!important;text-transform:uppercase!important}
.auth-apps{display:flex!important;gap:12px!important;width:100%!important}
.auth-apps a{flex:1!important;display:block!important;border-radius:12px!important;overflow:hidden!important}
.auth-apps img{width:100%!important;display:block!important}

.bet88-support{
  position:fixed!important;z-index:40!important;right:calc(50% - 196px)!important;bottom:18px!important;
  width:80px!important;height:80px!important;border-radius:50%!important;
  background:linear-gradient(135deg,#79c7ff 0%,#6b4bff 55%,#e24bff 100%)!important;
  box-shadow:0 3px 16px #2b0a6b80!important;padding:9px!important;
}
.bet88-support img{width:100%!important;height:100%!important;object-fit:contain!important;display:block!important}

/* Keep the 430px auth design centered without forcing narrow phones to overflow. */
body:has(.auth-form){
  width:100%!important;
  min-width:0!important;
  overflow-x:hidden!important;
}
body:has(.auth-form) .wrap{
  width:100%!important;
  max-width:430px!important;
  min-width:0!important;
  margin:auto!important;
  box-sizing:border-box!important;
}
body:has(.auth-form) .au-header,
body:has(.auth-form) .au-banner,
body:has(.auth-form) .auth-tabs,
body:has(.auth-form) .au-form{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  box-sizing:border-box!important;
}
body:has(.auth-form) .auth-content{
  width:100%!important;
  box-sizing:border-box!important;
  padding:10px!important;
  border-radius:22px!important;
  background:rgba(247,236,255,.42)!important;
  box-shadow:0 0 0 2px rgba(255,255,255,.62) inset!important;
}
body:has(.auth-form) .au-banner img{max-width:100%!important}
body:has(.auth-form) .auth-tabs a,
body:has(.auth-form) .field .f-wrap,
body:has(.auth-form) .submit-btn,
body:has(.auth-form) .auth-apps,
body:has(.auth-form) .auth-apps a,
body:has(.auth-form) .auth-extra{
  min-width:0!important;
  max-width:100%!important;
}
body:has(.auth-form) .au-header .au-logo{max-width:62%!important}
body:has(.auth-form) .au-header .au-logo img{max-width:100%!important;height:auto!important}
body:has(.auth-form) .au-form{
  padding-left:clamp(12px,4.2vw,18px)!important;
  padding-right:clamp(12px,4.2vw,18px)!important;
}
body:has(.auth-form) .field .f-wrap{
  padding-left:clamp(10px,3.7vw,16px)!important;
  padding-right:clamp(10px,3.7vw,16px)!important;
}
body:has(.auth-form) .field .f-wrap input{min-width:0!important;text-overflow:ellipsis}
body:has(.auth-form) .auth-tabs a{overflow:hidden!important;white-space:nowrap!important}
@media (max-width:360px){
  body:has(.auth-form) .field .f-wrap{height:68px!important}
  body:has(.auth-form) .field .f-wrap input,
  body:has(.auth-form) .field .f-wrap input::placeholder{font-size:16px!important}
  body:has(.auth-form) .submit-btn{font-size:22px!important}
}

/* Final centered auth layout: a compact card with breathing room around it. */
html,body{
  width:100%!important;
  min-width:0!important;
  min-height:100dvh!important;
  overflow-x:hidden!important;
}
body:has(.auth-form){
  display:block!important;
  padding:clamp(18px,4vh,52px) 0!important;
  background:linear-gradient(180deg,#f6e8ff 0%,#8c42ff 100%)!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
}
body:has(.auth-form) .wrap{
  width:min(90vw,620px)!important;
  max-width:620px!important;
  min-width:0!important;
  min-height:0!important;
  margin:0 auto!important;
  padding:0!important;
  background:transparent!important;
}
@media (min-height:900px){
  body:has(.auth-form){
    display:flex!important;
    align-items:flex-start!important;
    justify-content:center!important;
  }
  body:has(.auth-form) .wrap{margin-block:auto!important}
}
body:has(.auth-form) .au-header{
  width:100%!important;
  height:clamp(128px,20vh,210px)!important;
  padding:0!important;
  background:transparent!important;
}
body:has(.auth-form) .au-header .au-logo{
  width:min(62%,360px)!important;
  height:auto!important;
  max-width:62%!important;
}
body:has(.auth-form) .au-header .au-logo img{
  width:100%!important;
  height:auto!important;
  object-fit:contain!important;
}
body:has(.auth-form) .au-header .back{left:0!important;top:50%!important;transform:translateY(-50%)!important}
body:has(.auth-form) .au-header .au-cskh{right:0!important;top:50%!important;transform:translateY(-50%)!important}
body:has(.auth-form) .au-banner,
body:has(.auth-form) .auth-tabs,
body:has(.auth-form) .au-form{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
}
body:has(.auth-form) .au-banner{margin:0 0 10px!important;border-radius:18px!important}
body:has(.auth-form) .auth-tabs{gap:0!important;margin:0 0 10px!important}
body:has(.auth-form) .auth-tabs a{
  min-width:0!important;
  height:48px!important;
  font-size:clamp(16px,4.8vw,21px)!important;
  overflow:hidden!important;
  white-space:nowrap!important;
}
body:has(.auth-form) .au-form{
  padding:22px 22px 28px!important;
  border-radius:20px!important;
  background:linear-gradient(180deg,#fff 0%,#f5e8ff 100%)!important;
  box-shadow:0 4px 18px #4b16903d!important;
}
body:has(.auth-form) .field{margin:0 0 10px!important}
body:has(.auth-form) .field .f-wrap{
  width:100%!important;
  min-width:0!important;
  height:58px!important;
  padding:0 16px!important;
  border-radius:12px!important;
}
body:has(.auth-form) .field .f-wrap .f-ic{
  width:26px!important;height:26px!important;margin-right:14px!important;
}
body:has(.auth-form) .field .f-wrap input,
body:has(.auth-form) .field .f-wrap input::placeholder{
  min-width:0!important;
  font-size:clamp(14px,4vw,16px)!important;
  line-height:1.2!important;
}
body:has(.auth-form) .field .f-help,
body:has(.auth-form) .field .f-remind{
  margin:6px 2px 10px!important;
  font-size:clamp(11px,3vw,12px)!important;
  line-height:1.35!important;
}
body:has(.auth-form) .agree{
  margin:8px 0 14px!important;
  font-size:clamp(12px,3.4vw,14px)!important;
}
body:has(.auth-form) .agree input{width:20px!important;height:20px!important}
body:has(.auth-form) .submit-btn{
  width:100%!important;
  min-width:0!important;
  height:58px!important;
  margin:4px 0 0!important;
  border-radius:26px!important;
  font-size:clamp(17px,5vw,22px)!important;
}
body:has(.auth-form) .auth-extra{margin-top:14px!important}
body:has(.auth-form) .auth-domain{font-size:clamp(15px,4.2vw,19px)!important}
body:has(.auth-form) .auth-apps{min-width:0!important}
body:has(.auth-form) .bet88-support{
  right:max(12px,calc(50vw - 220px))!important;
  bottom:max(12px,env(safe-area-inset-bottom))!important;
  width:64px!important;height:64px!important;
}
@media (max-width:360px){
  body:has(.auth-form) .au-form{padding:14px!important}
  body:has(.auth-form) .field .f-wrap{height:46px!important;padding-left:10px!important;padding-right:10px!important}
  body:has(.auth-form) .field .f-wrap input,
  body:has(.auth-form) .field .f-wrap input::placeholder{font-size:14px!important;letter-spacing:0!important}
  body:has(.auth-form) .field .f-wrap .f-ic{width:20px!important;height:20px!important;margin-right:8px!important}
  body:has(.auth-form) .field{margin-bottom:8px!important}
}
@media (min-width:700px){
  body:has(.auth-form) .wrap{width:min(90vw,620px)!important}
}

/* Compact centered auth frame matching the mobile reference. */
body:has(.auth-form) .bet88-support{
  display:none!important;
}
body:has(.auth-form) .wrap{
  width:min(88vw,430px)!important;
  max-width:430px!important;
}
body:has(.auth-form) .au-header{
  height:clamp(112px,18vh,160px)!important;
}
body:has(.auth-form) .auth-content{
  width:100%!important;
  padding:8px!important;
  border-radius:18px!important;
  box-sizing:border-box!important;
}
body:has(.auth-form) .au-banner{
  margin:0 0 8px!important;
  border-radius:14px!important;
}
body:has(.auth-form) .auth-tabs{
  margin:0 0 8px!important;
  overflow:hidden!important;
  border-radius:13px!important;
}
body:has(.auth-form) .auth-tabs a{
  height:48px!important;
  font-size:clamp(16px,4.6vw,20px)!important;
}
/* Opposing diagonals: login slopes down to the right, register slopes down to the left. */
body:has(.auth-form) .auth-tabs a:first-child{
  clip-path:polygon(0 0,92% 0,100% 100%,0 100%)!important;
  margin-right:-8px!important;
  z-index:2!important;
}
body:has(.auth-form) .auth-tabs a:last-child{
  clip-path:polygon(8% 0,100% 0,100% 100%,0 100%)!important;
  padding-left:8px!important;
}
body:has(.auth-form) .au-form{
  padding:14px 14px 24px!important;
  border-radius:17px!important;
}
body:has(.auth-form) .field{margin-bottom:8px!important}
body:has(.auth-form) .field .f-wrap{
  height:48px!important;
  padding:0 12px!important;
  border-radius:10px!important;
}
body:has(.auth-form) .field .f-wrap .f-ic{
  width:22px!important;height:22px!important;margin-right:10px!important;
}
body:has(.auth-form) .field .f-wrap input,
body:has(.auth-form) .field .f-wrap input::placeholder{
  font-size:15px!important;
}
body:has(.auth-form) .field .f-help,
body:has(.auth-form) .field .f-remind{
  margin:5px 2px 8px!important;
  font-size:11px!important;
}
body:has(.auth-form) .submit-btn{
  height:50px!important;
  font-size:21px!important;
}
@media (max-width:360px){
  body:has(.auth-form) .auth-content{padding:6px!important}
  body:has(.auth-form) .au-form{padding:12px 12px 20px!important}
  body:has(.auth-form) .field .f-wrap{height:44px!important}
}

/* Final compact frame and mirrored tab diagonals. */
body:has(.auth-form){
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:flex-start!important;
  min-height:100dvh!important;
  padding:clamp(14px,2.5vh,26px) 0!important;
}
body:has(.auth-form) .wrap{
  flex:0 0 auto!important;
  width:min(84vw,420px)!important;
  max-width:420px!important;
  margin-block:auto!important;
  margin-inline:0!important;
}
body:has(.auth-form) .au-header{
  height:clamp(88px,13vh,118px)!important;
}
body:has(.auth-form) .auth-content{
  margin-top:10px!important;
  padding:8px!important;
}
body:has(.auth-form) .au-form{
  padding:12px 12px 22px!important;
}
body:has(.auth-form) .field{
  margin-bottom:7px!important;
}
body:has(.auth-form) .field .f-wrap{
  height:46px!important;
  padding:0 11px!important;
}
body:has(.auth-form) .field .f-wrap .f-ic{
  width:20px!important;height:20px!important;margin-right:9px!important;
}
body:has(.auth-form) .field .f-wrap input,
body:has(.auth-form) .field .f-wrap input::placeholder{
  font-size:14px!important;
}
body:has(.auth-form) .field .f-help,
body:has(.auth-form) .field .f-remind{
  margin:4px 2px 7px!important;
  font-size:10.5px!important;
}
body:has(.auth-form) .submit-btn{
  height:48px!important;
  font-size:20px!important;
}
body:has(.auth-form) .auth-tabs{
  gap:0!important;
  overflow:hidden!important;
  border-radius:12px!important;
}
body:has(.auth-form) .auth-tabs a:first-child{
  margin-right:0!important;
  padding-left:0!important;
  clip-path:polygon(0 0,100% 0,95% 100%,0 100%)!important;
  border-radius:12px 0 0 12px!important;
  z-index:2!important;
}
body:has(.auth-form) .auth-tabs a:last-child{
  padding-left:0!important;
  clip-path:polygon(0 0,100% 0,100% 100%,5% 100%)!important;
  border-radius:0 12px 12px 0!important;
  z-index:1!important;
}
@media (max-width:360px){
  body:has(.auth-form) .wrap{width:min(84vw,420px)!important}
  body:has(.auth-form) .field .f-wrap input,
  body:has(.auth-form) .field .f-wrap input::placeholder{font-size:13px!important}
  body:has(.auth-form) .submit-btn{font-size:18px!important}
}
