:root {
  --roomscope: #2471a3;
  --direct: #1e8449;
  --legacy: #95a5a6;
  --bg: #f4f6f8;
  --card: #ffffff;
  --text: #2c3e50;
  --muted: #7f8c8d;
  --green: #27ae60;
  --urgent: #e74c3c;
  --line: #06c755;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: '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, #1a5276, #117864);
}
.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 #d5dbdb; border-radius: 10px; margin-bottom: 14px;
}
.login-card button {
  width: 100%; padding: 12px; font-size: 16px; border: 0; border-radius: 10px;
  background: #117864; 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: #1a5276; 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: #f39c12; 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: grid; grid-template-columns: 1fr 330px; gap: 14px; padding: 14px; max-width: 1500px; margin: 0 auto; }
@media (max-width: 980px) { .main { grid-template-columns: 1fr; } }
.card { background: var(--card); border-radius: 12px; padding: 14px; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.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 #dde1ea; padding: 9px 18px; border-radius: 10px;
  cursor: pointer; font-size: 13px; font-weight: 700; color: var(--muted);
}
.op-tab.active { background: #1a5276; 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 #dde1ea; background: #fff;
  font-size: 14px; font-weight: 600; cursor: pointer; color: #555;
}
.op-subnav-btn.active { background: #1a5276; 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 #dde1ea; 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 #dde1ea; border-radius: 8px; font-size: 13px; background: #fff; }
.op-body { max-width: 1500px; margin: 0 auto; padding: 0 14px 20px; }
.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: #1a5276; 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 #f39c12; }
.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: #2c3e50;
  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: #2c3e50; cursor: pointer; white-space: nowrap;
}
.tn-drop-item:hover { background: #f4f6f8; }
.tn-drop-item.tn-disabled { color: #aab4cc; 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: #aab4cc; font-size: 14px; }

.topnav-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.tn-add-btn { background: #f39c12; 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: #f39c12; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; }

.tn-bell-item { padding: 0 6px; position: relative; }
.tn-bell { font-size: 19px; position: relative; display: inline-block; line-height: 1; cursor: pointer; }
.tn-bell-badge {
  position: absolute; top: -7px; right: -9px; background: #e74c3c; 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-bell-drop { width: 320px; max-height: 420px; overflow-y: auto; padding-bottom: 8px; }
.tn-noti-list { padding: 0 10px; }
.tn-noti-list .noti { margin-bottom: 6px; }
.tn-noti-list .empty { padding: 10px 6px; color: var(--muted); font-size: 12.5px; text-align: center; }

.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 #f59e0b;
}
.ci-row.done { border-left-color: #16a34a; }
.ci-house { font-weight: 700; font-size: 13px; min-width: 150px; }
.ci-ref { font-size: 12px; color: #2471a3; 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: #e74c3c; }
.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 #dde1ea; 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 #dde1ea; 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: #e74c3c; color: #fff; }
.sr-search-btn { background: #f39c12; 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; }
.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: #eaf3fb; border-left: 4px solid #3498db; padding: 9px 12px; font-weight: 700; font-size: 13.5px; color: #21618c; 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 #d5dbdb; border-radius: 5px; font-size: 12px; }
.rm-mini-del { background: none; border: none; color: #e74c3c; 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 #dde1ea; 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: #1a5276; box-shadow: 0 -2px 0 #1a5276 inset; }
.gs-subpanel { display: none; }
.gs-subpanel.active { display: block; }
.gs-banner {
  max-width: 1500px; margin: 14px auto 0; padding: 12px 16px; background: #eaf2fb; border: 1px solid #cfe0f3;
  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 #dde1ea; }
.gs-btn-muted:hover { background: #e2e6eb; }

/* ---------- เรทราคา - ตั้งค่า ---------- */
.rt-section-title { background: #eaf2fb; padding: 12px 16px; font-weight: 700; color: #1a5276; 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: #e74c3c; cursor: pointer; font-size: 14px; padding: 0; }
.rt-add-btn { background: #2471a3; 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: #e74c3c; cursor: pointer; font-size: 14px; }
.sn-group { margin-bottom: 20px; border: 1px solid #e5e8ec; border-radius: 10px; overflow: hidden; }
.sn-group-header { background: #2c3e50; 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: #e74c3c; }
.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: #e74c3c; }
.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: #eaf2fb; color: #1a5276; border: 1px solid #cfe0f3; 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: #e74c3c; 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: #2c3e50; 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: #dde1ea; }
.rp-price-input:focus { border-color: #2471a3; background: #fff; outline: none; }
.rp-price-input.rp-zero { color: #e74c3c; }
.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: #e74c3c; }
.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: #e74c3c; }
.btn-op.rm-dnd { background: #7c3aed; }
.btn-op.rm-dnd.off { background: #fff; color: var(--muted); border: 1px solid #dde1ea; }

.op-filterbtns { display: flex; gap: 8px; flex-wrap: wrap; }
.op-fbtn {
  padding: 7px 14px; border-radius: 8px; border: 1px solid #dde1ea; background: #fff;
  font-size: 12px; cursor: pointer; font-weight: 700; color: var(--text);
}
.op-fbtn.active { background: #1a5276; 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-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-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: #2471a3; }
.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: 1472px; 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: 16px; flex: 1; text-align: center; }
.cal-head button { border: 1px solid #d5dbdb; background: #fff; border-radius: 8px; padding: 5px 14px; cursor: pointer; font-size: 15px; }
.cal-scroll { overflow-x: auto; }
table.cal { border-collapse: collapse; width: 100%; min-width: 900px; }
table.cal th, table.cal td { border: 1px solid #e5e8e8; text-align: center; }
table.cal th { background: #eaf2f8; font-size: 11px; padding: 4px 1px; min-width: 26px; }
table.cal th.today { background: #f9e79f; }
table.cal td.house-name {
  text-align: left; padding: 6px 8px; font-size: 13px; font-weight: 600;
  white-space: nowrap; background: #fbfcfc; position: sticky; left: 0;
}
table.cal td.day { height: 38px; padding: 1px; position: relative; cursor: pointer; }
table.cal td.day:hover { background: #f1f6fb; }
table.cal td.day.today { background: #fef9e7; }
.cal-price {
  font-size: 10px; font-weight: 700; color: #1a7a4c; line-height: 14px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.chip {
  display: block; height: 16px; border-radius: 4px; font-size: 10px; color: #fff;
  line-height: 16px; overflow: hidden; cursor: pointer; margin-bottom: 1px;
}
.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 #f39c12; outline-offset: -2px; }
.chip.hold { opacity: .65; outline: 2px dotted #7d3c98; outline-offset: -2px; }

/* ---------- เมนูคลิกช่องว่างในตาราง ---------- */
.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: #7d3c98; color: #fff; }
.pending-item.hold-item { border-color: #d2b4de; background: #f5eef8; }
.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);
}
.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; }

/* ---------- 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: 50;
}
.modal-bg.open { display: flex; }
.modal { background: #fff; border-radius: 14px; padding: 20px; width: 360px; max-width: 92vw; }
.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 #d5dbdb; border-radius: 8px; font-size: 14px;
}
.modal .modal-actions { display: flex; gap: 8px; margin-top: 14px; }
.modal .modal-actions button {
  flex: 1; padding: 10px; border: 0; border-radius: 9px; cursor: pointer; font-weight: 600;
}
.btn-primary { background: #117864; color: #fff; }
.btn-ghost { background: #ecf0f1; }
/* ---------- 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; }
.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) */
.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;
}
.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 #d5dbdb; border-radius: 9px;
}
.book-card .row { margin-bottom: 10px; }
.house-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.house-btn {
  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; transition: transform .12s, box-shadow .12s;
}
.house-btn:not(.full):hover { border-color: #8B6F54; transform: translateY(-2px); box-shadow: 0 10px 26px rgba(139,111,84,.16); }
.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:not(.full):hover .book-cta { background: #735943; }
.house-btn.full .book-cta { display: none; }
.house-btn .hstat-full { font-size: 12.5px; color: #cb4335; font-weight: 600; }
.map-btn, .contact-btn {
  display: block; text-align: center; text-decoration: none; font-weight: 600;
  border-radius: 10px; padding: 11px; font-size: 14px; margin-top: 6px;
}
.map-btn { background: #eaf2f8; color: #1a5276; border: 1px solid #aed6f1; }
.contact-btn.call { background: var(--direct); color: #fff; }
.contact-btn.line { background: var(--line); 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; }
/* ---------- บริการเสริม (หน้าจองลูกค้า) ---------- */
.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: 10px; flex-wrap: wrap; flex-shrink: 0; margin-left: auto; }
.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 #d5dbdb; 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-choice-group select {
  width: 100%; padding: 6px 8px; border: 1px solid #d5dbdb; border-radius: 8px;
  font-size: 13px; -webkit-appearance: none; appearance: none; background: #fff;
}
.addon-total-row {
  text-align: right; font-size: 13.5px; color: #145a32; margin-top: 4px;
  padding-top: 6px; border-top: 1px dashed #d0e6d8;
}
.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: #1a5276; font-weight: 600; text-decoration: none; }
.fb-link:hover { text-decoration: underline; }
.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 #d5dbdb; 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-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; }
.btn-save-qr {
  display: block; margin: 6px auto 2px; background: #eaf2f8; color: #1a5276;
  border: 1px solid #aed6f1; 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: #1a5276; text-decoration: none; font-weight: 600; }
.slip-thumb-link:hover { text-decoration: underline; }
.slip-thumb { width: 46px; height: 34px; object-fit: cover; border-radius: 5px; border: 1px solid #d5dbdb; }
.slip-missing { font-size: 12px; color: #d97706; font-weight: 600; }
.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; top: 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: #d5dbdb; }
.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: #eaf2f8; border: 1px solid #aed6f1; border-radius: 9px; padding: 9px 11px; font-size: 11.5px; line-height: 1.6; margin-bottom: 10px; color: #1a5276; }
.modal .row textarea { width: 100%; padding: 8px; border: 1px solid #d5dbdb; 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 #d5dbdb; 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; }
.gthumb img { width: 72px; height: 50px; object-fit: cover; border-radius: 7px; border: 1px solid #e5e8e8; display: block; }
.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 #d5dbdb; 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: #d6eaf8; color: #1a5276; }
.img-row .btn-up { background: #117864; color: #fff; }

.toast {
  position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%);
  background: #2c3e50; 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; }
