/* assets/auth.css — หน้าเข้าสู่ระบบ / สมัครสมาชิก (ธีมเขียว-ทอง)
   ใช้คู่กับ assets/sb-theme.css (สี ฟอนต์ ตัวแปร --sb-*) · ชื่อคลาสเดิมของหน้า ไม่ต้องแก้ JavaScript */

* { box-sizing: border-box; }
html, body { height: 100%; }
body { display: flex; flex-direction: column; min-height: 100vh; margin: 0; background: var(--sb-paper); color: var(--sb-ink);
       font-family: "Prompt", -apple-system, "Segoe UI", "Noto Sans Thai", Tahoma, sans-serif; line-height: 1.6; -webkit-font-smoothing: antialiased; }
:focus-visible { outline: 3px solid var(--sb-marker); outline-offset: 3px; border-radius: 6px; }

/* กล่องฟอร์ม */
main { flex: 1 0 auto; display: flex; align-items: center; justify-content: center; padding: clamp(32px,6vw,64px) 16px 24px; }
.panel { background: #fff; border: 1px solid var(--sb-line); border-radius: 24px; padding: 28px 24px; width: 100%; max-width: 440px; }
.eyebrow { font-size: 13px; font-weight: 600; color: var(--sb-gold); }
h1 { font-size: 26px; font-weight: 700; line-height: 1.3; letter-spacing: -.01em; margin: 4px 0 6px; }
.sub { color: var(--sb-body); font-size: 14.5px; margin: 0 0 20px; }

label { display: block; font-size: 14.5px; font-weight: 600; margin: 16px 0 6px; }
.hint { font-size: 12.5px; color: var(--sb-muted); margin-top: 4px; }
input[type=text], input[type=password] { width: 100%; min-height: 48px; background: #fff; border: 1.5px solid var(--sb-line2); color: var(--sb-ink);
       padding: 10px 14px; border-radius: 12px; font-family: inherit; font-size: 16px; }
input[type=text]:focus, input[type=password]:focus { outline: none; border-color: var(--sb-gold-light); box-shadow: 0 0 0 4px rgba(241,212,140,.45); }

/* ช่องรหัสผ่าน + ปุ่มแสดง/ซ่อน */
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 48px; }
.pw-toggle { position: absolute; top: 0; bottom: 0; right: 6px; width: 40px; background: none; border: none; cursor: pointer; padding: 0;
             display: flex; align-items: center; justify-content: center; color: var(--sb-muted); }
.pw-toggle:hover { color: var(--sb-ink); }
.pw-toggle svg { width: 20px; height: 20px; display: block; pointer-events: none; }

/* เลือกบทบาท (หน้าสมัคร) */
.role-group { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.role-option { position: relative; }
.role-option input { position: absolute; opacity: 0; }
.role-option label.card { margin: 0; text-align: left; padding: 14px; border: 1.5px solid var(--sb-line2); border-radius: 16px; cursor: pointer;
                          color: var(--sb-ink); font-weight: 600; font-size: 15px; height: 100%; }
.role-option label.card .ic { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: var(--sb-paper2); color: var(--sb-gold); margin-bottom: 8px; }
.role-option label.card .ic svg { width: 20px; height: 20px; }
.role-option label.card small { display: block; font-size: 12.5px; font-weight: 400; color: var(--sb-muted); margin-top: 2px; line-height: 1.45; }
.role-option label.card:hover { border-color: var(--sb-ink); }
.role-option input:checked + label.card { border-color: var(--sb-ink); background: var(--sb-gold-soft); box-shadow: 0 0 0 1px var(--sb-ink); }
.role-option input:checked + label.card .ic { background: var(--sb-ink); color: var(--sb-paper); }
.role-option input:focus-visible + label.card { outline: 3px solid var(--sb-marker); outline-offset: 2px; }

/* ติ๊กยอมรับนโยบาย */
.accept { display: flex; gap: 10px; align-items: flex-start; margin-top: 18px; font-size: 14px; font-weight: 400; color: var(--sb-body); line-height: 1.55; }
.accept input { margin-top: 2px; width: 20px; height: 20px; accent-color: var(--sb-ink); flex-shrink: 0; }
.accept a { color: var(--sb-gold); font-weight: 600; }

/* ปุ่มหลัก = ปุ่มทองขอบมน 14px แบบหน้าแรก (สไตล์หลักอยู่ที่ .sb-cta ใน sb-theme.css) */
.submit { margin-top: 22px; }

.error { margin-bottom: 6px; padding: 12px 14px; background: var(--sb-bad-bg); color: var(--sb-bad-fg); border-radius: 14px; font-size: 14px; }
.footer-link { text-align: center; margin-top: 20px; font-size: 14.5px; color: var(--sb-muted); }
.footer-link a { color: var(--sb-gold); font-weight: 600; text-decoration: none; }
.footer-link a:hover { text-decoration: underline; }

/* ท้ายเว็บ: ใช้แบบหน้าแรก (.sb-land .footer ใน sb-theme.css) */
.footer { flex-shrink: 0; width: 100%; }

@media (max-width: 360px) { .role-group { grid-template-columns: 1fr; } }

