/* หน้าเข้าสู่ระบบ/สมัครสมาชิก — ฝั่งฟอร์ม (เจ้าของ 2026-10-06 "ฝั่งนี้ขาวเกินไป")
   พื้นฟ้าเทาอ่อนมีวงสีจาง ๆ · ฟอร์มอยู่ในการ์ดขาวมีเงา · จอมือถือเอาการ์ดออก ใช้พื้นเต็มจอ */
.auth-side { position: relative; overflow: hidden;
  background:
    radial-gradient(circle at 88% 8%, rgba(18, 93, 217, .10) 0 220px, transparent 221px),
    radial-gradient(circle at 6% 96%, rgba(249, 115, 22, .08) 0 200px, transparent 201px),
    linear-gradient(160deg, #F4F7FC 0%, #EAF0FA 100%); }
.auth-side::before { content: ""; position: absolute; left: 12%; top: 14%; width: 10px; height: 10px; border-radius: 50%; background: #F97316; opacity: .55; }
.auth-side::after { content: ""; position: absolute; right: 16%; bottom: 18%; width: 14px; height: 14px; border-radius: 50%; background: #125DD9; opacity: .25; }
.auth-card { position: relative; z-index: 1; background: #fff; border-radius: 26px; padding: 36px 34px 30px;
  box-shadow: 0 40px 70px -45px rgba(30, 58, 138, .45), 0 0 0 1px rgba(226, 232, 240, .7); max-width: 27rem !important; padding: 2.25rem 2.1rem 1.9rem; }
@media (max-width: 640px) {
  .auth-card { box-shadow: none; padding: 8px 4px; background: transparent; }
}

/* ── แอนิเมชัน (เจ้าของ 2026-10-06 "เพิ่ม animation หน่อย") ──
   รูปซ้ายซูมช้า ๆ · ข้อความซ้ายค่อย ๆ ลอยขึ้นทีละบรรทัด · วงสีฝั่งฟอร์มลอยไปมา · การ์ดลอยขึ้นตอนเปิด
   ผู้ใช้ที่ตั้ง "ลดการเคลื่อนไหว" ในเครื่อง → ปิดทั้งหมด */
.auth-photo { animation: authKen 22s ease-in-out infinite alternate; transform-origin: 40% 25%; will-change: transform; }
@keyframes authKen { from { transform: scale(1); } to { transform: scale(1.08) translate(-1%, 1%); } }

.auth-rise { opacity: 0; animation: authRise .8s cubic-bezier(.2, .7, .2, 1) forwards; }
.auth-rise.d1 { animation-delay: .15s; } .auth-rise.d2 { animation-delay: .3s; } .auth-rise.d3 { animation-delay: .45s; } .auth-rise.d4 { animation-delay: .7s; }
@keyframes authRise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

.auth-side { background: linear-gradient(160deg, #F4F7FC 0%, #EAF0FA 100%); }
.auth-blob { position: absolute; border-radius: 50%; pointer-events: none; filter: blur(2px); }
.auth-blob.b1 { width: 440px; height: 440px; right: -140px; top: -150px; background: radial-gradient(circle, rgba(18, 93, 217, .16), rgba(18, 93, 217, .04) 70%); animation: authFloatA 14s ease-in-out infinite alternate; }
.auth-blob.b2 { width: 380px; height: 380px; left: -150px; bottom: -160px; background: radial-gradient(circle, rgba(249, 115, 22, .14), rgba(249, 115, 22, .03) 70%); animation: authFloatB 16s ease-in-out infinite alternate; }
.auth-blob.b3 { width: 180px; height: 180px; left: 18%; top: 12%; background: radial-gradient(circle, rgba(56, 189, 248, .16), transparent 70%); animation: authFloatA 11s ease-in-out infinite alternate-reverse; }
@keyframes authFloatA { from { transform: translate(0, 0) scale(1); } to { transform: translate(-30px, 26px) scale(1.06); } }
@keyframes authFloatB { from { transform: translate(0, 0) scale(1); } to { transform: translate(34px, -24px) scale(1.08); } }
.auth-side::before { animation: authBob 4s ease-in-out infinite; }
.auth-side::after { animation: authBob 5s ease-in-out infinite reverse; }
@keyframes authBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

.auth-card { animation: authCard .7s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes authCard { from { opacity: 0; transform: translateY(24px) scale(.98); } to { opacity: 1; transform: none; } }
.auth-card button[type="submit"] { position: relative; overflow: hidden; transition: transform .15s, box-shadow .2s; }
.auth-card button[type="submit"]:hover { transform: translateY(-1px); box-shadow: 0 16px 26px -14px rgba(18, 93, 217, .9); }
.auth-card button[type="submit"]::after { content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .35), transparent); transform: skewX(-20deg); animation: authShine 4.5s ease-in-out 1.2s infinite; }
@keyframes authShine { 0% { left: -60%; } 30%, 100% { left: 130%; } }

@media (prefers-reduced-motion: reduce) {
  .auth-photo, .auth-rise, .auth-blob, .auth-card, .auth-side::before, .auth-side::after, .auth-card button[type="submit"]::after { animation: none !important; }
  .auth-rise { opacity: 1; }
}

/* ── สัดส่วนเท่าเดิมทุกจอ (เจ้าของ 2026-11-16 "ไม่ว่าจะขนาดจอขนาดไหน การแสดงต้องเท่านี้ตลอด") ──
   จอคอม (≥1024px — มีรูปฝั่งซ้าย): ตัวอักษรฐาน = 0.95% ของความกว้างจอ (จอ 1920 ≈ 18px = หน้าตาต้นแบบ)
   Tailwind ใช้ rem ทั้งข้อความ/ช่องว่าง/ปุ่ม/การ์ด ทั้งหน้าจึงย่อ-ขยายเป็นสัดส่วนเดียวกันเหมือนสไลด์ · มือถือ/แท็บเล็ตแนวตั้ง = 16px ตามเดิม */
@media (min-width: 1024px) { html:has(.auth-side) { font-size: .948vw; } }
.auth-side .auth-blob.b1 { width: 30vw; height: 30vw; }
.auth-side .auth-blob.b2 { width: 26vw; height: 26vw; }
/* ขนาดที่เขียนเป็น px ในหน้า login/สมัคร — ให้ย่อ-ขยายตามสัดส่วนเดียวกัน */
@media (min-width: 1024px) {
  html:has(.auth-side) .text-\[11px\] { font-size: .6875rem; }
  html:has(.auth-side) .text-\[15px\] { font-size: .9375rem; }
  html:has(.auth-side) .auth-card { border-radius: 1.6rem; }
}
