/* หน้าเข้าสู่ระบบ · สมัคร · ลืมรหัส · ตั้งรหัส (9 พ.ย. 2569)
   ไฟล์เดียวจบ ไม่พึ่ง /shared/style.css · ฟอนต์ Prompt อยู่ในระบบเอง ไม่ต้องรอ Google
   สี + ฟอนต์ตาม SEO/websites/sotofix/ตัวตนเว็บ-sotofix.md · ปุ่ม LINE/Google ตามแนวทางของเจ้าของแบรนด์ */

@font-face { font-family: "Prompt"; font-style: normal; font-weight: 400; font-display: swap; src: url("/account/fonts/prompt-400.woff2") format("woff2"); }
@font-face { font-family: "Prompt"; font-style: normal; font-weight: 500; font-display: swap; src: url("/account/fonts/prompt-500.woff2") format("woff2"); }

:root {
  --ink: #002C2F;
  --teal: #1E646E;
  --muted: #4A6670;
  --line: #DCE5E6;
  --soft: #F3F7F7;
  --accent: #FDD301;
  --err: #B3261E;
  --err-bg: #FBEAE9;
  --ok: #05735F;
  --ok-bg: #E6F6F2;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
[hidden] { display: none !important; }

body.auth {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: #fff;
  color: var(--ink);
  font: 400 16px/1.6 "Prompt", "Leelawadee UI", "Noto Sans Thai", sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ---------- แบรนด์ ---------- */
.auth-brand { width: 100%; max-width: 420px; margin-inline: auto; padding: 28px 24px 0; }
.auth-logo { display: inline-block; }
.auth-logo img { display: block; width: 128px; height: auto; }
.auth-tag { display: none; }

/* ---------- ฟอร์ม ---------- */
.auth-main { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 40px 24px 28px; }
.auth-box { width: 100%; max-width: 372px; }
.auth-foot { width: 100%; max-width: 372px; margin-top: auto; padding-top: 36px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.auth-foot a { white-space: nowrap; }
.auth-back { display: block; width: fit-content; margin-bottom: 6px; color: var(--teal) !important; font-size: 14px; }

.a-title { margin: 0 0 28px; font-size: 30px; font-weight: 500; line-height: 1.3; letter-spacing: -.005em; text-wrap: balance; }
.a-sub { margin: -18px 0 28px; color: var(--muted); font-size: 15px; overflow-wrap: anywhere; text-wrap: pretty; }
.a-sub b { color: var(--ink); font-weight: 500; }

.a-lbl { display: block; margin-bottom: 6px; color: var(--muted); font-size: 14px; }
.a-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.a-field { margin-bottom: 18px; }
.a-hint { margin: 6px 0 20px; color: var(--muted); font-size: 13px; }

.a-form input[type="email"],
.a-form input[type="password"],
.a-form input[type="text"] {
  display: block;
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.a-form input:hover { border-color: #B9C9CB; }
.a-form input:focus { outline: 0; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(30, 100, 110, .14); }
.a-form input::placeholder { color: #8FA3A8; }

.a-pass { position: relative; }
.a-pass input { padding-right: 64px !important; }
.a-show {
  position: absolute; top: 4px; right: 4px; height: 40px; min-width: 52px; padding: 0 10px;
  border: 0; border-radius: 8px; background: transparent; color: var(--teal); font: inherit; font-size: 13px; cursor: pointer;
}
.a-show:hover { background: var(--soft); }

/* ---------- ปุ่ม ---------- */
.go {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 50px; padding: 0 16px;
  border: 0; border-radius: 10px;
  font: inherit; font-weight: 500; text-decoration: none; cursor: pointer;
  transition: background-color .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.go:focus-visible, .a-link:focus-visible, .a-show:focus-visible, .auth-logo:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.go[disabled] { opacity: .6; cursor: default; }
.go + .go { margin-top: 10px; }
.go svg { flex: 0 0 auto; width: 20px; height: 20px; }

.go.main { background: var(--ink); color: #fff; }
.go.main:hover:not([disabled]) { background: var(--teal); }
.go.line { background: #06C755; color: #fff; }
.go.line:hover { background: #05B34C; }
.go.line svg { fill: currentColor; width: 21px; height: 21px; }
.go.google { background: #fff; color: #1F1F1F; box-shadow: inset 0 0 0 1px #747775; }
.go.google:hover { background: #F7F8F8; }

.a-or { display: flex; align-items: center; gap: 14px; margin: 22px 0; color: var(--muted); font-size: 13px; }
.a-or::before, .a-or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }

/* ---------- ลิงก์ · ข้อความ ---------- */
.a-link { color: var(--teal); text-decoration: none; text-underline-offset: 3px; }
.a-link:hover { text-decoration: underline; }
.a-text-btn { padding: 0; border: 0; background: none; font: inherit; cursor: pointer; }
.a-small { font-size: 14px; }
.a-alt { margin: 22px 0 0; color: var(--muted); font-size: 15px; text-align: center; }

.a-check { display: flex; gap: 10px; align-items: flex-start; margin: 2px 0 20px; color: var(--muted); font-size: 14px; line-height: 1.6; cursor: pointer; }
.a-check input { flex: 0 0 auto; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--teal); }
.auth-foot a, .a-check a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.auth-foot a:hover, .a-check a:hover { color: var(--ink); }

.a-msg { margin: 0 0 20px; padding: 12px 14px; border-radius: 10px; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.a-msg.err { background: var(--err-bg); color: var(--err); }
.a-msg.ok { background: var(--ok-bg); color: var(--ok); }
.a-msg.dev { background: var(--soft); color: var(--muted); font-size: 13px; }

/* ---------- จอกว้าง: แบ่ง 2 ฝั่ง ---------- */
@media (min-width: 960px) {
  body.auth { flex-direction: row; }
  .auth-brand {
    flex: 0 0 42%;
    max-width: none; margin: 0;
    display: flex; flex-direction: column; justify-content: space-between;
    padding: 48px 56px;
    background: radial-gradient(120% 90% at 100% 0%, rgba(30, 100, 110, .5), transparent 62%), var(--ink);
  }
  .auth-logo img { width: 148px; }
  .auth-tag { display: block; }
  .auth-tag::before { content: ""; display: block; width: 32px; height: 3px; margin-bottom: 22px; background: var(--accent); }
  .auth-line { margin: 0; max-width: 11em; color: #fff; font-size: 34px; font-weight: 500; line-height: 1.35; text-wrap: balance; }
  .auth-main { padding: 48px; }
  .auth-box { margin-block: auto; }
  .auth-foot { margin-top: 0; }
  .a-title { font-size: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
