:root{--ui-font:'Kanit','Noto Sans Thai',system-ui,sans-serif;--ui-radius:14px;--ui-line:#d4dfef;--ui-focus:#08a8dc;--ui-text:#112849;--ui-muted:#637895;--ui-shadow:0 8px 26px rgba(22,54,95,.08)}
#message:empty{display:none!important}
body:has(#loginForm){padding:20px;min-height:100dvh}
body:has(#loginForm) .brand h1{font-size:clamp(21px,5.4vw,28px);line-height:1.35}
body:has(#loginForm) .brand p{font-size:14px;line-height:1.6}
body:has(#loginForm) .field input::placeholder{color:#a2b4ca;opacity:1}
body.popup-auth .card{border:0!important;border-radius:0!important;box-shadow:none!important}
:where(body){font-family:var(--ui-font);-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
:where(button,a,input,select,textarea){font:inherit}
:where(button,a,input,select,textarea):focus-visible{outline:3px solid color-mix(in srgb,var(--ui-focus) 62%,transparent);outline-offset:2px}
:where(button,.btn){min-height:42px;border-radius:11px;transition:transform .16s ease,box-shadow .16s ease,filter .16s ease}
:where(button:not(:disabled),.btn){cursor:pointer}
:where(button:not(:disabled):hover,.btn:hover){filter:brightness(1.06)}
:where(input,select,textarea){border-radius:11px}
:where(.panel,.card,.affiliate-card,.login-card,.admin-card){border-radius:var(--ui-radius)}
:where(table) th{font-weight:700}
@media(max-width:700px){:where(button,.btn){min-height:44px}:where(.panel,.card,.affiliate-card){border-radius:12px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}
/* The authentication form is the single visible card inside the popup. */
html:has(body.popup-auth),body.popup-auth{height:100%!important;min-height:100%!important;background:transparent!important;overflow-x:hidden}
body.popup-auth .card{min-height:0!important;height:100%!important;max-height:100%!important;overflow:auto!important;padding:clamp(22px,4vw,34px)!important;border:1px solid #2b8fce!important;border-radius:22px!important;box-shadow:0 18px 48px rgba(0,0,0,.34)!important;background:linear-gradient(160deg,#101d2b,#07121e)!important}
body.popup-auth .brand .logo{width:50px!important;height:50px!important}
body.popup-auth .brand h1{font-size:20px!important}
body.popup-auth .brand p{font-size:13px!important}
body.popup-auth .tabs{margin-bottom:12px!important}
body.popup-auth .field{margin:8px 0!important}
body.popup-auth .field input,body.popup-auth .field select{min-height:44px!important;padding:9px 12px!important}
body.popup-auth .submit{padding:10px!important;font-size:15px!important}
@media(max-width:560px){.home-auth-popup{padding:12px!important}.home-auth-dialog{width:min(100%,440px)!important;height:min(86dvh,720px)!important;border-radius:20px!important}.home-auth-close{top:8px!important;right:8px!important}body.popup-auth .card{padding:20px!important;border-radius:18px!important}}
