/* ==========================================================================
   ธีมหน้าผู้สมัครทุกหน้า (หน้าแรก + สร้างบัญชีผู้สมัคร เข้าสู่ระบบ หน้าของฉัน ฟอร์มต่าง ๆ)
   ฟอนต์ Kanit สำหรับหัวข้อ/เมนู/ปุ่ม · ช่องกรอกข้อมูลใช้ Sarabun ตามเดิม
   ไม่ใช้กับหน้าเจ้าหน้าที่และหน้าพิมพ์ (layout/main.php ตัวแปร $site)
   ========================================================================== */

/* ฟอนต์ Kanit เก็บในเครื่อง (ไม่ดึงจากเว็บภายนอก) — สัญญาอนุญาต OFL อยู่ใน fonts/kanit/OFL.txt */
@font-face { font-family: 'Kanit'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/kanit/kanit-thai-400-normal.woff2') format('woff2'); unicode-range: U+02D7,U+0303,U+0331,U+0E01-0E5B,U+200C-200D,U+25CC; }
@font-face { font-family: 'Kanit'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/kanit/kanit-thai-500-normal.woff2') format('woff2'); unicode-range: U+02D7,U+0303,U+0331,U+0E01-0E5B,U+200C-200D,U+25CC; }
@font-face { font-family: 'Kanit'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/kanit/kanit-thai-600-normal.woff2') format('woff2'); unicode-range: U+02D7,U+0303,U+0331,U+0E01-0E5B,U+200C-200D,U+25CC; }
@font-face { font-family: 'Kanit'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/kanit/kanit-thai-700-normal.woff2') format('woff2'); unicode-range: U+02D7,U+0303,U+0331,U+0E01-0E5B,U+200C-200D,U+25CC; }
@font-face { font-family: 'Kanit'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/kanit/kanit-latin-400-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Kanit'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/kanit/kanit-latin-500-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Kanit'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/kanit/kanit-latin-600-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Kanit'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/kanit/kanit-latin-700-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

/* --------------------------------------------------------------------------
   ✏️ สีของหน้าผู้สมัครทุกหน้า — เปลี่ยนสีได้ที่นี่ที่เดียว (รหัสสีแบบ #RRGGBB)
   -------------------------------------------------------------------------- */
:root {
  --lh-bg: #eef1f5;          /* พื้นหลังเทาอ่อน */
  --lh-bg-2: #ffffff;        /* พื้นหลังส่วนสลับ */
  --lh-blue: #0f4c81;        /* น้ำเงินหลัก (ปุ่มหลัก เมนู) */
  --lh-blue-2: #1d6fb8;      /* น้ำเงินรอง */
  --lh-blue-soft: #e1ecf8;   /* น้ำเงินอ่อน (ป้ายแคปซูล) */
  --lh-orange: #f07c1b;      /* ส้มเน้น (หัวข้อบรรทัดที่ 2) */
  --lh-orange-2: #e2580b;
  --lh-orange-text: #b84a06; /* ส้มสำหรับตัวหนังสือเล็ก (อ่านชัดบนพื้นขาว) */
  --lh-text: #15202b;
  --lh-muted: #52606d;
  --lh-card: #ffffff;
  --lh-line: #dbe2ea;
  --lh-shadow: 0 10px 30px rgba(15, 76, 129, .10);
  --lh-shadow-lg: 0 24px 60px rgba(15, 76, 129, .16);
}
@media screen and (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --lh-bg: #0e141b; --lh-bg-2: #131b24; --lh-blue: #6fb1ee; --lh-blue-2: #8cc4f5; --lh-blue-soft: #16283a;
    --lh-orange: #ff9a45; --lh-orange-2: #ff8124; --lh-orange-text: #ffb06b;
    --lh-text: #e6edf3; --lh-muted: #9fb0bf; --lh-card: #18212b; --lh-line: #2b3846;
    --lh-shadow: 0 10px 30px rgba(0, 0, 0, .35); --lh-shadow-lg: 0 24px 60px rgba(0, 0, 0, .5);
  }
}
@media screen {
  :root[data-theme="dark"] {
    --lh-bg: #0e141b; --lh-bg-2: #131b24; --lh-blue: #6fb1ee; --lh-blue-2: #8cc4f5; --lh-blue-soft: #16283a;
    --lh-orange: #ff9a45; --lh-orange-2: #ff8124; --lh-orange-text: #ffb06b;
    --lh-text: #e6edf3; --lh-muted: #9fb0bf; --lh-card: #18212b; --lh-line: #2b3846;
    --lh-shadow: 0 10px 30px rgba(0, 0, 0, .35); --lh-shadow-lg: 0 24px 60px rgba(0, 0, 0, .5);
  }
}

/* ---------- พื้นฐาน ---------- */
.lh-body { background: var(--lh-bg); color: var(--lh-text); font-family: 'Kanit', 'Sarabun', 'Segoe UI', Tahoma, sans-serif; font-weight: 400; overflow-x: hidden; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
.lh-wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.lh-main { display: block; }
.lh-body .ic { width: 1.15em; height: 1.15em; flex: none; }
.lh-muted { color: var(--lh-muted); }

/* ---------- ปุ่ม ---------- */
.lh-btn { white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 12px 26px; border-radius: 12px;
  font: 500 1.05rem/1.2 'Kanit', 'Sarabun', sans-serif; text-decoration: none; border: 2px solid transparent; cursor: pointer;
  transition: transform var(--dur-fast, .15s) ease, box-shadow var(--dur, .25s) ease, background var(--dur, .25s) ease; }
.lh-btn:hover { transform: translateY(-2px); text-decoration: none; }
.lh-btn:focus-visible { outline: 3px solid var(--lh-orange-text); outline-offset: 3px; }
.lh-btn-main { background: var(--lh-blue); color: #fff; box-shadow: 0 8px 20px rgba(15, 76, 129, .28); }
.lh-btn-main:hover { background: var(--lh-blue-2); color: #fff; }
.lh-btn-ghost { background: var(--lh-card); color: var(--lh-blue); border-color: var(--lh-line); }
.lh-btn-ghost:hover { border-color: var(--lh-blue); color: var(--lh-blue); }
.lh-btn-orange { background: var(--lh-orange); color: #1b1006; }
.lh-btn-orange:hover { background: var(--lh-orange-2); color: #1b1006; }
.lh-btn-light { background: rgba(255, 255, 255, .14); color: #fff; border-color: rgba(255, 255, 255, .55); }
.lh-btn-light:hover { background: rgba(255, 255, 255, .24); color: #fff; }
.lh-btn-sm { min-height: 44px; padding: 8px 18px; font-size: .98rem; border-radius: 10px; }
:root[data-theme="dark"] .lh-btn-main, :root[data-theme="dark"] .lh-btn-main:hover { color: #0b1220; }
@media screen and (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .lh-btn-main, :root:not([data-theme="light"]) .lh-btn-main:hover { color: #0b1220; } }

/* ---------- แถบเมนูบน: โลโก้ซ้าย เมนูกลาง ปุ่มเข้าสู่ระบบขวา ---------- */
.lh-nav { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--lh-bg) 86%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--lh-line); }
.lh-nav-in { display: flex; align-items: center; gap: 16px; min-height: 72px; }
.lh-nav .lh-brand { color: var(--lh-text); flex: 0 1 auto; gap: 10px; }
.lh-brand img { width: 44px; height: 44px; }
.lh-brand b { display: block; font-weight: 600; font-size: 1.02rem; line-height: 1.2; }
.lh-brand small { display: block; color: var(--lh-muted); font-size: .8rem; opacity: 1; }
.lh-links { display: flex; gap: 4px; margin: 0 auto; }
.lh-links a { padding: 8px 12px; border-radius: 8px; color: var(--lh-text); text-decoration: none; font-size: .98rem; white-space: nowrap; }
.lh-links a:hover { background: var(--lh-blue-soft); color: var(--lh-blue); }
.lh-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.lh-theme { background: transparent; border: 1px solid var(--lh-line); color: var(--lh-text); border-radius: 10px; padding: 6px 10px; min-height: 44px; cursor: pointer; font: inherit; font-size: .85rem; }
.lh-theme .tl { display: none; }
.lh-menu { display: none; position: relative; }
.lh-menu summary { list-style: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--lh-line); cursor: pointer; color: var(--lh-text); }
.lh-menu summary::-webkit-details-marker { display: none; }
.lh-menu summary svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.lh-menu-box { position: absolute; right: 0; top: 52px; min-width: 230px; background: var(--lh-card); border: 1px solid var(--lh-line); border-radius: 14px; box-shadow: var(--lh-shadow-lg); padding: 8px; display: grid; }
.lh-menu-box a { padding: 12px 14px; border-radius: 10px; color: var(--lh-text); text-decoration: none; }
.lh-menu-box a:hover { background: var(--lh-blue-soft); }
.lh-menu-box a.lh-menu-cta { background: var(--lh-blue); color: #fff; text-align: center; margin-top: 6px; }


/* ---------- ท้ายเว็บ ---------- */
.lh-foot { background: #0b1e33; color: #c9d6e3; padding: 48px 0 0; }
.lh-foot-in { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 32px; }
.lh-foot-brand { display: flex; gap: 14px; align-items: flex-start; }
.lh-foot-brand b { color: #fff; font-weight: 600; font-size: 1.1rem; }
.lh-foot-brand p, .lh-foot p { margin: 6px 0 0; font-weight: 300; line-height: 1.7; }
.lh-foot h3 { color: #fff; font-family: 'Kanit', sans-serif; font-weight: 500; font-size: 1.05rem; margin: 0 0 8px; }
.lh-foot ul { list-style: none; padding: 0; margin: 0; }
.lh-foot li { margin: 4px 0; }
.lh-foot a { color: #ffd2a8; text-decoration: none; }
.lh-foot a:hover { text-decoration: underline; color: #fff; }
.lh-copy { text-align: center; margin: 36px 0 0; padding: 16px 20px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: .88rem; color: #9fb2c6; font-weight: 300; }


/* ---------- เมนูบน/ท้ายเว็บ: แท็บเล็ตและมือถือ ---------- */
@media (max-width: 1080px) { .lh-links a { padding: 8px 8px; font-size: .92rem; } }
@media (max-width: 920px) {
  .lh-links { display: none; }
  .lh-menu { display: block; }
  .lh-foot-in { grid-template-columns: 1fr 1fr; }
  .lh-foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  .lh-wrap { padding: 0 16px; }
  .lh-nav-in { min-height: 64px; gap: 8px; }
  .lh-brand img { width: 38px; height: 38px; }
  .lh-brand b { font-size: .9rem; }
  .lh-brand > span { min-width: 0; }
  .lh-brand small { font-size: .74rem; }
  .lh-actions .lh-btn-sm { padding: 8px 12px; }
  .lh-actions .lh-btn-sm .ic { display: none; }
  .lh-theme { padding: 6px 8px; }
  .lh-foot-in { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .lh-brand small { display: none; }
  .lh-brand b { font-size: .84rem; }
  .lh-theme { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .lh-body *, .lh-body *::before, .lh-site *, .lh-site *::before { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ==========================================================================
   หน้าผู้สมัครอื่น ๆ (ใช้ layout/main.php) — ปรับกล่อง ปุ่ม หัวข้อ ให้เข้ากับหน้าแรก
   ช่องกรอกข้อมูลยังเป็น Sarabun เพื่ออ่านง่าย
   ========================================================================== */
.lh-site { --bg: var(--lh-bg); --gold: var(--lh-orange); --on-gold: #1b1006; --gold-soft: #ffeedd; --gold-text: var(--lh-orange-text); }
@media screen and (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .lh-site { --gold-soft: #3a2412; } }
:root[data-theme="dark"] .lh-site { --gold-soft: #3a2412; }
body.lh-site { background: var(--lh-bg); }
.lh-site h1, .lh-site h2, .lh-site h3, .lh-site legend, .lh-site .btn, .lh-site .steps b { font-family: 'Kanit', 'Sarabun', 'Segoe UI', Tahoma, sans-serif; }
.lh-site h1 { font-weight: 600; font-size: clamp(1.45rem, 2.6vw, 1.9rem); letter-spacing: -.005em; }
.lh-site h2, .lh-site h3, .lh-site legend { font-weight: 500; }
.lh-site main.wrap { padding-top: 28px; padding-bottom: 56px; }
.lh-site .card { border-radius: 18px; border: 1px solid var(--lh-line); box-shadow: var(--lh-shadow); padding: 22px; }
/* ปุ่ม .btn ใช้แบบเดียวทั้งระบบ — ดู app.css */
.lh-site input[type=text], .lh-site input[type=password], .lh-site input[type=email], .lh-site input[type=url], .lh-site input[type=tel], .lh-site input[type=number],
.lh-site input[type=date], .lh-site select { min-height: 46px; border-radius: 10px; }
.lh-site textarea, .lh-site input[type=file] { border-radius: 10px; }
.lh-site fieldset { border-radius: 14px; border-color: var(--lh-line); background: var(--surface); }
.lh-site .alert { border-radius: 12px; }
@media (max-width: 560px) {
  .lh-site .card { padding: 18px 16px; border-radius: 16px; }
  .lh-site main.wrap { padding-top: 18px; }
}
