:root {
  --bg: #f7f1e8;
  --surface: #fffaf5;
  --text: #11203a;
  --muted: #5d6777;
  --line: rgba(17, 32, 58, 0.12);
  --accent: #f26a2e;
  --accent-deep: #c94710;
  --accent-soft: #ffe1d0;
  --mint: #dff4ef;
  --mint-text: #0f6b5a;
  --danger: #b72d2d;
  --danger-soft: #fde5e5;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --shadow: 0 14px 40px rgba(17, 32, 58, 0.08);
  --max-width: 1100px;
}
* { box-sizing: border-box; }
body {
  margin: 0; min-height: 100vh;
  color: var(--text);
  font-family: "Noto Sans Thai", Tahoma, sans-serif;
  font-size: 16px; line-height: 1.65;
  background: linear-gradient(180deg, #fffaf5 0%, #f7f1e8 55%, #efe3d2 100%);
}
a { color: inherit; }
img { max-width: 100%; }
.shell { width: min(calc(100% - 28px), var(--max-width)); margin: 0 auto; }

/* ---------- header ---------- */
.site-header { padding: 14px 0; position: sticky; top: 0; z-index: 50;
  background: rgba(255, 250, 245, 0.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.nav-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.brand { font-size: 24px; font-weight: 800; text-decoration: none; letter-spacing: -0.5px; }
.brand span { color: var(--accent); }
.main-nav { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.main-nav a { text-decoration: none; font-weight: 600; }
.main-nav a:not(.btn):hover { color: var(--accent-deep); }

/* ---------- ปุ่ม ---------- */
.btn { display: inline-block; padding: 10px 18px; border-radius: 999px; border: 0;
  font-weight: 700; font-size: 15px; text-decoration: none; cursor: pointer; font-family: inherit; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-deep); }
.btn-outline { background: transparent; border: 1.5px solid var(--line); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent-deep); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 14px; }
.btn-block { display: block; width: 100%; text-align: center; }

/* ---------- hero + ฟอร์มค้นหา ---------- */
.hero { padding: 42px 0 26px; }
.hero h1 { font-size: clamp(28px, 5vw, 44px); margin: 0 0 8px; line-height: 1.25; }
.hero h1 em { color: var(--accent); font-style: normal; }
.hero p { color: var(--muted); margin: 0 0 20px; max-width: 640px; }
.search-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 18px; box-shadow: var(--shadow); display: grid; gap: 10px;
  grid-template-columns: 2fr 1fr 1fr auto; }
.search-card input, .search-card select { min-width: 0; }
@media (max-width: 760px) { .search-card { grid-template-columns: 1fr; } }

/* ---------- ฟอร์มทั่วไป ---------- */
input[type=text], input[type=tel], input[type=email], input[type=password],
input[type=number], input[type=date], select, textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  font: inherit; background: #fff; color: var(--text);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
textarea { min-height: 110px; resize: vertical; }
label { font-weight: 700; display: block; margin: 14px 0 6px; }
label small { font-weight: 400; color: var(--muted); }
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 26px; box-shadow: var(--shadow); max-width: 640px; margin: 24px auto; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 620px) { .form-grid { grid-template-columns: 1fr; } }
.check-row { display: flex; align-items: center; gap: 8px; font-weight: 500; margin: 8px 0; }
.check-row input { width: auto; }

/* ---------- การ์ดงาน ---------- */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 30px 0 14px; flex-wrap: wrap; }
.section-head h2 { margin: 0; font-size: 24px; }
.section-head a { color: var(--accent-deep); font-weight: 700; }
.job-list { display: grid; gap: 14px; }
.job-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: 18px 20px; text-decoration: none; display: block; transition: transform .12s, box-shadow .12s; }
.job-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--accent); }
.job-card h3 { margin: 0 0 4px; font-size: 18px; }
.job-card .co { color: var(--muted); font-size: 14.5px; margin-bottom: 8px; }
.job-meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13.5px; }
.tag { background: #f1ece3; border-radius: 999px; padding: 3px 11px; }
.tag-salary { background: var(--mint); color: var(--mint-text); font-weight: 700; }
.tag-urgent { background: var(--danger-soft); color: var(--danger); font-weight: 700; }
.tag-cat { background: var(--accent-soft); color: var(--accent-deep); }

/* ---------- ลิงก์กลุ่ม (อำเภอ/หมวด) ---------- */
.chip-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 15px; font-size: 14.5px; text-decoration: none; }
.chip:hover { border-color: var(--accent); color: var(--accent-deep); }

/* ---------- หน้า detail ---------- */
.detail-grid { display: grid; grid-template-columns: 1fr 340px; gap: 20px; margin-top: 20px; }
@media (max-width: 860px) { .detail-grid { grid-template-columns: 1fr; } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 24px; box-shadow: var(--shadow); }
.panel h1 { margin: 0 0 6px; font-size: 26px; }
.panel h2 { font-size: 19px; margin: 22px 0 8px; }
.panel ul { padding-left: 22px; margin: 6px 0; }
.apply-box { position: sticky; top: 84px; }
.contact-btns { display: grid; gap: 8px; margin: 12px 0; }
.pre-line { white-space: pre-line; }

/* ---------- ตาราง (หลังบ้าน) ---------- */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-md); box-shadow: var(--shadow); }
table.data { border-collapse: collapse; width: 100%; min-width: 640px; }
table.data th, table.data td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); font-size: 14.5px; }
table.data th { background: #f1ece3; font-size: 13.5px; }
table.data tr:last-child td { border-bottom: 0; }

/* ---------- สถานะ ---------- */
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; }
.badge-pending { background: #fff3cd; color: #8a6100; }
.badge-approved { background: var(--mint); color: var(--mint-text); }
.badge-rejected, .badge-banned { background: var(--danger-soft); color: var(--danger); }
.badge-closed, .badge-expired { background: #e8e6e1; color: var(--muted); }
.badge-new { background: var(--accent-soft); color: var(--accent-deep); }

/* ---------- flash ---------- */
.flash { margin: 16px 0; padding: 13px 18px; border-radius: var(--radius-sm); font-weight: 600; }
.flash-success { background: var(--mint); color: var(--mint-text); }
.flash-error { background: var(--danger-soft); color: var(--danger); }

/* ---------- stat cards ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 18px 0; }
.stat-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 16px 18px; }
.stat-card b { font-size: 26px; display: block; }
.stat-card span { color: var(--muted); font-size: 13.5px; }

/* ---------- pagination ---------- */
.pager { display: flex; gap: 6px; justify-content: center; margin: 26px 0; flex-wrap: wrap; }
.pager a, .pager b { padding: 7px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line);
  text-decoration: none; background: var(--surface); }
.pager b { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ---------- footer ---------- */
.site-footer { margin-top: 50px; border-top: 1px solid var(--line); background: #f1e9db; padding: 34px 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px; padding-bottom: 22px; }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { margin: 0 0 8px; }
.site-footer a { display: block; text-decoration: none; color: var(--muted); margin: 5px 0; }
.site-footer a:hover { color: var(--accent-deep); }
.site-footer p { color: var(--muted); font-size: 14.5px; }
.footer-bottom { border-top: 1px solid var(--line); padding: 14px 0; font-size: 13.5px; color: var(--muted); }

/* ---------- misc ---------- */
.breadcrumb { font-size: 13.5px; color: var(--muted); margin: 18px 0 4px; }
.breadcrumb a { color: var(--muted); }
.empty-note { text-align: center; color: var(--muted); background: var(--surface);
  border: 1px dashed var(--line); border-radius: var(--radius-md); padding: 34px 20px; }
.page-title { margin: 22px 0 6px; font-size: clamp(24px, 4vw, 34px); }
.sub-note { color: var(--muted); margin: 0 0 18px; }
.inline-form { display: inline; }

/* ---------- บล็อกเนื้อหา SEO หน้าแรก ---------- */
.seo-block { margin-top: 34px; }
.seo-block h2 { font-size: 21px; margin: 18px 0 8px; }
.seo-block h2:first-child { margin-top: 0; }
.seo-block a { color: var(--accent-deep); }
.faq-item { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 16px; margin: 8px 0; background: #fff; }
.faq-item summary { font-weight: 700; cursor: pointer; }
.faq-item p { margin: 8px 0 4px; color: var(--muted); }

/* ---------- กราฟแท่งสถิติ ---------- */
.bar-chart { display: flex; align-items: flex-end; gap: 3px; height: 180px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.bar { width: 100%; background: var(--accent); border-radius: 4px 4px 0 0; opacity: .85; }
.bar-col:hover .bar { opacity: 1; background: var(--accent-deep); }
.bar-label { font-size: 10px; color: var(--muted); margin-top: 4px; }

/* ---------- ปุ่ม LINE ลอย ---------- */
.line-fab { position: fixed; right: 18px; bottom: 18px; z-index: 60;
  background: #06c755; color: #fff; font-weight: 800; font-size: 14px;
  padding: 13px 16px; border-radius: 999px; text-decoration: none;
  box-shadow: 0 8px 24px rgba(6, 199, 85, 0.4); }
.line-fab:hover { background: #05b04c; }
