/* =====================================================================
   หน้าเข้าสู่ระบบ / ขอเข้าใช้งาน — ดีไซน์เต็มจอ 2026-11
   เฉพาะ body[data-page=login] และ body[data-page=request_access] • โหลดเป็นไฟล์สุดท้าย
   ===================================================================== */
@media screen{
:is(body[data-page=login],body[data-page=request_access]){
  --au-ink:#14302a;--au-muted:#5b7a72;--au-line:rgba(15,80,66,.12);--au-accent:#0b8a74;
  margin:0!important;padding:0!important;min-height:100dvh;background:#062a25!important;overflow-x:hidden
}
/* ---------- กรอบเต็มจอ ---------- */
:is(body[data-page=login],body[data-page=request_access]) .auth-bg{
  position:relative!important;min-height:100dvh!important;width:100%!important;max-width:none!important;margin:0!important;padding:0!important;
  display:block!important;background:transparent!important;box-sizing:border-box
}
:is(body[data-page=login],body[data-page=request_access]) .auth-scene{display:none!important}
:is(body[data-page=login],body[data-page=request_access]) .auth-frame{
  display:grid!important;grid-template-columns:minmax(0,1.18fr) minmax(460px,.82fr)!important;
  width:100%!important;max-width:none!important;min-height:100dvh!important;height:100dvh;margin:0!important;
  border-radius:0!important;box-shadow:none!important;border:0!important;overflow:hidden!important;background:transparent!important
}

/* ---------- ฝั่งเรื่องราว (ซ้าย) ---------- */
:is(body[data-page=login],body[data-page=request_access]) .auth-story{
  position:relative!important;isolation:isolate;display:flex!important;flex-direction:column!important;justify-content:space-between;
  min-height:0!important;height:100%!important;padding:clamp(28px,3.6vw,64px)!important;border-radius:0!important;overflow:hidden!important;color:#eafff8!important;
  background:
    radial-gradient(900px 600px at 80% 10%,rgba(55,191,156,.35),transparent 60%),
    radial-gradient(700px 500px at 0% 100%,rgba(42,143,181,.28),transparent 60%),
    linear-gradient(150deg,#05221e 0%,#0a3f37 45%,#0b5f50 100%)!important
}
:is(body[data-page=login],body[data-page=request_access]) .auth-story::before{ /* ตารางเส้นบาง ๆ */
  content:""!important;position:absolute!important;inset:0!important;z-index:-1!important;pointer-events:none;opacity:1!important;display:block!important;width:auto!important;height:auto!important;border:0!important;border-radius:0!important;transform:none!important;
  background-image:linear-gradient(rgba(160,255,225,.06) 1px,transparent 1px),linear-gradient(90deg,rgba(160,255,225,.06) 1px,transparent 1px)!important;
  background-size:48px 48px!important;-webkit-mask-image:radial-gradient(ellipse at 60% 40%,#000 30%,transparent 75%);mask-image:radial-gradient(ellipse at 60% 40%,#000 30%,transparent 75%)
}
:is(body[data-page=login],body[data-page=request_access]) .auth-story::after{ /* แสงออโรร่าเคลื่อนไหว */
  content:""!important;position:absolute!important;z-index:-1!important;pointer-events:none;display:block!important;
  width:70%!important;height:70%!important;left:15%!important;top:10%!important;border-radius:50%!important;border:0!important;
  background:conic-gradient(from 0deg,rgba(55,191,156,.0),rgba(55,191,156,.28),rgba(42,143,181,.22),rgba(232,195,141,.14),rgba(55,191,156,0))!important;
  filter:blur(60px);animation:au-aurora 18s linear infinite;opacity:.9!important
}
@keyframes au-aurora{to{transform:rotate(360deg)}}
:is(body[data-page=login],body[data-page=request_access]) .auth-brand{color:#fff!important;position:relative;z-index:2}
:is(body[data-page=login],body[data-page=request_access]) .auth-story-content{position:relative;z-index:2;flex:1;display:flex!important;flex-direction:column;justify-content:center;margin:clamp(16px,3vh,40px) 0!important;max-width:none!important}
:is(body[data-page=login],body[data-page=request_access]) .auth-story .eyebrow{color:#8fe3c7!important;letter-spacing:.2em!important;font-size:12px!important;opacity:1!important}
:is(body[data-page=login],body[data-page=request_access]) .auth-story h2{
  font-size:clamp(34px,4.2vw,68px)!important;line-height:1.18!important;margin:12px 0 14px!important;max-width:14ch!important;letter-spacing:-.02em;
  color:#fff!important;-webkit-text-fill-color:currentColor!important;background:none!important;text-shadow:0 4px 30px rgba(0,0,0,.25)
}
:is(body[data-page=login],body[data-page=request_access]) .auth-story h2>span{color:#7cf0cf!important}
:is(body[data-page=login],body[data-page=request_access]) .auth-story p{font-size:clamp(14px,1.15vw,18px)!important;color:#cdeee5!important;max-width:46ch!important;opacity:1!important}
:is(body[data-page=login],body[data-page=request_access]) .auth-story-foot{position:relative;z-index:2;color:#9cc9bc!important}
/* ภาพประกอบ / 3D ด้านขวาของฝั่งเรื่องราว */
:is(body[data-page=login],body[data-page=request_access]) .health-art{
  position:absolute!important;z-index:1!important;right:clamp(-40px,-1vw,0px)!important;top:50%!important;left:auto!important;bottom:auto!important;
  width:min(46%,560px)!important;height:auto!important;aspect-ratio:1/1;margin:0!important;transform:translateY(-55%)!important;opacity:1!important
}
body[data-page=request_access] .health-art.scene-ready>:not(.au-scene):not(.orbit-label){opacity:0!important}
.au-scene{position:absolute;inset:0;pointer-events:none;opacity:0;transition:opacity 1s}
.au-scene.is-ready{opacity:1}
.au-scene canvas{width:100%!important;height:100%!important;display:block}

/* ---------- ตัวอย่างการแสดงผล (การ์ดเคลื่อนไหว) ---------- */
.au-showcase{position:relative;z-index:2;display:flex;flex-wrap:wrap;gap:14px;margin-top:clamp(18px,3vh,34px);max-width:min(620px,56%)}
.au-sample{flex:1 1 300px;max-width:360px;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.16);border-radius:20px;padding:14px 16px;
  -webkit-backdrop-filter:blur(14px) saturate(140%);backdrop-filter:blur(14px) saturate(140%);box-shadow:0 20px 40px rgba(0,0,0,.18);animation:au-float 7s ease-in-out infinite}
.au-sample-head{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:11px;letter-spacing:.08em;color:#9fe9d2;margin-bottom:8px}
.au-sample-head b{font-size:13px;letter-spacing:0;color:#fff;font-weight:700}
.au-sample-head i{font-style:normal;background:rgba(124,240,207,.16);color:#9ff7de;border-radius:999px;padding:2px 9px;font-size:10.5px}
.au-rows{display:grid;gap:8px;transition:opacity .45s,transform .45s}
.au-rows.is-out{opacity:0;transform:translateY(6px)}
.au-row{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:10px;font-size:12.5px;color:#d9f6ec}
.au-row .dot{width:9px;height:9px;border-radius:50%;background:var(--c,#37bf9c);box-shadow:0 0 0 4px color-mix(in srgb,var(--c,#37bf9c) 25%,transparent)}
.au-row .bar{height:6px;border-radius:6px;background:rgba(255,255,255,.12);overflow:hidden;position:relative}
.au-row .bar::after{content:"";position:absolute;inset:0 auto 0 0;width:var(--w,40%);background:linear-gradient(90deg,color-mix(in srgb,var(--c,#37bf9c) 70%,#fff),var(--c,#37bf9c));border-radius:inherit;animation:au-grow 1.1s cubic-bezier(.2,.8,.2,1) both}
.au-row em{font-style:normal;font-weight:700;color:#fff;white-space:nowrap}
@keyframes au-grow{from{width:0}}
@keyframes au-float{0%,100%{transform:translateY(0)}50%{transform:translateY(-8px)}}
.au-chips{flex:1 1 100%;display:flex;flex-wrap:wrap;gap:8px}
.au-chips span{display:inline-flex;align-items:center;gap:7px;font-size:12px;color:#e6fbf4;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.14);border-radius:999px;padding:6px 12px;
  opacity:0;transform:translateY(8px);animation:au-in .6s cubic-bezier(.2,.8,.2,1) forwards}
.au-chips span::before{content:"";width:6px;height:6px;border-radius:50%;background:#7cf0cf}
@keyframes au-in{to{opacity:1;transform:none}}
/* ขั้นตอนขอเข้าใช้งาน */
.au-steps{flex:1 1 100%;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;counter-reset:au}
.au-step{position:relative;background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.14);border-radius:16px;padding:12px 12px 14px;font-size:12px;color:#d9f6ec;line-height:1.5;
  transition:background .4s,border-color .4s,transform .4s}
.au-step b{display:grid;place-items:center;width:28px;height:28px;border-radius:50%;margin-bottom:8px;font-size:12px;background:rgba(255,255,255,.12);color:#fff;transition:background .4s}
.au-step.is-on{background:rgba(124,240,207,.16);border-color:rgba(124,240,207,.45);transform:translateY(-4px)}
.au-step.is-on b{background:linear-gradient(135deg,#7cf0cf,#14a385);color:#053b32}
.au-step.is-done b{background:rgba(124,240,207,.35)}

/* ---------- ฝั่งฟอร์ม (ขวา) ---------- */
:is(body[data-page=login],body[data-page=request_access]) .auth{
  position:relative!important;height:100dvh!important;min-height:0!important;overflow-y:auto!important;box-sizing:border-box;
  display:flex!important;flex-direction:column!important;justify-content:center;align-items:center;
  padding:clamp(24px,3.5vw,56px) clamp(22px,3.2vw,64px)!important;border-radius:0!important;border:0!important;
  background:radial-gradient(600px 400px at 100% 0,rgba(55,191,156,.10),transparent 60%),linear-gradient(180deg,#fbfefd,#f2f9f6)!important;box-shadow:none!important
}
body[data-page=request_access] .auth{justify-content:flex-start}
:is(body[data-page=login],body[data-page=request_access]) .auth>*{width:100%;max-width:480px}
body[data-page=request_access] .auth>*{max-width:600px}
:is(body[data-page=login],body[data-page=request_access]) .auth-logo-lockup{margin:0 0 22px!important}
:is(body[data-page=login],body[data-page=request_access]) .auth-logo-lockup .auth-logo{width:60px!important;height:60px!important;border-radius:18px!important;box-shadow:0 14px 30px rgba(11,138,116,.25)!important;animation:au-logo 4s ease-in-out infinite}
@keyframes au-logo{0%,100%{transform:translateY(0) rotate(0)}50%{transform:translateY(-4px) rotate(-3deg)}}
:is(body[data-page=login],body[data-page=request_access]) .auth>.card{background:transparent!important;border:0!important;box-shadow:none!important;padding:0!important;margin:0!important;animation:au-card .7s cubic-bezier(.2,.8,.2,1) both}
@keyframes au-card{from{opacity:0;transform:translateY(16px)}to{opacity:1;transform:none}}
:is(body[data-page=login],body[data-page=request_access]) .auth h1{font-size:clamp(28px,2.6vw,40px)!important;line-height:1.25!important;margin:8px 0 6px!important;
  background:linear-gradient(120deg,#0b4a40,#0b8a74 60%,#2a8fb5);-webkit-background-clip:text;background-clip:text;color:transparent!important}
:is(body[data-page=login],body[data-page=request_access]) .auth .eyebrow{color:#14a385!important;letter-spacing:.18em!important}
:is(body[data-page=login],body[data-page=request_access]) .auth-intro{color:var(--au-muted)!important;font-size:14px!important;line-height:1.75!important;margin:4px 0 22px!important}
:is(body[data-page=login],body[data-page=request_access]) .auth :is(input:not([type=hidden]):not([type=checkbox]),textarea,select){
  min-height:50px!important;border-radius:14px!important;border:1.5px solid #d4e5de!important;background:#fff!important;font-size:15px!important;padding:12px 14px!important;
  transition:border-color .2s,box-shadow .2s,transform .2s!important;box-shadow:0 1px 2px rgba(10,50,42,.04)!important
}
:is(body[data-page=login],body[data-page=request_access]) .auth :is(input,textarea,select):focus{outline:none!important;border-color:#14a385!important;box-shadow:0 0 0 4px rgba(20,163,133,.16)!important}
:is(body[data-page=login],body[data-page=request_access]) .auth label{font-weight:600!important;color:#2c4b44!important;font-size:13.5px!important}
:is(body[data-page=login],body[data-page=request_access]) .auth :is(.login-submit>button,.request-form>button){
  min-height:54px!important;border-radius:16px!important;font-size:16px!important;font-weight:700!important;border:0!important;color:#fff!important;position:relative;overflow:hidden;
  background:linear-gradient(135deg,#14a385,#0b8a74 50%,#0a6e5f)!important;box-shadow:0 14px 30px rgba(11,138,116,.3)!important;transition:transform .2s,box-shadow .2s!important
}
:is(body[data-page=login],body[data-page=request_access]) .auth :is(.login-submit>button,.request-form>button)::after{
  content:"";position:absolute;inset:0;background:linear-gradient(100deg,transparent 30%,rgba(255,255,255,.35) 50%,transparent 70%);background-size:250% 100%;animation:au-shine 3.2s linear infinite}
@keyframes au-shine{from{background-position:150% 0}to{background-position:-150% 0}}
:is(body[data-page=login],body[data-page=request_access]) .auth :is(.login-submit>button,.request-form>button):hover{transform:translateY(-2px);box-shadow:0 18px 36px rgba(11,138,116,.36)!important}
:is(body[data-page=login],body[data-page=request_access]) .auth :is(.login-register>.btn,.request-back){border-radius:14px!important;min-height:48px!important;background:#fff!important;border:1.5px solid #d4e5de!important;color:#0a6e5f!important;transition:border-color .2s,transform .2s,box-shadow .2s!important}
:is(body[data-page=login],body[data-page=request_access]) .auth :is(.login-register>.btn,.request-back):hover{border-color:#14a385!important;transform:translateY(-1px);box-shadow:0 8px 18px rgba(10,50,42,.08)}
:is(body[data-page=login],body[data-page=request_access]) .auth .notice{border-radius:14px!important}
:is(body[data-page=login],body[data-page=request_access]) .auth-bottom{margin-top:22px!important;color:var(--au-muted)!important}
:is(body[data-page=login],body[data-page=request_access]) .auth-footer{position:absolute!important;left:clamp(28px,3.6vw,64px);bottom:14px;margin:0!important;z-index:3;color:rgba(200,240,228,.55)!important;font-size:10px!important;pointer-events:none}

/* ฟอร์มขอเข้าใช้งาน: 2 คอลัมน์ */
body[data-page=request_access] .request-form{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 16px!important}
body[data-page=request_access] .request-form>.ra-field{display:flex;flex-direction:column;gap:6px;min-width:0}
body[data-page=request_access] .request-form>.ra-field.is-wide,body[data-page=request_access] .request-form>button,body[data-page=request_access] .request-form>.notice{grid-column:1/-1}
body[data-page=request_access] .request-form>.ra-field>label{margin:0!important}
body[data-page=request_access] .request-form input:not([type=hidden]){margin:0!important;width:100%;box-sizing:border-box}
body[data-page=request_access] .request-form>button{margin-top:6px!important}
body[data-page=request_access] .ra-hint{font-size:11.5px;color:var(--au-muted);line-height:1.5}
body[data-page=request_access] .auth>.card>p:not(.auth-intro){font-size:13px;color:var(--au-muted);background:#eef8f4;border:1px solid #d6ece3;border-radius:14px;padding:10px 14px;margin:16px 0 0}

/* ---------- Tablet: เรื่องราวด้านบน ฟอร์มด้านล่าง ---------- */
@media (max-width:1180px){
  :is(body[data-page=login],body[data-page=request_access]) .auth-frame{grid-template-columns:1fr!important;height:auto;min-height:100dvh!important;overflow:visible!important}
  :is(body[data-page=login],body[data-page=request_access]) .auth-story{height:auto!important;min-height:440px!important;padding:32px 36px!important}
  :is(body[data-page=login],body[data-page=request_access]) .auth-story h2{font-size:clamp(30px,5vw,46px)!important;max-width:12ch!important}
  :is(body[data-page=login],body[data-page=request_access]) .health-art{width:min(44%,360px)!important;right:0!important;top:44%!important}
  .au-showcase{max-width:58%}
  .au-steps{grid-template-columns:repeat(2,minmax(0,1fr))}
  :is(body[data-page=login],body[data-page=request_access]) .auth{height:auto!important;overflow:visible!important;padding:36px 32px 64px!important}
  :is(body[data-page=login],body[data-page=request_access]) .auth-footer{position:static!important;text-align:center;color:#7a978f!important;padding:0 0 18px;background:#f2f9f6}
  :is(body[data-page=login],body[data-page=request_access]) .auth-bg{background:#f2f9f6!important}
}
/* ---------- Mobile ---------- */
@media (max-width:760px){
  :is(body[data-page=login],body[data-page=request_access]) .auth-frame{width:100%!important;border-radius:0!important;box-shadow:none!important}
  :is(body[data-page=login],body[data-page=request_access]) .auth-story{min-height:0!important;height:auto!important;padding:calc(18px + env(safe-area-inset-top,0px)) 20px 22px!important;border-radius:0 0 28px 28px!important}
  :is(body[data-page=login],body[data-page=request_access]) .auth-story-content{margin:14px 0 0!important}
  :is(body[data-page=login],body[data-page=request_access]) .auth-story h2{font-size:27px!important;max-width:11ch!important;margin:6px 0 8px!important}
  :is(body[data-page=login],body[data-page=request_access]) .auth-story p{font-size:12.5px!important;max-width:60%!important}
  :is(body[data-page=login],body[data-page=request_access]) .auth-story .eyebrow{display:block!important;font-size:9.5px!important}
  :is(body[data-page=login],body[data-page=request_access]) .health-art{width:190px!important;right:-34px!important;top:56px!important;transform:none!important}
  :is(body[data-page=login],body[data-page=request_access]) .orbit-label,:is(body[data-page=login],body[data-page=request_access]) .art-stamp,:is(body[data-page=login],body[data-page=request_access]) .auth-story-foot{display:none!important}
  .au-showcase{max-width:100%;margin-top:14px}
  .au-sample{display:none}
  .au-chips span{font-size:11px;padding:5px 10px}
  .au-steps{grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
  .au-step{padding:8px 6px;font-size:10.5px;text-align:center;border-radius:12px}
  .au-step b{margin:0 auto 4px;width:24px;height:24px;font-size:11px}
  :is(body[data-page=login],body[data-page=request_access]) .auth{padding:24px 20px 40px!important;background:#f6fbf9!important}
  body[data-page=request_access] .request-form{grid-template-columns:1fr}
  :is(body[data-page=login],body[data-page=request_access]) .auth-logo-lockup{margin-bottom:14px!important}
}
@media (prefers-reduced-motion:reduce){
  :is(body[data-page=login],body[data-page=request_access]) :is(.auth-story::after,.au-sample,.auth-logo,.auth>.card){animation:none!important}
  .au-chips span{animation:none;opacity:1;transform:none}
  :is(body[data-page=login],body[data-page=request_access]) .auth :is(.login-submit>button,.request-form>button)::after{animation:none}
}
}/* screen */
