/* ---------- ค่าเริ่มต้น = ธีมหน้าลูกค้าเดิม (เขียว/น้ำตาล) ----------
   หลังบ้าน (dashboard.html/login.html) ใช้ธีม Earthy Elegant แยกผ่าน body.dash-theme ด้านล่าง ---------- */
:root {
  --roomscope: #2471a3;
  --direct: #1e8449;
  --legacy: #95a5a6;
  --bg: #f4f6f8;
  --card: #ffffff;
  --text: #2c3e50;
  --muted: #7f8c8d;
  --green: #27ae60;
  --urgent: #e74c3c;
  --line: #06c755;
}
/* ---------- ธีม Earthy Elegant สำหรับหลังบ้าน (dashboard.html/login.html) เท่านั้น ----------
   eucalyptus #8FA998 / olive #5B6B45 / terracotta #C1653C / soft warm navy #1F4B58
   camel #D2A46D / nutmeg #7A4B2A / mushroom taupe #8D7F72 / golden sand #E0B24E
   cream #F6F0E4 / warm ivory #E6DAC5 / oatmeal #CC9636 / cognac #5A3820
   dusty rose #C08478 / burnt sienna #B8663A / soft charcoal #3A352C / forest green #1E3A22 ---------- */
body.dash-theme {
  --roomscope: #E0B24E;
  --direct: #5B6B45;
  --legacy: #8D7F72;
  --bg: #F6F0E4;
  --card: #FFFDF8;
  --text: #3A352C;
  --muted: #8D7F72;
  --green: #5B6B45;
  --urgent: #B8663A;
  --line: #06c755;
  font-family: 'LINE Seed Sans TH', 'Prompt', 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  max-width: 100%; overflow-x: hidden;
}
body {
  font-family: 'LINE Seed Sans TH', 'Prompt', 'Segoe UI', Tahoma, 'Noto Sans Thai', sans-serif;
  background: var(--bg); color: var(--text); font-size: 15px;
}

/* ---------- login ---------- */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #3A352C, #5A3820);
}
.login-card {
  background: var(--card); border-radius: 16px; padding: 36px 32px;
  width: 340px; text-align: center; box-shadow: 0 10px 40px rgba(0,0,0,.3);
}
.login-card h1 { font-size: 22px; margin-bottom: 4px; }
.login-card .sub { color: var(--muted); margin-bottom: 22px; font-size: 13px; }
.login-card input {
  width: 100%; padding: 12px; font-size: 24px; text-align: center;
  letter-spacing: 8px; border: 2px solid #D9CDBC; border-radius: 10px; margin-bottom: 14px;
}
.login-card button {
  width: 100%; padding: 12px; font-size: 16px; border: 0; border-radius: 10px;
  background: #5A3820; color: #fff; cursor: pointer; font-weight: 600;
}
.login-card .err { color: var(--urgent); font-size: 13px; margin-top: 10px; min-height: 18px; }
.login-card .hint { color: var(--muted); font-size: 12px; margin-top: 14px; }

/* ---------- layout ---------- */
header.topbar {
  background: #3A352C; color: #fff; padding: 10px 18px;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
header.topbar h1 { font-size: 18px; flex: 1; }
header.topbar .badge-demo { background: #E0B24E; color: #fff; font-size: 11px; padding: 2px 8px; border-radius: 10px; }
header.topbar button { background: rgba(255,255,255,.15); color: #fff; border: 0; padding: 6px 12px; border-radius: 8px; cursor: pointer; }
.main { display: flex; flex-direction: column; gap: 14px; padding: 14px; max-width: 2000px; margin: 0 auto; }
.cal-side-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
@media (max-width: 980px) { .cal-side-row { grid-template-columns: 1fr; } }
.card { background: var(--card); border-radius: 12px; padding: 14px; box-shadow: 0 1px 4px rgba(0,0,0,.08); min-width: 0; }
.main { min-width: 0; }
.cal-scroll { max-width: 100%; }
.card h2 { font-size: 15px; margin-bottom: 10px; }

/* ---------- ops tabs: เช็คอิน / เช็คเอาท์ / ทำความสะอาด ---------- */
.op-tabs { display: flex; gap: 8px; padding: 14px 14px 0; max-width: 1500px; margin: 0 auto; flex-wrap: wrap; }
.op-tab {
  background: #fff; border: 1px solid #D9CDBC; padding: 9px 18px; border-radius: 10px;
  cursor: pointer; font-size: 13px; font-weight: 700; color: var(--muted);
}
.op-tab.active { background: #3A352C; color: #fff; border-color: transparent; }
.op-panel { display: none; }
.op-panel.active { display: block; }
.op-subnav {
  display: flex; gap: 8px; padding: 14px 14px 0; max-width: 1500px; margin: 0 auto;
}
.op-subnav-btn {
  padding: 8px 16px; border-radius: 8px; border: 1px solid #D9CDBC; background: #fff;
  font-size: 14px; font-weight: 600; cursor: pointer; color: #555;
}
.op-subnav-btn.active { background: #3A352C; color: #fff; border-color: transparent; }
.op-datebar {
  display: flex; align-items: center; gap: 10px; padding: 14px; max-width: 1500px; margin: 0 auto;
  flex-wrap: wrap;
}
.op-navbtn {
  background: #fff; border: 1px solid #D9CDBC; border-radius: 8px; width: 32px; height: 32px;
  cursor: pointer; font-size: 14px; flex-shrink: 0;
}
.op-date-label { font-weight: 700; font-size: 15px; min-width: 110px; text-align: center; }
.op-select { padding: 7px 10px; border: 1px solid #D9CDBC; border-radius: 8px; font-size: 13px; background: #fff; }
.op-body { max-width: 1500px; margin: 0 auto; padding: 20px 14px; }
.op-section-title { font-size: 14px; font-weight: 700; margin: 16px 0 8px; }
.op-empty { color: var(--muted); font-size: 13px; text-align: center; padding: 16px; }

/* ---------- top main nav (Dashboard / บุ๊คกิ้ง / บัญชี / ฯลฯ) ---------- */
.topnav {
  background: #3A352C; color: #fff; padding: 0 18px; display: flex; align-items: center; gap: 20px;
  min-height: 52px; flex-wrap: wrap;
}
.topnav-brand { font-weight: 700; font-size: 16px; white-space: nowrap; }
.topnav-menu { display: flex; align-items: stretch; gap: 2px; flex: 1; flex-wrap: wrap; }
.tn-item {
  position: relative; display: flex; align-items: center; gap: 4px; padding: 0 14px; height: 52px;
  cursor: pointer; font-size: 13.5px; font-weight: 600; color: rgba(255,255,255,.85); white-space: nowrap;
  text-decoration: none;
}
.tn-item:hover, .tn-item.tn-open { background: rgba(255,255,255,.1); color: #fff; }
.tn-item.tn-active { color: #fff; box-shadow: inset 0 -3px 0 #E0B24E; }
.tn-item.tn-disabled { cursor: not-allowed; color: rgba(255,255,255,.4); }
.tn-item.tn-disabled:hover { background: none; }
.tn-caret { font-size: 10px; }

.tn-drop {
  display: none; position: absolute; top: 100%; left: 0; background: #fff; color: #3A352C;
  min-width: 200px; border-radius: 0 0 10px 10px; box-shadow: 0 8px 24px rgba(0,0,0,.18); z-index: 500;
  padding: 6px 0;
}
.tn-item.tn-open .tn-drop { display: block; }
.tn-drop-right { left: auto; right: 0; border-radius: 10px 0 10px 10px; }
.tn-drop-item {
  padding: 9px 16px; font-size: 13px; font-weight: 500; color: #3A352C; cursor: pointer; white-space: nowrap;
}
.tn-drop-item:hover { background: #f4f6f8; }
.tn-drop-item.tn-disabled { color: #8D7F72; cursor: not-allowed; }
.tn-drop-item.tn-disabled:hover { background: none; }
.tn-drop-sep { height: 1px; background: #eef1f4; margin: 6px 0; }
.tn-drop-label { padding: 6px 16px 2px; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.tn-drop-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tn-drop-arrow { color: #8D7F72; font-size: 14px; }

.topnav-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.tn-add-btn { background: #E0B24E; color: #fff; border: 0; padding: 8px 14px; border-radius: 8px; font-weight: 700; font-size: 13px; cursor: pointer; white-space: nowrap; }
.tn-add-btn:hover { background: #e67e22; }
.tn-link-btn { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.5); padding: 8px 14px; border-radius: 8px; font-weight: 600; font-size: 13px; cursor: pointer; white-space: nowrap; }
.tn-link-btn:hover { background: rgba(255,255,255,.12); }
.tn-avatar-item { padding: 0 6px; }
.tn-avatar { width: 32px; height: 32px; border-radius: 50%; background: #E0B24E; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; }

.tn-hamburger {
  display: none; width: 34px; height: 34px; flex-shrink: 0; margin-left: 8px;
  align-items: center; justify-content: center; background: rgba(255,255,255,.12);
  border: none; border-radius: 8px; color: #fff; font-size: 17px; cursor: pointer;
}
.tn-hamburger:hover { background: rgba(255,255,255,.2); }

@media (max-width: 768px) {
  /* คอลัมน์แนวตั้ง: บังคับให้แต่ละแถว (บนสุด/ปุ่มขวา/เมนู) เต็มความกว้างจอเสมอ ไม่พึ่ง order/flex-basis ที่เคยพังบน Safari */
  .topnav { flex-direction: column; align-items: stretch; flex-wrap: nowrap; padding: 8px 10px; gap: 6px; min-height: 0; }
  .tn-toprow { display: flex; align-items: center; justify-content: space-between; width: 100%; }
  .topnav-brand { font-size: 14px; padding: 2px 2px 0; }
  .tn-hamburger { display: flex; }

  /* ปุ่มขวา (หน้าจองลูกค้า/เพิ่มการจอง/avatar) อยู่แถวของตัวเอง เต็มความกว้าง ไม่ล้นขอบจอ */
  .topnav-right { width: 100%; margin-left: 0; justify-content: flex-end; flex-wrap: wrap; gap: 6px; }
  .tn-link-btn, .tn-add-btn { padding: 6px 10px; font-size: 12px; }

  /* เมนูหลัก (Dashboard/บุ๊คกิ้ง/...) พับเก็บเป็นปุ่มแฮมเบอร์เกอร์ กดแล้วกางเป็นลิสต์แนวตั้งเต็มความกว้าง */
  .topnav-menu {
    width: 100%; display: none; flex-direction: column; gap: 0;
    max-height: 70vh; overflow-y: auto; -webkit-overflow-scrolling: touch;
    border-top: 1px solid rgba(255,255,255,.15); margin-top: 2px;
  }
  .topnav-menu.tn-mobile-open { display: flex; }
  .tn-item { height: auto; width: 100%; box-sizing: border-box; padding: 12px; font-size: 13.5px; }
  .tn-item.tn-has-drop { flex-wrap: wrap; }

  /* ดรอปดาวน์ย่อยในเมนูมือถือ: กางลงมาแบบ accordion แทนลอยทับ (position:static แทน absolute) */
  .topnav-menu .tn-item .tn-drop {
    position: static; display: none; width: 100%; box-shadow: none; border-radius: 0;
    background: rgba(0,0,0,.15); margin: 6px 0 0; padding: 4px 0 4px 14px;
  }
  .topnav-menu .tn-item.tn-open .tn-drop { display: block; }
  .topnav-menu .tn-drop-item { color: rgba(255,255,255,.92); }
  .topnav-menu .tn-drop-item:hover { background: rgba(255,255,255,.1); }
  .topnav-menu .tn-drop-sep { background: rgba(255,255,255,.15); }
  .topnav-menu .tn-drop-label { color: rgba(255,255,255,.55); }
  .topnav-menu .tn-drop-arrow { color: rgba(255,255,255,.55); }
}

.tn-bell-item { padding: 0 6px; position: relative; cursor: pointer; }
.tn-bell { font-size: 19px; position: relative; display: inline-block; line-height: 1; }
.tn-bell-badge {
  position: absolute; top: -7px; right: -9px; background: #B8663A; color: #fff;
  font-size: 10px; font-weight: 700; min-width: 16px; height: 16px; border-radius: 8px;
  display: none; align-items: center; justify-content: center; padding: 0 3px; line-height: 1;
}
.tn-bell-badge.show { display: flex; }
.tn-noti-list { padding: 0; }
.tn-noti-list .noti { margin-bottom: 6px; }
.tn-noti-list .empty { padding: 10px 6px; color: var(--muted); font-size: 12.5px; text-align: center; }

/* ---------- แผงแจ้งเตือน (เลื่อนเข้าจากขวา แทนดร็อปดาวน์เดิม กันข้อความล้นจอ) ---------- */
.noti-drawer-backdrop {
  display: none; position: fixed; inset: 0; background: rgba(15, 23, 42, .35); z-index: 850;
}
.noti-drawer-backdrop.open { display: block; }
.noti-drawer {
  position: fixed; top: 0; right: 0; height: 100vh; width: min(380px, 92vw);
  background: #f7f8fa; box-shadow: -8px 0 24px rgba(0,0,0,.18); z-index: 900;
  padding: 16px; overflow-y: auto; -webkit-overflow-scrolling: touch;
  transform: translateX(100%); transition: transform .25s ease;
}
.noti-drawer.open { transform: translateX(0); }
.noti-drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.noti-drawer-head h2 { font-size: 16px; margin: 0; }
.noti-drawer-close {
  background: #fff; border: 1px solid #e2e6ea; border-radius: 8px; font-size: 15px; cursor: pointer;
  color: var(--muted); padding: 4px 10px; line-height: 1.6;
}
.noti-drawer-close:hover { background: #eef1f4; }

.ci-row {
  background: var(--card); border-radius: 10px; padding: 12px 14px; box-shadow: 0 1px 4px rgba(0,0,0,.06);
  margin-bottom: 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px;
  border-left: 4px solid #E0B24E;
}
.ci-row.done { border-left-color: #16a34a; }
.ci-house { font-weight: 700; font-size: 13px; min-width: 150px; }
.ci-ref { font-size: 12px; color: #C1653C; font-weight: 700; }
.ci-guest { font-size: 13px; }
.ci-meta { font-size: 12px; color: var(--muted); }
.ci-time { font-size: 11.5px; color: #16a34a; font-weight: 600; }
.ci-actions { margin-left: auto; }
.btn-op { padding: 7px 16px; border-radius: 8px; border: none; cursor: pointer; font-size: 13px; font-weight: 700; color: #fff; }
.btn-op.ci-in { background: #16a34a; }
.btn-op.ci-out { background: #B8663A; }
.btn-op:disabled { opacity: .5; cursor: default; }

/* ---------- ค้นหาบุ๊คกิ้ง ---------- */
.sr-filterbar { max-width: 1500px; margin: 14px auto 0; padding: 16px; }
.sr-row { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.sr-row2 { margin-top: 14px; align-items: center; }
.sr-field { display: flex; flex-direction: column; gap: 4px; }
.sr-field label { font-size: 12px; font-weight: 700; color: var(--muted); }
.sr-field input[type="date"], .sr-field input[type="text"], .sr-field-kw input {
  padding: 8px 10px; border: 1px solid #D9CDBC; border-radius: 8px; font-size: 13px;
}
.sr-field-kw { flex: 1; min-width: 220px; }
.sr-field-kw input { width: 100%; box-sizing: border-box; }
.sr-toggle { display: flex; border: 1px solid #D9CDBC; border-radius: 8px; overflow: hidden; }
.sr-toggle-btn { padding: 8px 14px; border: none; background: #fff; font-size: 13px; font-weight: 600; cursor: pointer; color: #555; }
.sr-toggle-btn.active { background: #B8663A; color: #fff; }
.sr-search-btn { background: #E0B24E; padding: 9px 20px; }
.sr-download-btn { background: #16a34a; margin-left: auto; }
.sr-check { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #444; cursor: pointer; }
.sr-results-card { max-width: 1500px; margin: 14px auto 0; padding: 16px; }
.sr-table-scroll { overflow-x: auto; }
.sr-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.sr-table th { text-align: left; padding: 8px 10px; border-bottom: 2px solid #eee; color: var(--muted); font-size: 12px; white-space: nowrap; }
.sr-table td { padding: 8px 10px; border-bottom: 1px solid #f2f2f2; white-space: nowrap; }
.sr-table tr:hover td { background: #fafbfc; }
.sr-table tr.rty-inactive { opacity: .55; }
.sr-table-bordered th, .sr-table-bordered td { border: 1px solid #e5e5e5; text-align: center; white-space: normal; }
.sr-table-bordered thead tr:nth-child(2) th { border-top: none; }
.sr-table-bordered td:nth-child(2), .sr-table-bordered th:nth-child(2) { text-align: left; }
/* หัวข้อคั่นกลุ่มวันที่ในตาราง "ค้นหาการชำระเงิน" - แถวเต็มความกว้าง คั่นระหว่างกลุ่มแถวของแต่ละวัน */
.pm-date-row td { background: #f4f6f5; color: #5a6a63; font-weight: 700; font-size: 12.5px; padding: 7px 10px; border-bottom: 1px solid #e5e8e8; white-space: nowrap; }
.pm-date-row:hover td { background: #f4f6f5 !important; }
.pm-ref-link {
  background: none; border: none; padding: 0; cursor: pointer;
  color: #C1653C; font-weight: 700; font-size: 13px; text-decoration: underline;
}
.pm-ref-link:hover { color: #8F4A26; }
.hl-avatar { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; color: #fff; font-size: 12px; font-weight: 600; }
.op-crumb { color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.rm-flag { cursor: pointer; font-size: 12px; display: inline-block; padding: 1px 0; }
.rm-flag-off { color: var(--muted); }
.rm-section-header { background: #E6DAC5; border-left: 4px solid #C1653C; padding: 9px 12px; font-weight: 700; font-size: 13.5px; color: #5A3820; margin: 16px 0 10px; border-radius: 4px; }
.rm-mini-table { width: 100%; border-collapse: collapse; font-size: 12px; margin: 6px 0; }
.rm-mini-table th, .rm-mini-table td { border: 1px solid #e5e5e5; padding: 5px 6px; text-align: center; }
.rm-mini-table input { width: 100%; padding: 4px 6px; border: 1px solid #D9CDBC; border-radius: 5px; font-size: 12px; }
.rm-mini-del { background: none; border: none; color: #B8663A; cursor: pointer; font-size: 13px; }
.rm-view-check { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; margin: 3px 12px 3px 0; font-weight: 400; }
.gs-actions .btn-op:disabled { opacity: .4; cursor: not-allowed; }
.sr-status-chip { padding: 2px 8px; border-radius: 12px; font-size: 11px; font-weight: 700; color: #fff; }
@media (max-width: 900px) {
  .sr-row { gap: 10px; }
  .sr-download-btn { margin-left: 0; }
}

/* ---------- แจ้งผู้เข้าพัก ---------- */
.gs-tabbar { display: flex; gap: 4px; max-width: 1500px; margin: 14px auto 0; padding: 0 2px; }
.gs-tab {
  padding: 9px 16px; border: 1px solid #D9CDBC; border-bottom: none; border-radius: 8px 8px 0 0;
  background: #f4f6f8; font-size: 13px; font-weight: 600; cursor: pointer; color: #555;
}
.gs-tab.active { background: #fff; color: #3A352C; box-shadow: 0 -2px 0 #3A352C inset; }
.gs-subpanel { display: none; }
.gs-subpanel.active { display: block; }
.gs-banner {
  max-width: 1500px; margin: 14px auto 0; padding: 12px 16px; background: #E6DAC5; border: 1px solid #DDD2C4;
  border-radius: 8px; font-size: 13px; color: #34495e; line-height: 1.6;
}
.gs-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; justify-content: flex-end; }
.gs-btn-muted { background: #eef1f5; color: #34495e; border: 1px solid #D9CDBC; }
.gs-btn-muted:hover { background: #e2e6eb; }

/* ---------- เรทราคา - ตั้งค่า ---------- */
.rt-section-title { background: #E6DAC5; padding: 12px 16px; font-weight: 700; color: #3A352C; font-size: 14px; border-radius: 8px 8px 0 0; }
.rt-body { padding: 18px 20px; }
.rt-row { display: flex; gap: 16px; margin-bottom: 8px; align-items: flex-start; }
.rt-row-label { min-width: 160px; font-weight: 700; font-size: 13.5px; color: #333; padding-top: 8px; }
.rt-checklist { flex: 1; }
.rt-check-item { padding: 10px 0; border-bottom: 1px solid #f0f0f0; }
.rt-check-item label { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.rt-check-hint { padding: 10px 0; color: var(--muted); font-size: 12.5px; }
.rt-holiday-hint { color: var(--muted); font-size: 12.5px; margin: 2px 0 10px; }
.rt-holiday-list { margin-top: 8px; }
.rt-holiday-row { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid #f5f5f5; font-size: 13.5px; }
.rt-holiday-del { background: none; border: none; color: #B8663A; cursor: pointer; font-size: 14px; padding: 0; }
.rt-add-btn { background: #C1653C; color: #fff; border: 0; border-radius: 8px; padding: 7px 14px; font-size: 13px; font-weight: 700; cursor: pointer; margin-top: 6px; }

/* ---------- ซีซั่น ---------- */
.sn-range-row { display: flex; gap: 8px; margin-bottom: 6px; align-items: center; }
.sn-range-row input[type="date"] { flex: 1; }
.sn-range-del { background: none; border: none; color: #B8663A; cursor: pointer; font-size: 14px; }
.sn-group { margin-bottom: 20px; border: 1px solid #e5e8ec; border-radius: 10px; overflow: hidden; }
.sn-group-header { background: #3A352C; color: #fff; padding: 10px 16px; }
.sn-group-header .sn-gh-name { font-weight: 700; font-size: 14px; }
.sn-group-header .sn-gh-sub { font-size: 11.5px; opacity: .75; margin-top: 2px; }
.sn-row { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-top: 1px solid #f0f0f0; font-size: 12.5px; flex-wrap: wrap; background: #fff; }
.sn-col-name { min-width: 90px; }
.sn-name-badge { background: #34495e; color: #fff; padding: 8px 12px; border-radius: 6px; font-weight: 700; text-align: center; font-size: 13px; }
.sn-col-dates { min-width: 150px; line-height: 1.5; }
.sn-col-wk { min-width: 60px; color: var(--muted); }
.sn-col-child, .sn-col-change { min-width: 55px; text-align: center; }
.sn-col-minstay { min-width: 130px; }
.sn-col-minstay .sn-ms-label { color: var(--muted); font-size: 10.5px; }
.sn-col-toggle { min-width: 30px; text-align: center; font-size: 15px; }
.sn-toggle-yes { color: #16a34a; }
.sn-toggle-no { color: #B8663A; }
.sn-edit-btn { background: none; border: none; cursor: pointer; font-size: 14px; margin-left: auto; }
.sn-check { width: 16px; }

/* ---------- ประเภทเรท ---------- */
.rty-item { border: 1px solid #e5e8ec; border-radius: 10px; margin-bottom: 12px; overflow: hidden; background: #fff; }
.rty-item.rty-inactive { opacity: .55; }
.rty-row { display: flex; gap: 14px; align-items: center; padding: 12px 16px; flex-wrap: wrap; font-size: 12.5px; }
.rty-name-badge { background: #34495e; color: #fff; padding: 8px 12px; border-radius: 6px; min-width: 160px; }
.rty-name-badge .rty-name-line { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.rty-name-badge .rty-name-line.rty-th { font-weight: 700; }
.rty-col { min-width: 90px; text-align: center; }
.rty-col .rty-col-label { color: var(--muted); font-size: 10.5px; display: block; }
.rty-toggle { min-width: 26px; text-align: center; font-size: 15px; }
.rty-toggle-yes { color: #16a34a; }
.rty-toggle-no { color: #B8663A; }
.rty-meta { padding: 0 16px 12px; font-size: 12px; color: #555; line-height: 1.6; border-top: 1px solid #f5f5f5; padding-top: 8px; margin: 0 16px 12px; }

/* ---------- เรทราคา > เรทราคา (กริดราคาแก้ไขได้) ---------- */
.rp-pills { display: flex; gap: 8px; flex-wrap: wrap; max-width: 1500px; margin: 14px auto 0; padding: 0 2px; }
.rp-pill { background: #E6DAC5; color: #3A352C; border: 1px solid #DDD2C4; border-radius: 999px; padding: 6px 14px; font-size: 12.5px; font-weight: 600; cursor: pointer; text-decoration: none; }
.rp-house-card { max-width: 1500px; margin: 16px auto 0; background: #fff; border: 1px solid #e5e8ec; border-radius: 10px; overflow: hidden; scroll-margin-top: 90px; }
.rp-house-head { display: flex; gap: 14px; padding: 14px 16px; border-bottom: 1px solid #f0f0f0; align-items: center; }
.rp-house-head img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; background: #eee; flex-shrink: 0; }
.rp-house-name { font-weight: 700; font-size: 14.5px; }
.rp-house-no { color: #B8663A; font-weight: 700; font-size: 12px; margin-left: 4px; }
.rp-house-meta { font-size: 12px; color: var(--muted); margin-top: 2px; line-height: 1.7; }
.rp-house-meta b { color: #16a34a; }
.rp-sgroup { border-top: 1px solid #f0f0f0; }
.rp-sgroup-header { background: #3A352C; color: #fff; padding: 8px 16px; }
.rp-sgroup-header .rp-sgh-name { font-weight: 700; font-size: 13px; }
.rp-sgroup-header .rp-sgh-sub { font-size: 11px; opacity: .75; }
.rp-grid { display: grid; font-size: 12.5px; }
.rp-cell { padding: 8px 10px; border-bottom: 1px solid #f0f0f0; border-right: 1px solid #f5f5f5; display: flex; align-items: center; justify-content: center; text-align: center; }
.rp-cell-label { justify-content: flex-start; text-align: left; font-weight: 600; color: #444; background: #fafbfc; }
.rp-cell-corner { background: #fafbfc; }
.rp-cell-head { flex-direction: column; font-weight: 700; background: #fafbfc; }
.rp-cell-head .rp-sub { font-weight: 400; color: var(--muted); font-size: 10.5px; }
.rp-cell-badge { grid-column: 1 / -1; background: #34495e; color: #fff; font-weight: 700; justify-content: flex-start; padding: 8px 12px; }
.rp-price-input { width: 100%; max-width: 90px; text-align: center; border: 1px solid transparent; border-radius: 6px; padding: 5px 4px; font-size: 12.5px; background: transparent; }
.rp-price-input:hover { border-color: #D9CDBC; }
.rp-price-input:focus { border-color: #C1653C; background: #fff; outline: none; }
.rp-price-input.rp-zero { color: #B8663A; }
.rp-empty-note { max-width: 1500px; margin: 14px auto 0; }

.room-row {
  background: var(--card); border-radius: 10px; padding: 12px 14px; box-shadow: 0 1px 4px rgba(0,0,0,.06);
  margin-bottom: 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  border-left: 4px solid #16a34a;
}
.room-row.dirty { border-left-color: #B8663A; }
.room-name { font-weight: 700; font-size: 13px; flex: 1; min-width: 160px; }
.room-tag { padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.room-tag.occupied { background: #fee2e2; color: #dc2626; }
.room-tag.vacant { background: #dcfce7; color: #16a34a; }
.room-tag.dirty { background: #fee2e2; color: #dc2626; }
.room-tag.cleanok { background: #dcfce7; color: #16a34a; }
.room-tag.dnd { background: #f3e8ff; color: #7c3aed; }
.room-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.btn-op.rm-clean { background: #16a34a; }
.btn-op.rm-dirty { background: #B8663A; }
.btn-op.rm-dnd { background: #7c3aed; }
.btn-op.rm-dnd.off { background: #fff; color: var(--muted); border: 1px solid #D9CDBC; }

.op-filterbtns { display: flex; gap: 8px; flex-wrap: wrap; }
.op-fbtn {
  padding: 7px 14px; border-radius: 8px; border: 1px solid #D9CDBC; background: #fff;
  font-size: 12px; cursor: pointer; font-weight: 700; color: var(--text);
}
.op-fbtn.active { background: #3A352C; color: #fff; border-color: transparent; }

/* ---------- ภาพรวม (overview dashboard) ---------- */
.ov-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; max-width: 1500px; margin: 0 auto 14px; }
.ov-row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; max-width: 1500px; margin: 0 auto 14px; }
.ov-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; max-width: 1500px; margin: 0 auto 14px; }
.ov-row4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; max-width: 1500px; margin: 0 auto 14px; }
@media (max-width: 1100px) {
  .ov-kpis, .ov-row3, .ov-row4 { grid-template-columns: repeat(2, 1fr); }
  .ov-row2 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .ov-kpis, .ov-row3, .ov-row4 { grid-template-columns: 1fr; }
}

.ov-kpi { background: var(--card); border-radius: 12px; padding: 16px; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.ov-kpi-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.ov-kpi-pct { font-size: 11.5px; font-weight: 700; padding: 3px 8px; border-radius: 20px; }
.ov-kpi-pct.up { background: #dcfce7; color: #16a34a; }
.ov-kpi-pct.down { background: #fee2e2; color: #dc2626; }
.ov-kpi-value { font-size: 23px; font-weight: 800; color: var(--text); }
.ov-kpi-label { font-size: 12px; color: var(--muted); margin-top: 2px; }
.ov-kpi-sub { font-size: 11px; color: var(--muted); margin-top: 6px; }

/* ---------- รายได้ (ภาพรวม) - รวมตั้งแต่เปิด + วันนี้/สัปดาห์นี้/เดือนนี้ + รายเดือน ---------- */
.ov-rev-summary {
  max-width: 1500px; margin: 0 auto 14px; display: flex; gap: 20px; flex-wrap: wrap;
  align-items: stretch;
}
.ov-rev-all {
  flex: 1 1 260px; background: #5B6B45; color: #fff;
  border-radius: 12px; padding: 20px; display: flex; flex-direction: column; justify-content: center;
}
.ov-rev-all-label { font-size: 12.5px; opacity: .85; font-weight: 600; }
.ov-rev-all-value { font-size: 30px; font-weight: 800; margin-top: 6px; }
.ov-rev-quick { flex: 2 1 420px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.ov-rev-quick-item {
  background: var(--card); border-radius: 12px; padding: 14px 16px; box-shadow: 0 1px 4px rgba(0,0,0,.08);
  display: flex; flex-direction: column; justify-content: center;
}
.ov-rev-quick-label { font-size: 12px; color: var(--muted); font-weight: 600; }
.ov-rev-quick-value { font-size: 21px; font-weight: 800; color: var(--text); margin-top: 4px; }
.ov-rev-quick-range { font-size: 10.5px; color: var(--muted); margin-top: 4px; }
@media (max-width: 720px) {
  .ov-rev-quick { grid-template-columns: 1fr; }
}

.ov-rev-monthly-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.ov-rev-monthly-head h2 { margin-bottom: 0; }
.ov-rev-year-select { min-width: 90px; }
.ov-rev-monthly-list { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.ov-rev-month-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ov-rev-month-label { width: 78px; flex-shrink: 0; font-size: 12.5px; color: var(--text); font-weight: 600; }
.ov-rev-month-bar-track { flex: 1; height: 18px; background: #eef1f3; border-radius: 6px; overflow: hidden; }
.ov-rev-month-bar-fill { display: block; height: 100%; width: 0; background: #C1653C; border-radius: 6px; transition: width .25s ease; }
.ov-rev-month-value { width: 100px; flex-shrink: 0; text-align: right; font-size: 12.5px; font-weight: 700; color: var(--text); }
.ov-rev-month-row.is-current .ov-rev-month-label { color: #C1653C; }
@media (max-width: 480px) {
  .ov-rev-month-row { row-gap: 6px; }
  .ov-rev-month-label { order: 1; width: auto; }
  .ov-rev-month-value { order: 2; width: auto; margin-left: auto; }
  .ov-rev-month-bar-track { order: 3; flex: 1 1 100%; }
}
.ov-rev-toggle-btn {
  display: block; width: 100%; margin-top: 12px; padding: 8px; background: none; border: none;
  border-top: 1px solid #eef1f3; font-family: inherit; font-size: 12.5px; font-weight: 600;
  color: #C1653C; cursor: pointer; text-align: center;
}
.ov-rev-toggle-btn:hover { color: #46592F; text-decoration: underline; }

.ov-donut-wrap { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.ov-donut-outer { width: 108px; height: 108px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ov-donut-inner { width: 68px; height: 68px; border-radius: 50%; background: var(--card); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 17px; color: var(--text); text-align: center; line-height: 1.15; }
.ov-donut-legend { flex: 1; font-size: 12px; min-width: 140px; }
.ov-donut-legend .ov-lg-row { display: flex; align-items: center; justify-content: space-between; padding: 3px 0; gap: 8px; }
.ov-donut-legend .ov-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-right: 6px; flex-shrink: 0; }
.ov-donut-legend .ov-lg-name { display: flex; align-items: center; color: var(--text); }
.ov-donut-legend .ov-lg-count { font-weight: 700; color: var(--text); }

.ov-guest-card { min-width: 0; }
.ov-guest-tabs { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.ov-guest-tab {
  padding: 6px 16px; border: 1px solid #D9CDBC; border-radius: 20px; background: #fff;
  font-family: inherit; font-size: 12.5px; font-weight: 600; color: #555; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.ov-guest-tab:hover { border-color: #C1653C; }
.ov-guest-tab.active { background: #3A352C; color: #fff; border-color: #3A352C; }
.ov-guest-value { font-size: 38px; font-weight: 800; color: var(--text); line-height: 1.1; }
.ov-guest-note { font-size: 11.5px; color: var(--muted); margin-top: 6px; }

.ov-chart-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.ov-chart-head h2 { margin-bottom: 0; }
.ov-chart-range { font-size: 11px; font-weight: 400; color: var(--muted); margin-left: 4px; }
.ov-chart-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.ov-chart-tab {
  padding: 4px 11px; border: 1px solid #D9CDBC; border-radius: 20px; background: #fff;
  font-family: inherit; font-size: 11px; font-weight: 600; color: #555; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.ov-chart-tab:hover { border-color: #C1653C; }
.ov-chart-tab.active { background: #C1653C; color: #fff; border-color: #C1653C; }
.ov-chart-total { margin-bottom: 8px; }
.ov-chart-total-label { font-size: 11px; color: var(--muted); font-weight: 600; }
.ov-chart-total-value { font-size: 20px; font-weight: 800; color: var(--text); }

.ov-list-row { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; border-bottom: 1px solid #f0f2f5; font-size: 12.5px; }
.ov-list-row:last-child { border-bottom: none; }
.ov-list-ref { font-weight: 700; color: #C1653C; }
.ov-list-house { font-weight: 600; }
.ov-list-guest { color: var(--muted); }

/* ---------- conflict banner ---------- */
.banner {
  background: var(--urgent); color: #fff; border-radius: 12px; padding: 12px 16px;
  margin: 14px 14px 0; max-width: 1972px; font-weight: 600; display: none;
  animation: blink 1.2s infinite;
}
@keyframes blink { 50% { opacity: .75; } }

/* ---------- calendar ---------- */
.cal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.cal-head .month-label { font-weight: 700; font-size: 18px; flex: 1; text-align: center; }
.cal-head button { border: 1px solid #D9CDBC; background: #fff; border-radius: 8px; padding: 6px 16px; cursor: pointer; font-size: 16px; }
.cal-scroll { overflow-x: auto; }
table.cal { border-collapse: collapse; width: 100%; min-width: 1650px; }
table.cal th, table.cal td { border: 1px solid #D9CDBC; text-align: center; }
table.cal th { font-size: 12.5px; padding: 6px 2px; min-width: 48px; line-height: 1.3; }
table.cal th .th-dow { display: block; font-size: 9.5px; font-weight: 600; opacity: .8; }
table.cal th .th-day { display: block; font-size: 13.5px; font-weight: 700; }
/* สีวันในหัวตาราง: เทา = วันธรรมดา (จ-พฤ), ฟ้า = ศุกร์/เสาร์/อาทิตย์, แดง = วันหยุดนักขัตฤกษ์ */
table.cal th.weekday { background: #eef1f2; color: #5d6d7e; }
table.cal th.weekend { background: #E6DAC5; color: #3A352C; }
table.cal th.holiday { background: #fdecea; color: #8F4A26; }
table.cal th.today { background: #f9e79f; color: #7d6608; }
table.cal td.house-name {
  text-align: left; padding: 10px 12px; font-size: 14.5px; font-weight: 600;
  white-space: nowrap; background: #fbfcfc; position: sticky; left: 0; z-index: 2;
  border-bottom: 2px solid #c3cbcb;
}
/* หัวตารางช่องมุมซ้ายบน ("บ้าน") ต้อง freeze ตามคอลัมน์ชื่อบ้านด้วย ไม่งั้นเลื่อนแนวนอนแล้วหัวคอลัมน์จะหลุดไม่ตรงแนว */
table.cal tr:first-child th:first-child {
  position: sticky; left: 0; z-index: 3; background: #fff;
}
.house-inactive-badge {
  display: inline-block; font-size: 10px; font-weight: 700; color: #8a7a8f;
  background: #f1eef2; border-radius: 10px; padding: 1px 8px; margin-left: 4px; vertical-align: middle;
}
table.cal td.day {
  height: 62px; padding: 4px 3px; position: relative; cursor: pointer;
  border-bottom: 2px solid #c3cbcb; vertical-align: top;
}
/* เส้นคั่นแถวให้ชัดขึ้น + สลับสีพื้นแถวช่วยไล่สายตาตามบ้านแต่ละหลัง */
table.cal tr:nth-child(even) td.house-name,
table.cal tr:nth-child(even) td.day { background: #fafbfb; }
table.cal td.day:hover { background: #f1f6fb; }
table.cal td.day.today { background: #fef9e7; }
.cal-price {
  font-size: 11px; font-weight: 700; color: #5d6d7e; line-height: 14px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: #eef1f2; border-radius: 3px; padding: 2px 3px; margin: 0 auto 2px; display: block;
}
.chip {
  display: flex; align-items: center; height: 19px; border-radius: 4px; font-size: 10.5px; color: #fff;
  line-height: 19px; overflow: hidden; cursor: pointer; margin-bottom: 1px; position: relative; padding-left: 6px;
  white-space: nowrap; text-overflow: ellipsis;
}
.chip.roomscope { background: var(--roomscope); }
.chip.direct { background: var(--direct); }
.chip.agoda { background: var(--legacy); }
.chip.locked { background: #c8a96e; }
.chip.disabled { background: #8a7a8f; }
.chip.pending { outline: 2px dashed #E0B24E; outline-offset: -2px; }
/* สถานะจ่ายเงิน: แดง = ยังไม่จ่าย, ไล่สี = แนบสลิปแล้วรอตรวจ, เขียว = จ่ายแล้ว
   มี tab สีเล็กๆ ติดขอบซ้ายให้เห็นเด่นชัดแม้ในตารางเล็กๆ */
.chip.pay-paid { background: var(--direct); }
.chip.pay-review { background: linear-gradient(90deg, #E0B24E, #CC9636); }
.chip.pay-unpaid { background: #B8663A; }
.chip.pay-paid::before, .chip.pay-review::before, .chip.pay-unpaid::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: rgba(0,0,0,.28); border-radius: 4px 0 0 4px;
}

/* ---------- ปฏิทินบนมือถือ: ย่อทุกอย่างลง (คอลัมน์ชื่อบ้าน + ช่องวันต่อวัน) ให้เห็นภาพรวมได้มากขึ้นต่อหน้าจอ ---------- */
@media (max-width: 768px) {
  /* table-layout:fixed จำเป็น เพราะ auto layout เดิมเมิน max-width บน td แล้วขยายคอลัมน์ชื่อบ้านตามความยาวข้อความอยู่ดี */
  table.cal { min-width: 1500px; table-layout: fixed; }
  table.cal th { width: 46px; min-width: 46px; padding: 3px 1px; font-size: 10px; }
  table.cal th .th-dow { font-size: 8px; }
  table.cal th .th-day { font-size: 11.5px; }
  table.cal tr:first-child th:first-child { width: 62px; min-width: 62px; }
  table.cal td.house-name {
    width: 62px; padding: 6px 4px; font-size: 11px; white-space: normal;
    overflow-wrap: break-word; line-height: 1.2;
  }
  table.cal td.day { height: 42px; padding: 2px; }
  .cal-price { font-size: 9px; letter-spacing: -.2px; padding: 1px 1px; line-height: 12px; margin-bottom: 1px; }
  .chip { height: 15px; font-size: 8.5px; line-height: 15px; padding-left: 4px; }
  .cal-head .month-label { font-size: 15px; }
  .cal-head button { padding: 5px 12px; font-size: 14px; }
}

/* ---------- เมนูคลิกช่องว่างในตาราง ---------- */
.cell-menu {
  position: absolute; display: none; z-index: 70; width: 250px;
  background: #fff; border-radius: 12px; box-shadow: 0 8px 28px rgba(0,0,0,.22);
  border: 1px solid #e5e8e8; overflow: hidden; padding: 6px;
}
.cell-menu.open { display: block; }
.cell-menu-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 8px; border-radius: 8px;
  cursor: pointer; font-size: 13px;
}
.cell-menu-item:hover { background: #f4f6f8; }
.cell-menu-item .cmi-ic { font-size: 18px; width: 22px; text-align: center; flex-shrink: 0; }
.cell-menu-item .cmi-sub { color: var(--muted); font-size: 11.5px; }
.btn-confirm { background: #5B6B45; color: #fff; }
.pending-item.hold-item { border-color: #D9CDBC; background: #E6DAC5; }
.pending-item .src.direct { color: var(--direct); }
td.day.conflict { background: #fadbd8; box-shadow: inset 0 0 0 2px var(--urgent); }
.legend { display: flex; gap: 14px; margin-top: 10px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.legend .sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-right: 4px; }

/* ---------- pending ---------- */
.pending-item {
  border: 1px solid #f5cba7; background: #fef5e7; border-radius: 10px;
  padding: 10px; margin-bottom: 8px; font-size: 13px;
}
.pending-item .src { font-weight: 700; }
.pending-item .src.roomscope { color: var(--roomscope); }
.pending-item .src.agoda { color: var(--legacy); }
.pending-item .actions { margin-top: 8px; display: flex; gap: 6px; }
.pending-item button {
  border: 0; border-radius: 7px; padding: 6px 10px; cursor: pointer; font-size: 12px; font-weight: 600;
}
.btn-done { background: var(--green); color: #fff; }
.btn-cancel { background: #ecf0f1; color: var(--muted); }
.empty { color: var(--muted); font-size: 13px; text-align: center; padding: 12px 0; }
.bk-note { color: #7d6608; font-size: 12px; background: #fef9e7; border-radius: 6px; padding: 1px 6px; display: inline-block; margin-top: 3px; }

/* ---------- LINE feed ---------- */
.line-head { display: flex; align-items: center; gap: 8px; }
.line-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.noti {
  border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; font-size: 13.5px; line-height: 1.5;
  background: #eafaf1; box-shadow: 0 1px 3px rgba(0,0,0,.04);
  overflow-wrap: anywhere; word-break: break-word;
}
.noti.warn { background: #fef9e7; }
.noti.urgent { background: #fdedec; font-weight: 600; }
.noti .time { display: block; color: var(--muted); font-size: 11px; margin-top: 4px; font-weight: 400; }
.noti-amount {
  margin-top: 8px; font-size: 22px; font-weight: 800; color: #3A4A2E;
  background: #eafaf1; border-radius: 8px; padding: 6px 10px; display: inline-block;
}
.noti-actions { margin-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; }
.noti-confirm-btn, .noti-view-slip-btn {
  border: 0; border-radius: 8px; padding: 7px 14px; cursor: pointer; font-size: 12.5px; font-weight: 700;
}
.noti-confirm-btn { background: #5B6B45; color: #fff; }
.noti-confirm-btn:disabled { background: #D9CDBC; cursor: default; }
.noti-done-tag {
  display: inline-flex; align-items: center; font-size: 12.5px; font-weight: 700; color: #7d8a8a;
  background: #eef1f1; border-radius: 8px; padding: 7px 14px;
}
.noti-view-slip-btn { background: #fff; color: #3A352C; box-shadow: inset 0 0 0 1.5px #DDD2C4; }
.noti-view-slip-btn:disabled { color: #8D7F72; box-shadow: inset 0 0 0 1.5px #D9CDBC; cursor: default; }

/* ---------- simulate ---------- */
.sim-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.sim-buttons button {
  flex: 1; border: 0; border-radius: 10px; padding: 10px; color: #fff;
  cursor: pointer; font-size: 13px; font-weight: 600; min-width: 130px;
}
.sim-roomscope { background: var(--roomscope); }
.sim-note { font-size: 11.5px; color: var(--muted); margin-top: 8px; }

/* ---------- modal ---------- */
.modal-bg {
  position: fixed; inset: 0; background: rgba(0,0,0,.45);
  display: none; align-items: center; justify-content: center; z-index: 950; /* ต้องอยู่เหนือแผงแจ้งเตือน (z-index 900) กันเปิดจากในแผงแล้วโมดัลไปซ่อนอยู่หลังแผง */
}
.modal-bg.open { display: flex; }
/* หน้าต่างดูสลิปเปิดซ้อนจากในหน้าต่างรายละเอียดการจองได้ (เช่น กด "ดูสลิป" ในป็อปอัพรายละเอียด) ต้องอยู่บนสุดเสมอ ไม่งั้นไปโผล่ข้างหลัง เพราะ DOM มาก่อนหน้าต่างอื่นๆ ที่ z-index เท่ากัน */
#slipViewModalBg { z-index: 960; }
.modal {
  background: #fff; border-radius: 14px; padding: 20px; width: 360px; max-width: 92vw;
  max-height: 86vh; overflow-y: auto; -webkit-overflow-scrolling: touch;
}
.modal h3 { margin-bottom: 12px; font-size: 16px; }
.modal .row { margin-bottom: 10px; font-size: 13.5px; }
.modal label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 3px; }
.modal select, .modal input {
  width: 100%; padding: 8px; border: 1px solid #D9CDBC; border-radius: 8px; font-size: 14px;
}
.modal .modal-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.modal .modal-actions button {
  flex: 1; padding: 10px; border: 0; border-radius: 9px; cursor: pointer; font-weight: 600; min-width: 120px;
}
.modal .modal-actions button:disabled { opacity: .55; cursor: default; }
.btn-primary { background: #5A3820; color: #fff; }
.btn-ghost { background: #ecf0f1; }
/* หน้าจองลูกค้า (book.html) เท่านั้น: ใช้เขียวธรรมชาติ #C1653C แทนเขียวเข้มเดิม ให้เข้าธีมเดียวกับปุ่มอื่นๆ ในหน้านี้ (ไม่กระทบปุ่ม "บันทึก" ในหลังบ้าน) */
.book-body .btn-primary { background: #6b8f5a; }

/* ---------- popup รายละเอียดการจอง (คลิกจากปฏิทิน) ---------- */
.bkd-status-bar {
  display: flex; align-items: center; justify-content: space-between;
  border-radius: 10px; padding: 10px 12px; margin: 6px 0 12px; font-weight: 700; font-size: 13.5px;
}
.bkd-status-bar.paid { background: #eafaf1; color: #5B6B45; }
.bkd-status-bar.review { background: #fdf2e3; color: #b9770e; }
.bkd-status-bar.unpaid { background: #fdedec; color: #8F4A26; }
.bkd-status-bar.locked { background: #f6f1e7; color: #8a6d1f; }
.bkd-status-bar.disabled { background: #E6DAC5; color: #5A3820; }
.bkd-ref { font-weight: 700; opacity: .8; }
.bkd-guest { margin-bottom: 12px; }
.bkd-name { font-size: 17px; font-weight: 700; color: #3A352C; }
.bkd-phone { font-size: 13px; color: var(--muted); margin-top: 2px; }
.bkd-rows { border-top: 1px solid #eee; padding-top: 8px; }
.bkd-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; font-size: 13.5px; padding: 6px 0; border-bottom: 1px dashed #f1eee9; }
.bkd-row:last-child { border-bottom: 0; }
.bkd-row span { color: var(--muted); white-space: nowrap; }
.bkd-row b { text-align: right; font-weight: 600; }
.bkd-row.due b { color: #8F4A26; }
.bkd-edit-link {
  display: block; width: 100%; text-align: center; margin-top: 10px; padding: 9px;
  background: transparent; border: 1.5px dashed #D9CDBC; border-radius: 9px;
  color: #6b5436; font-weight: 600; font-size: 13px; cursor: pointer;
}
.bkd-edit-link:hover { background: #faf7f2; border-color: #c8a96e; }
.bkd-footer-actions { display: flex; gap: 8px; }
.bkd-footer-actions .bkd-edit-link { margin-top: 10px; }
.modal .err { color: var(--urgent); font-size: 12.5px; min-height: 16px; margin-top: 4px; }
.bkd-edit-danger { border-top: 1px solid #eee; margin-top: 14px; padding-top: 12px; text-align: center; }
.bkd-cancel-booking-btn {
  background: transparent; border: 0; color: #8F4A26; font-size: 12.5px;
  font-weight: 600; cursor: pointer; padding: 6px 10px;
}
.bkd-cancel-booking-btn:hover { text-decoration: underline; }
/* หลายบ้านภายใต้เลขจองเดียวกัน - แสดงเป็นการ์ดย่อยต่อบ้าน แทนแถวข้อมูลเดี่ยว */
.bkd-house-block { border: 1px solid #eee; border-radius: 10px; padding: 10px 12px; margin: 8px 0; background: #fbfbfa; }
.bkd-house-block .bkh-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 4px; }
.bkd-house-block .bkh-name { font-weight: 700; font-size: 14px; color: #3A352C; }
.bkd-house-block .bkh-edit { background: none; border: 0; color: #8a7660; font-size: 12px; cursor: pointer; font-weight: 600; }
.bkd-house-block .bkh-edit:hover { text-decoration: underline; }
.bkd-house-block .bkh-row { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); padding: 2px 0; }
.bkd-house-block .bkh-row b { color: #3A352C; font-weight: 600; }
.bkd-house-block .bkh-actions { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.bkd-house-block .bkh-actions button { flex: 1; min-width: 100px; padding: 7px; font-size: 12.5px; border-radius: 8px; border: 0; cursor: pointer; font-weight: 600; }
.bkd-house-block .bkh-actions button.bkh-primary { background: #5A3820; color: #fff; }
.bkd-house-block .bkh-actions button.bkh-ghost { background: #ecf0f1; color: #333; }
.bkd-house-block .bkh-actions button:disabled { opacity: .55; cursor: default; }
.bkd-grand-total { display: flex; justify-content: space-between; font-weight: 700; font-size: 14.5px; color: #3A4A2E; padding: 8px 0; border-top: 1px dashed #d0e6d8; margin-top: 4px; }
/* ---------- public booking page ---------- */
html, body.book-body { overflow-x: hidden; }
.book-body {
  background-color: #F3EEE6;
  /* washi paper texture, layered CSS gradients only (no image files):
     1) soft top-light/bottom-shadow sheen
     2) large soft tonal blobs (uneven "sheet" variation)
     3) two criss-crossed repeating-linear-gradients = pseudo-random thin fibers (<3% opacity)
     4) fine dot grain */
  background-image:
    linear-gradient(180deg, rgba(255,255,255,.25), rgba(0,0,0,.02)),
    radial-gradient(ellipse 60% 50% at 15% 20%, rgba(139,111,84,.05), transparent 70%),
    radial-gradient(ellipse 55% 45% at 85% 15%, rgba(139,111,84,.04), transparent 70%),
    radial-gradient(ellipse 65% 55% at 30% 88%, rgba(139,111,84,.045), transparent 70%),
    radial-gradient(ellipse 50% 60% at 82% 82%, rgba(139,111,84,.035), transparent 70%),
    repeating-linear-gradient(23deg, rgba(139,111,84,.02) 0px, rgba(139,111,84,.02) 1px, transparent 1px, transparent 5px),
    repeating-linear-gradient(-61deg, rgba(139,111,84,.018) 0px, rgba(139,111,84,.018) 1px, transparent 1px, transparent 6px),
    radial-gradient(rgba(139,111,84,.025) 1px, transparent 1px);
  background-size:
    100% 100%, 100% 100%, 100% 100%, 100% 100%, 100% 100%,
    140px 140px, 160px 160px, 18px 18px;
  background-repeat:
    no-repeat, no-repeat, no-repeat, no-repeat, no-repeat,
    repeat, repeat, repeat;
  min-height: 100vh; font-family: 'LINE Seed Sans TH', 'Prompt', 'Segoe UI', sans-serif; max-width: 100vw;
}
.book-wrap { max-width: 560px; margin: 0 auto; padding: 14px 14px 40px; }
@media (max-width: 640px) {
  .book-wrap { padding: 10px 6px 40px; }
  .book-card { padding: 14px 10px; border-radius: 18px; }
  .house-list { gap: 8px; }
}
.book-topbar {
  position: sticky; top: 0; z-index: 20; background: #f1e8dc;
  color: #6b5436; display: flex; align-items: center; gap: 8px; padding: 12px 14px;
  border-bottom: 1px solid #ddd0b8; flex-wrap: wrap; row-gap: 6px;
}
.top-logo {
  background: transparent; color: #6b5436; border: 0; cursor: pointer;
  font-family: inherit; font-size: 24px; font-weight: 700; padding: 2px 4px;
  display: flex; align-items: center; gap: 8px; min-width: 0; flex-shrink: 1;
}
.top-logo .logo-text { display: inline-flex; align-items: baseline; gap: 6px; }
.top-logo .logo-text span { font-weight: 400; font-size: 18px; opacity: .9; }
.top-logo-img { height: 56px; max-height: 56px; width: auto; max-width: 46vw; display: block; }
#topLogoText { display: inline-flex; align-items: center; gap: 9px; min-width: 0; }
.logo-emblem {
  display: inline-block; width: 56px; height: 56px; flex-shrink: 0;
  background: url('../logo/logo-icon-bold.svg') center / contain no-repeat;
}
.top-contact { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; row-gap: 6px; flex-shrink: 0; }
.top-contact a.tc-icon {
  position: relative; display: flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; flex-shrink: 0; text-decoration: none;
  background: rgba(107,84,54,.1); border: 1px solid #d8c9ad; border-radius: 50%;
}
.top-contact a.tc-icon img { width: 27px; height: 27px; display: block; }
.top-contact a.tc-icon:hover { background: rgba(107,84,54,.18); }
.top-contact a.tc-icon::after {
  content: attr(data-tip); position: absolute; top: calc(100% + 8px); right: 0;
  background: #3a2f22; color: #fff; font-size: 12px; font-weight: 600;
  padding: 5px 10px; border-radius: 7px; white-space: nowrap;
  opacity: 0; pointer-events: none; transform: translateY(-4px);
  transition: opacity .15s, transform .15s; z-index: 30;
}
.top-contact a.tc-icon:hover::after { opacity: 1; transform: translateY(0); }
.top-contact a.tc-icon .tc-text { display: none; }
/* จอกว้าง (เว็บ/แท็บเล็ต) มีที่พอ โชว์เบอร์โทร/LINE ID เป็นตัวหนังสือข้างไอคอนเลย ไม่ต้องรอ hover */
@media (min-width: 700px) {
  .top-contact a.tc-icon {
    width: auto; height: auto; border-radius: 20px; padding: 8px 14px 8px 10px; gap: 7px;
  }
  .top-contact a.tc-icon .tc-text {
    display: inline-block; font-size: 13px; font-weight: 600; color: #6b5436; white-space: nowrap;
  }
  .top-contact a.tc-icon::after { display: none; }
}
.checkout-label { margin-top: 8px; font-size: 13px; color: var(--direct); font-weight: 600; }
/* iOS: กันช่องวันที่/ตัวเลือก ปีนกัน + กัน zoom ตอนแตะ (ต้อง >=16px)
   + บังคับสีตัวอักษรเอง กัน iOS Safari ทาสีน้ำเงินให้ input[type=date]/ปุ่มเองอัตโนมัติ */
.book-dates input, .book-dates select, .book-card .row input, .book-card .row textarea {
  -webkit-appearance: none; appearance: none; font-size: 16px;
  height: 46px; line-height: normal; box-sizing: border-box; background: #fff;
  color: #3f2f22;
}
.book-card .row textarea { height: auto; }
.book-dates select {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23117864'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
  background-repeat: no-repeat; background-position: right 8px center; padding-right: 30px;
}
.book-hero-img {
  background: linear-gradient(120deg, #145a32, #1e8449 55%, #f1c40f);
  background-size: cover; background-position: center; min-height: 190px;
  display: flex; align-items: flex-end;
}
.hero-overlay {
  width: 100%; padding: 46px 18px 16px; color: #fff; text-align: center;
  background: linear-gradient(transparent, rgba(0,0,0,.55));
  text-shadow: 0 1px 4px rgba(0,0,0,.5);
}
.hero-overlay h1 { font-size: 28px; font-weight: 700; }
.hero-overlay h1 span { font-weight: 400; font-size: 20px; opacity: .9; }
.hero-overlay p { font-size: 14px; margin-top: 2px; color: rgba(255,255,255,.9); }
.hero-badges { margin-top: 8px; display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.hero-badges span {
  background: rgba(255,255,255,.18); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.35); border-radius: 20px;
  padding: 3px 10px; font-size: 11.5px;
}
.step-no {
  display: inline-flex; width: 22px; height: 22px; border-radius: 50%;
  background: #8B6F54; color: #fff; font-size: 13px;
  align-items: center; justify-content: center; margin-right: 6px;
}
.book-card {
  margin-bottom: 14px;
  background: #FBF8F4; border: 1px solid #E2D8CC; border-radius: 28px; padding: 28px;
}
.book-dates { display: flex; gap: 10px; }
.book-dates > div { flex: 1; }
.book-dates label, .book-card .row label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 3px; }
.book-dates input, .book-dates select, .book-card .row input {
  width: 100%; padding: 10px; border: 1px solid #D9CDBC; border-radius: 9px;
}
.book-card .row { margin-bottom: 10px; }
.house-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.house-btn {
  -webkit-appearance: none; appearance: none;
  border: 1px solid #DDD2C4; background: #FBF8F4; border-radius: 24px; padding: 0;
  box-shadow: 0 8px 24px rgba(139,111,84,.08);
  text-align: left; cursor: pointer; display: flex; flex-direction: column;
  overflow: hidden; font-family: inherit; color: #3f2f22; transition: transform .12s, box-shadow .12s;
}
.house-btn .himg-wrap { position: relative; display: block; }
.house-btn .himg { width: 100%; height: 130px; object-fit: cover; display: block; background: #d5f5e3; }
.house-btn .himg-ph {
  width: 100%; height: 130px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #d5f5e3, #fcf3cf); font-size: 38px;
}
.house-btn .hbody { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 2px; }
.house-btn .hname { font-weight: 600; font-size: 13.5px; }
.house-btn .hcap { font-size: 11.5px; color: var(--muted); }
.house-btn .hstat { font-size: 12.5px; color: var(--direct); font-weight: 600; }
.house-btn.full { border-color: #e5e8e8; cursor: not-allowed; }
.house-btn.full .himg, .house-btn.full .himg-ph { filter: grayscale(1); opacity: .6; }
.house-btn.full .hstat { color: #cb4335; }
.avail-badge {
  position: absolute; top: 6px; left: 6px; z-index: 2;
  background: linear-gradient(90deg, #5b8c4a, #8fc76e); color: #fff;
  font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 12px;
  box-shadow: 0 2px 6px rgba(60,100,40,.3);
  animation: availPulse 1.6s ease-in-out infinite;
}
@keyframes availPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(143,199,110,.6); transform: scale(1); }
  50% { box-shadow: 0 0 0 7px rgba(143,199,110,0); transform: scale(1.08); }
}
.full-badge {
  position: absolute; top: 6px; left: 6px; z-index: 2;
  background: #B58B82; color: #fff;
  font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 12px;
}
.house-btn .hprice { font-size: 13.5px; color: #2c3e50; font-weight: 700; }
.house-btn .book-cta {
  display: inline-block; margin-top: 4px; background: #8B6F54; color: #fff;
  font-size: 12.5px; font-weight: 600; padding: 5px 0; border-radius: 999px; text-align: center;
  transition: background .15s;
}
.house-btn.full .book-cta { display: none; }
.house-btn .hstat-full { font-size: 12.5px; color: #cb4335; font-weight: 600; }
/* ---------- เลือกได้หลายบ้าน: วงกลม checkmark มุมขวาบน + เส้นขอบ/พื้นหลังเน้นตอนเลือก ---------- */
.house-check {
  position: absolute; top: 6px; right: 6px; z-index: 2; width: 24px; height: 24px; border-radius: 50%;
  background: rgba(255,255,255,.9); border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.25);
  display: flex; align-items: center; justify-content: center; font-size: 13px; color: transparent;
  transition: background .15s, color .15s;
}
/* เลือกแล้ว = เขียวธรรมชาติเดียวกับปุ่ม "นำทางไปที่พัก" (#6b8f5a) ให้กลมกลืนกับโทนสีเว็บ */
.house-btn.selected { border-color: #6b8f5a; border-width: 3px; box-shadow: 0 10px 26px rgba(107,143,90,.3); }
.house-btn.selected .hbody { background: #EBF1E5; }
.house-btn.selected .house-check { background: #6b8f5a; color: #fff; border-color: #6b8f5a; }
.house-btn.selected .book-cta { background: #6b8f5a; font-weight: 700; }
.pick-bar {
  position: sticky; bottom: 0; left: 0; right: 0; margin: 14px -28px -28px; padding: 14px 28px;
  background: #FBF8F4; border-top: 3px solid #6b8f5a; border-radius: 0 0 28px 28px;
  display: none; align-items: center; justify-content: space-between; gap: 12px;
  box-shadow: 0 -6px 18px rgba(0,0,0,.1);
}
.pick-bar.show { display: flex; }
.pick-bar-info { font-size: 13.5px; color: #3f2f22; }
.pick-bar-info b { display: block; font-size: 19px; color: #6b8f5a; }
.pick-bar button {
  background: #6b8f5a; color: #fff; border: 0; padding: 14px 26px; border-radius: 10px;
  font-weight: 700; font-size: 16px; cursor: pointer; white-space: nowrap; flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(107,143,90,.35);
}
.pick-bar button:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
@media (max-width: 640px) {
  .pick-bar { margin: 14px -10px -14px; padding: 12px 14px; border-radius: 0 0 18px 18px; }
  .pick-bar button { padding: 12px 18px; font-size: 15px; }
}
.contact-btn, .map-btn {
  display: block; text-align: center; text-decoration: none; font-weight: 700;
  border-radius: 999px; padding: 12px; font-size: 14.5px; margin-top: 9px;
  border: none;
}
.map-btn { background: #6b8f5a; color: #fff; }
.contact-btn.call { background: #6b8f5a; color: #fff; }
.contact-btn.line { background: #8B6F54; color: #fff; }
.pay-qr { display: block; max-width: 220px; width: 100%; margin: 10px auto; border-radius: 10px; border: 1px solid #e5e8e8; }
.book-summary {
  background: #eafaf1; border: 1px solid #a9dfbf; border-radius: 10px;
  padding: 10px 12px; font-size: 14px; margin-bottom: 12px;
  display: flex; gap: 10px; align-items: center;
}
.book-summary { flex-direction: column; align-items: stretch; }
.book-summary .sum-top { display: flex; gap: 10px; align-items: center; }
.book-summary .sum-img { width: 80px; height: 60px; object-fit: cover; border-radius: 8px; flex-shrink: 0; cursor: zoom-in; }
.sum-thumbs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.sum-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 6px; cursor: zoom-in; border: 1px solid #cfe8da; }
.sum-hint { font-size: 11.5px; color: var(--muted); margin-top: 6px; }
/* ---------- สรุปหลายบ้านในหน้าสรุป (step 3) เมื่อจองมากกว่า 1 หลัง ---------- */
.sum-house { padding-bottom: 10px; border-bottom: 1px dashed #cfe8da; margin-bottom: 10px; }
.sum-house:last-of-type { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.sum-grand {
  display: flex; justify-content: space-between; align-items: baseline; margin-top: 8px;
  padding-top: 8px; border-top: 1px solid #a9dfbf; font-size: 14px; font-weight: 600;
}
.sum-grand b { font-size: 17px; }
/* ---------- บริการเสริม (หน้าจองลูกค้า) ---------- */
.addon-section { margin-bottom: 14px; }
.addon-section-title { font-size: 14.5px; margin-bottom: 8px; color: #2c3e50; }
.addon-list { display: flex; flex-direction: column; gap: 8px; }
.addon-cat-title { font-size: 12px; font-weight: 700; color: var(--muted); margin: 6px 0 4px; text-transform: uppercase; letter-spacing: .3px; }
.addon-item {
  background: #fbfcfc; border: 1px solid #e5e8e8; border-radius: 10px;
  padding: 10px 12px; margin-bottom: 6px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
}
.addon-info { flex: 1; min-width: 140px; }
.addon-name { font-size: 13.5px; font-weight: 600; color: #2c3e50; }
.addon-type { font-weight: 400; color: var(--muted); font-size: 12px; }
.addon-price { font-size: 12.5px; color: var(--muted); margin: 3px 0 0; }
.addon-max-hint { font-size: 11.5px; color: #af601a; margin-top: 2px; }
.addon-stepper { display: flex; align-items: center; gap: 12px; flex-shrink: 0; margin-left: auto; }
.addon-btn {
  width: 30px; height: 30px; border-radius: 8px; border: 1px solid #cfd8dc;
  background: #fff; font-size: 16px; cursor: pointer; line-height: 1;
}
.addon-btn:active { background: #eafaf1; }
.addon-qty { min-width: 20px; text-align: center; font-weight: 700; font-size: 14px; }
.addon-ac-row { display: flex; gap: 16px; flex-wrap: wrap; flex-shrink: 0; margin-left: auto; }
.addon-ac-item { display: flex; align-items: center; gap: 8px; }
.addon-ac-label { font-size: 12.5px; color: #4d5656; }
/* หมายเหตุ: 2 rule ด้านล่างยังใช้อยู่ในหน้า dashboard (admin เพิ่มบุ๊คกิ้งเอง) ที่ยังเป็น input ตัวเลขแบบเดิม ไม่ได้เปลี่ยนเป็น stepper - อย่าลบ */
.addon-ac-row label { font-size: 12.5px; color: #4d5656; display: flex; align-items: center; gap: 6px; }
.addon-ac-row input {
  width: 54px; padding: 6px 8px; border: 1px solid #D9CDBC; border-radius: 8px;
  font-size: 14px; -webkit-appearance: none; appearance: none;
}
.addon-choices {
  width: 100%; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px;
  padding-top: 8px; border-top: 1px dashed #e5e8e8;
}
.addon-choice-group { flex: 1; min-width: 130px; }
.addon-choice-group label { font-size: 11.5px; color: var(--muted); display: block; margin-bottom: 3px; }
.addon-select-wrap { position: relative; }
.addon-choice-group select {
  width: 100%; padding: 6px 28px 6px 8px; border: 1px solid #D9CDBC; border-radius: 8px;
  font-size: 13px; -webkit-appearance: none; appearance: none; background: #fff; cursor: pointer;
}
.addon-choice-group select:hover { border-color: var(--accent, #8B6F54); }
.addon-select-wrap::after {
  content: '▾'; position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  font-size: 11px; color: var(--muted); pointer-events: none;
}
.addon-total-row {
  font-size: 13.5px; color: #145a32; margin-top: 4px;
  padding-top: 8px; border-top: 1px dashed #d0e6d8;
}
.atr-line { display: flex; justify-content: space-between; padding: 2px 0; }
.atr-grand {
  margin-top: 4px; padding-top: 6px; border-top: 1px solid #d0e6d8;
  font-size: 15px; font-weight: 700;
}
.policy-box {
  background: #fbfcfc; border: 1px solid #e5e8e8; border-radius: 10px;
  padding: 10px 12px; margin: 4px 0 10px; font-size: 13px;
}
.policy-box summary { cursor: pointer; font-size: 13px; color: #6e5b00; }
.policy-box ul { margin: 8px 0 2px 18px; line-height: 1.8; color: #4d5656; }
.accept-row {
  display: flex; gap: 8px; align-items: flex-start; font-size: 13px;
  margin-bottom: 8px; cursor: pointer; color: #2c3e50;
}
.accept-row input { margin-top: 3px; width: 16px; height: 16px; }
.amenity-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.amenity-grid span {
  background: #f8fbf9; border: 1px solid #e8f3ec; border-radius: 9px;
  padding: 8px 10px; font-size: 12.5px; color: #34495e;
}
.poi-list { list-style: none; margin: 4px 0 12px; }
.poi-list li {
  display: flex; justify-content: space-between; font-size: 12.5px; color: #4d5656;
  padding: 5px 2px; border-bottom: 1px dashed #eaeded;
}
.poi-list li span { color: var(--muted); white-space: nowrap; margin-left: 10px; }
.info-card p { font-size: 13px; line-height: 1.8; margin-bottom: 10px; color: #4d5656; }
.info-card .info-thanks { color: #145a32; }
.fb-link { color: #3f2f22; font-weight: 600; text-decoration: none; }
.fb-link:hover { text-decoration: underline; }
/* ---------- preview "เที่ยวรอบนาสะปัน" ในหน้าจองลูกค้า (การ์ดตัวอย่าง 4 ที่ + ปุ่มดูเพิ่มเติม) ---------- */
.nearby-preview { margin-bottom: 14px; }
.nearby-preview-title { font-size: 15px; font-weight: 700; color: #3f2f22; margin-bottom: 2px; }
.nearby-preview-title span { display: block; font-size: 11px; font-weight: 500; color: var(--muted); margin-top: 1px; }
.nearby-preview-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0 10px; }
.np-card {
  display: block; text-decoration: none; background: #fff; border: 1px solid #e5ded1;
  border-radius: 12px; overflow: hidden; transition: transform .15s, box-shadow .15s;
}
.np-card:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.08); }
.np-img-wrap {
  position: relative; width: 100%; aspect-ratio: 4 / 3; overflow: hidden;
  background: linear-gradient(135deg, #EFE8DA, #E1D6C2);
}
.np-img-wrap img { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; display: block; }
.np-img-ph {
  position: absolute; inset: 0; z-index: 0; display: flex; align-items: center; justify-content: center;
  font-size: 22px; opacity: .5;
}
.np-body { padding: 7px 9px 9px; }
.np-name { font-size: 12.5px; font-weight: 700; color: #3f2f22; line-height: 1.35; }
.np-meta { font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.np-more-btn {
  display: block; text-align: center; text-decoration: none; font-weight: 700; font-size: 13.5px;
  background: #6b8f5a; color: #fff; border-radius: 999px; padding: 10px;
}
/* ---------- แถบไอคอน social (Facebook / Instagram / TikTok) ในหน้าจองลูกค้า ---------- */
.social-row-label { font-size: 12.5px !important; color: #8a7660 !important; margin-bottom: 6px !important; }
.social-row { display: flex; gap: 8px; flex-wrap: wrap; }
.social-btn {
  display: inline-flex; align-items: center; gap: 7px; text-decoration: none;
  background: #fff; border: 1.5px solid #e5ded1; border-radius: 999px;
  padding: 9px 16px; font-size: 13px; font-weight: 700; color: #3f2f22;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.social-btn img { width: 16px; height: 16px; display: block; }
.social-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(0,0,0,.1); }
.social-btn.sb-fb:hover { border-color: #1877F2; }
.social-btn.sb-ig:hover { border-color: #E1306C; }
.social-btn.sb-tt:hover { border-color: #111; }
/* ---------- แถบสลับหน้า จองที่พัก / รูปที่พัก / เที่ยวรอบนาสะปัน ---------- */
.page-tabs-wrap { background: #f1e8dc; border-bottom: 1px solid #ddd0b8; padding: 10px 14px 12px; }
.page-tabs-label {
  text-align: center; font-size: 12px; font-weight: 700; color: #6b8f5a;
  max-width: 700px; margin: 0 auto 8px; animation: ptsBounce 1.8s ease-in-out infinite;
}
@keyframes ptsBounce { 0%, 50%, 100% { transform: translateY(0); } 25% { transform: translateY(-3px); } }
.page-tabs {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
  padding: 0; background: transparent; border-bottom: none;
  max-width: 700px; margin: 0 auto;
}
.pt-link {
  flex: 1 1 calc(50% - 4px); display: flex; align-items: center; justify-content: center; gap: 4px;
  text-decoration: none; text-align: center; font-family: inherit; font-size: 13.5px; font-weight: 700;
  color: #6b5436; background: #FBF8F4; border: 1.5px solid #DDD2C4; border-radius: 14px;
  padding: 11px 8px; transition: background .15s, color .15s, border-color .15s, box-shadow .15s, transform .1s;
}
.pt-link:hover { border-color: #8fa888; transform: translateY(-1px); }
.pt-link:active { transform: translateY(0); }
.pt-link.active {
  background: #6b8f5a; color: #fff; border-color: #6b8f5a;
  box-shadow: 0 4px 12px rgba(107,143,90,.35);
}
@media (min-width: 480px) { .pt-link { flex: 1 1 auto; font-size: 15px; padding: 13px 12px; gap: 6px; } }
@media (min-width: 600px) { .pt-link { font-size: 16px; padding: 14px 20px; } }
/* ---------- เที่ยวรอบนาสะปัน (Explore Around Na Sapan) ---------- */
.explore-section { max-width: 100vw; padding: 8px 0 20px; }
.explore-inner { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 1300px) { .explore-inner { max-width: 1360px; } }
.explore-title {
  font-size: 20px; font-weight: 700; color: #3f2f22; text-align: center;
  margin-bottom: 6px;
}
.explore-title span { display: block; font-size: 13px; font-weight: 400; color: #7f6f5c; margin-top: 2px; }
.explore-intro {
  text-align: center; font-size: 13.5px; line-height: 1.8; color: #5c4c3c;
  max-width: 620px; margin: 0 auto 20px;
}
.explore-intro b { color: #3f2f22; }
.explore-filters {
  display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 12px;
  margin-bottom: 8px; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.explore-filters::-webkit-scrollbar { display: none; }
.ef-btn {
  flex-shrink: 0; white-space: nowrap; font-family: inherit;
  background: #FBF8F4; color: #6b5436; border: 1px solid #DDD2C4; border-radius: 999px;
  padding: 7px 16px; font-size: 12.5px; font-weight: 600; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.ef-btn:hover { border-color: #8fa888; }
.ef-btn.active { background: #6b8f5a; color: #fff; border-color: #6b8f5a; }
.explore-cat { margin-bottom: 30px; }
.explore-cat-title {
  font-size: 15.5px; font-weight: 700; color: #3f2f22;
  display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px;
}
.explore-cat-title span { font-size: 12px; font-weight: 400; color: #7f6f5c; }
.explore-cat-intro {
  font-size: 13px; line-height: 1.8; color: #5c4c3c;
  background: #F3EEE6; border-radius: 10px; padding: 10px 12px; margin: 8px 0 14px;
}
.explore-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
@media (min-width: 700px) { .explore-grid { grid-template-columns: 1fr 1fr 1fr; gap: 14px; } }
@media (min-width: 1300px) { .explore-grid { grid-template-columns: 1fr 1fr 1fr 1fr; } }
.ex-card {
  background: #FBF8F4; border: 1px solid #E2D8CC; border-radius: 12px;
  overflow: hidden; display: flex; flex-direction: column;
}
.ex-img-wrap {
  position: relative; width: 100%; aspect-ratio: 4 / 3; flex-shrink: 0; overflow: hidden;
  background: linear-gradient(135deg, #EFE8DA, #E1D6C2);
}
.ex-img-wrap img {
  position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100%; object-fit: cover; object-position: center; display: block;
}
.ex-img-ph {
  position: absolute; inset: 0; z-index: 0; display: flex; align-items: center; justify-content: center;
  font-size: 26px; opacity: .5;
}
.ex-body { padding: 9px 10px 11px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.ex-name-th { font-size: 12.5px; font-weight: 700; color: #3f2f22; line-height: 1.3; }
.ex-name-en { font-size: 10.5px; color: #7f6f5c; }
.ex-note { font-size: 10px; color: #8a6d3b; margin-top: 2px; }
.ex-meta {
  display: flex; flex-direction: column; gap: 2px;
  font-size: 10.5px; color: #5c4c3c; margin: 6px 0 8px; line-height: 1.4;
}
.ex-dir-btn {
  display: inline-block; text-align: center; text-decoration: none;
  background: #6b8f5a; color: #fff; font-weight: 600; font-size: 11px;
  padding: 8px 2px; border-radius: 999px; transition: background .15s;
  margin-top: auto;
}
.ex-dir-btn:hover { background: #587649; }
@media (min-width: 700px) {
  .ex-body { padding: 12px 14px 14px; }
  .ex-name-th { font-size: 14.5px; }
  .ex-name-en { font-size: 12px; }
  .ex-note { font-size: 11.5px; }
  .ex-meta { font-size: 12px; margin: 8px 0 10px; }
  .ex-img-ph { font-size: 32px; }
  .ex-dir-btn { font-size: 12.5px; padding: 9px 0; }
}
/* ---------- หน้า "รูปที่พัก" (gallery.html) - รูปแยกตามบ้าน + เปิด lightbox เดียวกับหน้าจอง ---------- */
.gallery-house-block { margin-bottom: 22px; }
.gallery-house-title { font-size: 16px; font-weight: 700; color: #3f2f22; margin-bottom: 8px; }
.gallery-house-title span { font-weight: 500; font-size: 12.5px; color: var(--muted); margin-left: 6px; }
.gallery-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (min-width: 700px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; } }
@media (min-width: 1300px) { .gallery-grid { grid-template-columns: repeat(4, 1fr); } }
.gallery-thumb {
  position: relative; display: block; width: 100%; aspect-ratio: 4 / 3; padding: 0; border: 0;
  border-radius: 12px; overflow: hidden; cursor: pointer; background: linear-gradient(135deg, #EFE8DA, #E1D6C2);
  transition: transform .15s, box-shadow .15s;
}
.gallery-thumb:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.12); }
.gallery-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
/* ---------- หน้า "รีวิวจากลูกค้า" (reviews.html) - การ์ดรีวิวสี่เหลี่ยมจัตุรัส ---------- */
.review-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (min-width: 700px) { .review-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; } }
@media (min-width: 1300px) { .review-grid { grid-template-columns: repeat(4, 1fr); } }
.review-thumb {
  position: relative; display: block; width: 100%; aspect-ratio: 1 / 1; padding: 0; border: 0;
  border-radius: 14px; overflow: hidden; cursor: pointer; background: linear-gradient(135deg, #EFE8DA, #E1D6C2);
  transition: transform .15s, box-shadow .15s;
}
.review-thumb:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.12); }
.review-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.book-actions { display: flex; gap: 8px; margin-top: 6px; }
.book-actions button { flex: 1; padding: 12px; border: 0; border-radius: 10px; font-weight: 600; cursor: pointer; font-size: 15px; }
.book-card .err { color: var(--urgent); font-size: 13px; min-height: 18px; margin-bottom: 6px; }
.book-success { text-align: center; }
.big-check { font-size: 44px; }
.ref-box {
  background: #fef9e7; border: 1px solid #f7dc6f; border-radius: 10px;
  padding: 12px; margin: 12px 0; font-size: 14.5px;
}
.ref-box .mail-note { font-size: 12px; color: var(--muted); }
.pay-box {
  text-align: left; background: #fdfefe; border: 1px solid #D9CDBC; border-radius: 10px;
  padding: 12px; margin-bottom: 14px; font-size: 13.5px;
}
.pay-box #payInfo { margin: 8px 0; white-space: pre-line; }
.pay-note { font-size: 12px; color: var(--muted); }
.slip-box {
  text-align: left; background: #f8fbf9; border: 1px dashed #a9dfbf; border-radius: 10px;
  padding: 12px; margin-bottom: 14px; font-size: 13.5px;
}
.slip-preview { display: block; max-width: 100%; max-height: 220px; border-radius: 8px; margin-bottom: 8px; border: 1px solid #e5e8e8; }
.slip-actions-row { display: flex; gap: 8px; }
.slip-success-banner {
  background: #eafaf1; border: 1px solid #a9dfbf; border-radius: 12px;
  padding: 16px; text-align: center; margin-bottom: 10px;
}
.slip-success-banner .ssb-icon { font-size: 34px; display: block; margin-bottom: 6px; line-height: 1; }
.slip-success-banner .ssb-title { font-size: 16px; font-weight: 700; color: #145a32; }
.slip-success-banner .ssb-sub { font-size: 13px; color: #1e8449; margin-top: 4px; line-height: 1.5; }
.slip-error-banner {
  background: #fdedec; border: 1px solid #f5b7b1; border-radius: 12px;
  padding: 12px 14px; text-align: center; margin-bottom: 10px; color: #c0392b;
  font-size: 13.5px; font-weight: 600;
}
.slip-actions-row .btn-primary, .slip-actions-row .btn-ghost {
  width: auto; flex: 1; padding: 12px; border: 0; border-radius: 10px;
  font-weight: 600; cursor: pointer; font-size: 15px;
}
.slip-actions-row .btn-ghost { color: #145a32; }
/* ---------- popup ยืนยันแนบสลิปสำเร็จ (ให้ลูกค้าสังเกตเห็นแน่นอน) ---------- */
.ssm-bg {
  display: none; position: fixed; inset: 0; background: rgba(59,45,31,.55);
  align-items: center; justify-content: center; z-index: 970; padding: 20px;
}
.ssm-bg.open { display: flex; }
.ssm-card {
  background: #FBF8F4; border-radius: 20px; padding: 30px 24px 22px; width: 340px; max-width: 100%;
  text-align: center; box-shadow: 0 20px 50px rgba(0,0,0,.28); animation: ssmPop .22s ease;
}
.ssm-card .ssm-icon { font-size: 50px; line-height: 1; margin-bottom: 8px; }
.ssm-card h3 { font-size: 19px; color: #145a32; margin-bottom: 8px; }
.ssm-card p { font-size: 13.5px; color: #3f2f22; line-height: 1.6; margin-bottom: 20px; }
.ssm-card button {
  width: 100%; padding: 12px; border: 0; border-radius: 999px; background: #6b8f5a;
  color: #fff; font-weight: 700; font-size: 14.5px; cursor: pointer;
}
@keyframes ssmPop { from { transform: scale(.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.btn-save-qr {
  display: block; margin: 6px auto 2px; background: #EBF1E5; color: #3f2f22;
  border: 1px solid #DDD2C4; border-radius: 8px; padding: 6px 14px; font-size: 12.5px;
  font-weight: 600; cursor: pointer;
}

/* ---------- สลิปโอนเงินในหน้า dashboard (staff ตรวจก่อนยืนยัน) ---------- */
.slip-row { margin: 6px 0; }
.slip-thumb-link {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #3A352C; text-decoration: none;
  font-weight: 600; border: 0; background: none; padding: 0; cursor: pointer; font-family: inherit;
}
.slip-thumb-link:hover { text-decoration: underline; }
.slip-thumb { width: 46px; height: 34px; object-fit: cover; border-radius: 5px; border: 1px solid #D9CDBC; }
.slip-missing { font-size: 12px; color: #d97706; font-weight: 600; }
.slip-view-link {
  border: 0; background: none; padding: 0; cursor: pointer; font-family: inherit;
  color: #3A352C; text-decoration: underline; font-size: inherit;
}
.slip-view-img { max-width: 100%; max-height: 70vh; border-radius: 10px; display: block; margin: 0 auto; }
.book-success .btn-primary { width: 100%; padding: 12px; border: 0; border-radius: 10px; cursor: pointer; font-weight: 600; }
.book-foot { text-align: center; font-size: 11.5px; color: #7d8a8a; margin-top: 6px; }

/* ---------- gallery ---------- */
.pic-badge {
  position: absolute; bottom: 6px; right: 6px; z-index: 2;
  background: rgba(0,0,0,.55); color: #fff; border-radius: 14px;
  padding: 2px 8px; font-size: 11px; cursor: zoom-in;
}
.house-btn { position: relative; }
.gal-bg {
  position: fixed; inset: 0; background: rgba(0,0,0,.88); z-index: 100;
  display: none; align-items: center; justify-content: center;
}
.gal-bg.open { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
.gal-stage { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; }
.gal-stage img { max-width: 92vw; max-height: 64vh; border-radius: 8px; object-fit: contain; }
.gal-close, .gal-nav {
  background: rgba(255,255,255,.15); color: #fff; border: 0;
  border-radius: 50%; width: 42px; height: 42px; font-size: 22px; cursor: pointer; z-index: 101;
}
.gal-close { position: fixed; top: 14px; right: 14px; }
.gal-nav { position: absolute; top: 50%; transform: translateY(-50%); }
.gal-prev { left: 8px; }
.gal-next { right: 8px; }
.gal-count { color: #fff; font-size: 13px; background: rgba(0,0,0,.4); border-radius: 12px; padding: 3px 12px; }
.gal-thumbs {
  display: flex; gap: 8px; max-width: 92vw; overflow-x: auto; padding: 4px 2px 8px;
  scrollbar-width: thin;
}
.gal-thumb {
  width: 72px; height: 54px; object-fit: cover; border-radius: 7px; cursor: pointer;
  opacity: .55; border: 2px solid transparent; flex-shrink: 0; transition: opacity .15s;
}
.gal-thumb.active { opacity: 1; border-color: #fff; }
.gal-thumb:hover { opacity: .85; }

/* ---------- image manager ---------- */
.modal.modal-wide { width: 560px; max-height: 86vh; overflow-y: auto; position: relative; }
.modal-x {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 32px; height: 32px; border: 0; border-radius: 50%;
  background: #ecf0f1; color: #555; font-size: 16px; cursor: pointer; line-height: 32px;
}
.modal-x:hover { background: #D9CDBC; }
.img-hint {
  background: #fef9e7; border: 1px solid #f7dc6f; border-radius: 9px;
  padding: 9px 11px; font-size: 11.5px; line-height: 1.7; margin-bottom: 10px; color: #6e5b00;
}
.img-row .isize { font-weight: 400; font-size: 10.5px; color: var(--muted); margin-left: 4px; }
.cont-hint { background: #E6DAC5; border: 1px solid #DDD2C4; border-radius: 9px; padding: 9px 11px; font-size: 11.5px; line-height: 1.6; margin-bottom: 10px; color: #3A352C; }
.modal .row textarea { width: 100%; padding: 8px; border: 1px solid #D9CDBC; border-radius: 8px; font-size: 13px; font-family: inherit; resize: vertical; }
.wk-days { display: flex; gap: 4px; flex-wrap: wrap; }
.wk-days label { display: flex; align-items: center; gap: 2px; font-size: 12px; border: 1px solid #D9CDBC; border-radius: 7px; padding: 4px 7px; cursor: pointer; }
.img-row-house { display: block; }
.gthumbs { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.gthumb { position: relative; display: inline-block; cursor: grab; transition: opacity .15s; }
.gthumb img { width: 72px; height: 50px; object-fit: cover; border-radius: 7px; border: 1px solid #e5e8e8; display: block; pointer-events: none; }
.gthumb.dragging { opacity: .35; }
@keyframes gthumbPop {
  0% { outline: 3px solid #5B6B45; transform: scale(1.08); }
  100% { outline: 3px solid transparent; transform: scale(1); }
}
.gthumb.gthumb-pop img { animation: gthumbPop .35s ease-out; outline-offset: 2px; }
.gthumb .gdel {
  position: absolute; top: -6px; right: -6px; width: 18px; height: 18px;
  border: 0; border-radius: 50%; background: var(--urgent); color: #fff;
  font-size: 10px; line-height: 18px; padding: 0; cursor: pointer;
}
.gempty { font-size: 11.5px; color: var(--muted); }
.gadd { display: grid; grid-template-columns: 1fr auto auto; gap: 6px; }
.img-rows { display: flex; flex-direction: column; gap: 8px; }
.img-row {
  display: grid; grid-template-columns: 64px 1fr auto auto; gap: 8px;
  align-items: center; border: 1px solid #e5e8e8; border-radius: 10px; padding: 8px;
}
.img-row .ithumb {
  width: 64px; height: 44px; object-fit: cover; border-radius: 7px;
  background: #f0f3f4; display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.img-row .ilabel { font-size: 12px; font-weight: 600; margin-bottom: 3px; }
.img-row input { width: 100%; padding: 6px 8px; border: 1px solid #D9CDBC; border-radius: 7px; font-size: 12px; }
.img-row button {
  border: 0; border-radius: 7px; padding: 7px 10px; cursor: pointer;
  font-size: 12px; font-weight: 600; white-space: nowrap;
}
.img-row .btn-link { background: #E6DAC5; color: #3A352C; }
.img-row .btn-up { background: #5A3820; color: #fff; }

.toast {
  position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%);
  background: #3A352C; color: #fff; padding: 10px 20px; border-radius: 10px;
  font-size: 14px; opacity: 0; transition: opacity .3s; z-index: 60; pointer-events: none;
}
.toast.show { opacity: 1; }
