/* The Mug Resort — สไตล์หลัก
   โลก: บ้าน A-frame ผนังขาวในสวน (จากรูปจริงบนเพจร้าน) ; ภาษาออกแบบนุ่มแบบเว็บ 4 Legs ที่ผู้ใช้ชอบ
   (สีโทนเดียว, ฟอนต์โค้งมน, เมนูลอย, ขอบคลื่น, ปุ่มนูน) แต่เปลี่ยนโทนเป็นเขียวเสจ + ผนังขาวอุ่น + ดินเผาอ่อน */
:root {
  --page: #f6f4ee; --paper: #ffffff; --tint: #eef0e7; --tint-2: #dfe4d5;
  --ink: #3b4136; --ink-2: #545c4d; --muted: #7c8475; --line: #e4e3d7; --line-2: #efeee6;
  --brand: #5a7557; --brand-2: #6b8867; --brand-deep: #3f5641; --brand-night: #33463a; --brand-soft: #e8ede2;
  --tile: #c27752; --tile-soft: #f7ebe3; --tile-btn: #ad6342; --wood: #7a5a43; --wood-soft: #f1e9e0; --leaf: #8fae7b; --leaf-soft: #edf3e6;
  --danger: #b42318; --danger-soft: #fdecea; --warn: #9a5b00; --warn-soft: #fbf1dc; --ok: #3f7d4f; --ok-soft: #e6f2e7; --info: #4f6b4d; --info-soft: #e8ede2;
  --radius: 18px; --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(59, 65, 54, .05), 0 8px 22px rgba(59, 65, 54, .07);
  --shadow-lg: 0 16px 40px rgba(59, 65, 54, .14);
  --font: 'Anuphan', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Kanit', 'Anuphan', system-ui, sans-serif;
  --hand: 'Mali', 'Anuphan', cursive;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: #b9bfb2 transparent; }
body { margin: 0; font-family: var(--font); font-size: 15.5px; line-height: 1.6; color: var(--ink); background: var(--page); -webkit-font-smoothing: antialiased; caret-color: var(--brand); overflow-x: hidden; }
::selection { background: var(--tile); color: var(--ink); }
a { color: var(--brand); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--brand-deep); }
h1, h2, h3 { line-height: 1.3; text-wrap: balance; color: var(--ink); }
h1 { font-size: 26px; font-weight: 700; margin: 0 0 16px; }
h2 { font-size: 19px; font-weight: 700; margin: 26px 0 12px; }
h3 { font-size: 16px; font-weight: 600; margin: 16px 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.red { color: var(--danger); } .green { color: var(--ok); }
hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
.ic { flex: none; display: inline-block; vertical-align: middle; }
:focus-visible { outline: 3px solid var(--tile); outline-offset: 2px; border-radius: 6px; }

/* ---------- ปุ่ม ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid transparent; border-radius: 999px;
  padding: 9px 18px; background: var(--brand); color: #fff; font: inherit; font-weight: 600; font-size: 14.5px; text-decoration: none; cursor: pointer;
  line-height: 1.25; transition: background .15s, box-shadow .15s, transform .08s; box-shadow: 0 2px 6px rgba(35, 36, 31, .18); }
.btn:hover { background: var(--brand-deep); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn-sm { padding: 6px 13px; font-size: 13px; }
.btn-light { background: var(--paper); color: var(--brand-deep); border-color: var(--tint-2); box-shadow: none; }
.btn-light:hover { background: var(--tint); color: var(--brand-deep); }
.btn-accent { background: var(--ok); } .btn-accent:hover { background: #0f6038; }
.btn-cta { background: var(--tile-btn); box-shadow: 0 3px 10px rgba(196, 61, 33, .28); } .btn-cta:hover { background: #a3311a; }
.btn-danger { background: var(--danger); } .btn-danger:hover { background: #8f1c13; }
.btn-warn { background: var(--warn); } .btn-warn:hover { background: #7a4700; }
.btn-line { background: #06c755; } .btn-line:hover { background: #05a647; }
.btn[disabled] { opacity: .45; cursor: not-allowed; box-shadow: none; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; color: var(--muted); }
.icon-btn:hover { background: var(--tint); color: var(--brand-deep); }

/* ---------- ฟอร์ม ---------- */
label { display: block; font-weight: 600; font-size: 13px; color: var(--ink-2); margin: 10px 0 4px; }
input, select, textarea { width: 100%; font: inherit; font-size: 15px; padding: 9px 12px; border: 1.5px solid #d3d8cc; border-radius: var(--radius-sm); background: var(--paper); color: var(--ink);
  transition: border-color .15s, box-shadow .15s; }
input::placeholder, textarea::placeholder { color: #8a8f82; }
input:hover, select:hover, textarea:hover { border-color: #b6bdae; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(47, 91, 60, .16); }
input[disabled], select[disabled], textarea[disabled] { background: var(--line-2); color: var(--muted); }
input[type=checkbox], input[type=radio] { width: 17px; height: 17px; accent-color: var(--brand); vertical-align: -3px; }
input[type=file] { padding: 7px; background: var(--line-2); }
textarea { min-height: 76px; resize: vertical; }
.inline { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.inline input, .inline select { width: auto; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid > * { min-width: 0; }
.grid.g2 { align-items: start; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.row > * { flex: 1 1 150px; min-width: 0; }
.row > .shrink { flex: 0 0 auto; }
.approver { border: 1.5px dashed #d79a7c; background: var(--tile-soft); border-radius: var(--radius-sm); padding: 10px; margin: 10px 0; display: grid; gap: 6px; }

/* ---------- แผ่นเคลือบ (การ์ด) / ตาราง ---------- */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; box-shadow: var(--shadow); }
.card > h2:first-child, .card > h3:first-child, .card > .toolbar:first-child { margin-top: 0; }
.card h2 { font-size: 17px; }
.table-wrap, .tbl { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { padding: 9px 10px; border-bottom: 1px solid var(--line-2); text-align: left; vertical-align: top; }
th { font-size: 12.5px; color: var(--muted); font-weight: 600; background: #f7f8f4; border-bottom-color: var(--line); white-space: nowrap; }
tr:hover > td { background: #fafbf8; }
table.small td, table.small th { padding: 7px 8px; }
tr.void td { color: #a3a79c; text-decoration: line-through; }
tfoot td { font-weight: 700; border-top: 1.5px solid var(--line); border-bottom: 0; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.kv dt { color: var(--muted); font-size: 13.5px; }
.kv dd { margin: 0; min-width: 0; }

.flash { padding: 11px 16px; border-radius: var(--radius-sm); margin-bottom: 14px; font-weight: 600; border: 1px solid transparent; }
.flash-ok { background: var(--ok-soft); color: #105c37; border-color: #b9e2cb; }
.flash-error { background: var(--danger-soft); color: var(--danger); border-color: #f5c6c1; }
.flash-info { background: var(--info-soft); color: var(--brand-deep); border-color: #c9dbc7; }
.alert { padding: 11px 16px; border-radius: var(--radius-sm); background: var(--warn-soft); color: #5c3c00; margin-bottom: 14px; border: 1px solid #e8d0a0; }
.alert a { color: inherit; font-weight: 700; }

/* ---------- ป้ายสถานะ ---------- */
.badge, .st, .pay, .chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--line-2); color: var(--ink-2); white-space: nowrap; line-height: 1.6; }
.st::before, .pay::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st-pending { background: var(--warn-soft); color: var(--warn); } .st-confirmed { background: var(--info-soft); color: var(--brand); }
.st-checked_in { background: var(--ok-soft); color: var(--ok); } .st-checked_out { background: var(--line-2); color: var(--muted); }
.st-cancelled, .st-no_show, .st-expired { background: var(--danger-soft); color: var(--danger); }
.pay-unpaid { background: var(--danger-soft); color: var(--danger); } .pay-deposit, .pay-partial { background: var(--warn-soft); color: var(--warn); }
.pay-paid { background: var(--ok-soft); color: var(--ok); } .pay-refunded { background: var(--line-2); color: var(--muted); }

/* สถานะห้อง 8 แบบ */
.rs-vacant { --c: #7b8d9c; --cs: #eef3f7; } .rs-booked { --c: #1a6fc4; --cs: #e3effa; } .rs-arriving { --c: #6a44c2; --cs: #efe9fb; }
.rs-inhouse { --c: #157a4a; --cs: #e2f4ea; } .rs-dirty { --c: #d0611c; --cs: #fdeee2; } .rs-cleaning { --c: #b08400; --cs: #fdf3d4; }
.rs-ready { --c: #0f8f83; --cs: #ddf3f0; } .rs-blocked { --c: #b42318; --cs: #fdecea; } .rs-closed { --c: #aebcc7; --cs: #f2f6f9; }
.legend { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12.5px; margin: 4px 0 14px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 999px; background: var(--cs); color: var(--ink-2); font-weight: 600; }
.legend span::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.board { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 10px; }
.room { position: relative; display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: var(--ink); background: var(--paper); border: 1px solid var(--line);
  border-radius: 14px; padding: 13px 12px 10px; min-height: 104px; overflow: hidden; transition: box-shadow .15s, transform .15s, border-color .15s; }
.room::before { content: ''; position: absolute; inset: 0 0 auto; height: 5px; background: var(--c); }
.room:hover { box-shadow: var(--shadow-lg); transform: translateY(-1px); border-color: transparent; color: var(--ink); }
.room .no { font-size: 21px; font-weight: 700; line-height: 1.2; }
.room .state { align-self: flex-start; font-size: 11.5px; font-weight: 700; color: var(--c); background: var(--cs); padding: 1px 9px; border-radius: 999px; margin: 3px 0 4px; }
.room .who { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room.closed { background: #f7fafc; }
.room.closed .no { color: var(--muted); }
.zone-title { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--ink-2); margin: 20px 0 10px; }
.zone-title:first-of-type { margin-top: 6px; }

/* KPI */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); min-width: 0; }
.kpi .label { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.kpi .value { font-size: 26px; font-weight: 700; line-height: 1.25; margin-top: 4px; font-variant-numeric: tabular-nums; color: var(--ink); }
.kpi .value small { font-size: 14px; font-weight: 600; color: var(--muted); }
.kpi .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.bar { height: 7px; background: var(--line-2); border-radius: 99px; overflow: hidden; margin-top: 8px; }
.bar i { display: block; height: 100%; background: var(--brand-2); border-radius: 99px; }

/* ---------- โลโก้ ---------- */
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.logo svg { flex: none; }
.logo-word { font-family: var(--display); font-weight: 600; font-size: 20px; line-height: 1; letter-spacing: -.005em; }
.logo-word small { display: block; font-family: var(--font); font-size: 10.5px; letter-spacing: .32em; font-weight: 600; margin-top: 4px; opacity: .8; }

/* ---------- หลังบ้าน ---------- */
.sidenav { position: fixed; inset: 0 auto 0 0; width: 236px; background: var(--brand-night); color: #c6d9ea; display: flex; flex-direction: column; padding: 14px 12px; overflow-y: auto; z-index: 30; }
.side-brand { padding: 6px 8px 16px; color: #fff; border-bottom: 1px solid rgba(255,255,255,.1); margin-bottom: 6px; }
.side-brand:hover { color: #fff; }
.side-brand .logo-word { font-size: 18px; }
.side-group { font-size: 11.5px; color: #86a8c6; padding: 16px 10px 6px; font-weight: 600; }
.side-link { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 999px; color: #c6d9ea; text-decoration: none; font-size: 14px; font-weight: 500; }
.side-link:hover { background: rgba(255,255,255,.07); color: #fff; }
.side-link.active { background: var(--paper); color: var(--brand-deep); font-weight: 700; }
.side-link.active .ic { color: var(--wood); }
.side-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.1); }
.admin-shell { margin-left: 236px; min-height: 100vh; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; height: 60px; padding: 0 24px; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.topbar::after { content: ''; position: absolute; left: 0; right: 0; bottom: -3px; height: 3px; background: repeating-linear-gradient(90deg, var(--tile) 0 21px, #8f3f23 21px 22px); opacity: .85; }
.topbar-title { font-weight: 700; font-size: 15px; color: var(--ink-2); }
.user-chip { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.user-meta b { display: block; font-size: 13.5px; line-height: 1.2; }
.user-meta small { display: block; font-size: 11.5px; color: var(--muted); }
.menu-btn { display: none; background: none; border: 0; color: var(--ink); cursor: pointer; padding: 6px; margin-left: -6px; border-radius: 8px; }
.nav-scrim { display: none; }
.admin-main { padding: 26px 28px 48px; max-width: 1320px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.toolbar h1, .toolbar h2 { margin: 0 auto 0 0; }
.tabs { display: inline-flex; gap: 2px; flex-wrap: wrap; margin-bottom: 14px; padding: 4px; background: var(--tint); border-radius: 999px; }
.tabs a { padding: 6px 15px; border-radius: 999px; text-decoration: none; color: var(--ink-2); font-size: 14px; font-weight: 600; }
.tabs a:hover { color: var(--brand-deep); }
.tabs a.active { background: var(--paper); color: var(--brand-deep); box-shadow: 0 1px 3px rgba(11,58,104,.12); }
details.action { border: 1px solid var(--line); border-radius: 14px; padding: 0; margin-bottom: 8px; background: var(--paper); box-shadow: var(--shadow); overflow: hidden; }
details.action summary { cursor: pointer; font-weight: 600; padding: 12px 16px; list-style: none; display: flex; align-items: center; gap: 8px; }
details.action summary::-webkit-details-marker { display: none; }
details.action summary::after { content: ''; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .15s; }
details.action[open] summary::after { transform: rotate(-135deg); }
details.action[open] summary { border-bottom: 1px solid var(--line-2); }
details.action > form, details.action > div { padding: 4px 16px 14px; }
details:not(.action) > summary { cursor: pointer; color: var(--brand); font-weight: 600; }
.thumb { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }

/* ---------- เว็บลูกค้า ---------- */
.area-site { background: var(--page); color: var(--ink); }
.area-site h1, .area-site h2, .area-site h3 { font-family: var(--display); font-weight: 600; color: var(--ink); }
.area-site h1 { font-size: 34px; }

/* ปุ่มนูน (แบบ 4 Legs) */
.area-site .btn { font-family: var(--display); font-weight: 500; font-size: 15.5px; padding: 11px 24px; box-shadow: 0 5px 0 var(--brand-deep), 0 12px 22px rgba(63, 86, 65, .22); transition: transform .12s, box-shadow .12s, background .15s; }
.area-site .btn:hover { transform: translateY(-2px); box-shadow: 0 7px 0 var(--brand-deep), 0 16px 26px rgba(63, 86, 65, .26); }
.area-site .btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--brand-deep), 0 4px 10px rgba(63, 86, 65, .2); }
.area-site .btn-cta { background: var(--tile-btn); box-shadow: 0 5px 0 #8a4d32, 0 12px 22px rgba(173, 99, 66, .28); }
.area-site .btn-cta:hover { background: var(--tile-btn); box-shadow: 0 7px 0 #8a4d32, 0 16px 26px rgba(173, 99, 66, .32); }
.area-site .btn-light { background: var(--paper); color: var(--ink); border-color: transparent; box-shadow: 0 5px 0 var(--line), 0 12px 22px rgba(59, 65, 54, .08); }
.area-site .btn-light:hover { background: var(--paper); color: var(--ink); box-shadow: 0 7px 0 var(--line), 0 16px 26px rgba(59, 65, 54, .1); }
.area-site .btn-sm { font-size: 13.5px; padding: 7px 16px; box-shadow: 0 3px 0 var(--brand-deep); }
.area-site .btn[disabled] { box-shadow: none; transform: none; }

/* เมนูลอยทรงแคปซูล */
.site-header { position: sticky; top: 0; z-index: 20; padding: 12px max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px)); background: linear-gradient(var(--page) 60%, transparent); }
.site-header-in { max-width: 1140px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; padding: 8px 10px 8px 16px; background: var(--paper); border-radius: 999px; box-shadow: 0 6px 22px rgba(59, 65, 54, .1); border: 1px solid var(--line-2); }
.site-header .logo { color: var(--ink); margin-right: auto; }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; font-size: 14.5px; font-family: var(--display); }
.site-nav a:not(.btn) { text-decoration: none; color: var(--ink-2); padding: 7px 14px; border-radius: 999px; }
.site-nav a:not(.btn):hover { background: var(--tint); color: var(--ink); }
.site-nav .btn { box-shadow: 0 3px 0 #8a4d32; }
.site-nav .muted-link { color: var(--muted) !important; }
.site-main { max-width: 1140px; margin: 0 auto; padding: 26px max(16px, env(safe-area-inset-right, 0px)) 64px max(16px, env(safe-area-inset-left, 0px)); }
.site-main.is-home { padding-top: 0; }

/* ป้ายเล็กลายมือ */
.hand-tag { display: inline-flex; align-items: center; gap: 6px; font-family: var(--hand); font-weight: 600; font-size: 14px; color: var(--brand-deep); background: var(--brand-soft); padding: 4px 14px; border-radius: 999px; transform: rotate(-2deg); }
.hand-tag.on-photo { background: rgba(255,255,255,.88); }

/* หน้าแรก: รูปพื้นหลังเบลอ + หัวข้อใหญ่ + รูปบ้าน */
.hero { position: relative; margin: -78px calc(50% - 50vw) 0; padding: 120px max(16px, env(safe-area-inset-right, 0px)) 120px max(16px, env(safe-area-inset-left, 0px)); overflow: hidden;
  background: radial-gradient(800px 420px at 85% 10%, rgba(143, 174, 123, .35), transparent 70%), radial-gradient(600px 300px at 5% 0%, rgba(143, 174, 123, .16), transparent 70%), linear-gradient(180deg, #eef1e6, var(--page)); }
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; filter: blur(6px) saturate(.9); opacity: .28; transform: scale(1.06); }
.hero-in { position: relative; z-index: 1; max-width: 1140px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.hero h1 { font-size: 54px; line-height: 1.18; margin: 16px 0 16px; letter-spacing: -.005em; }
.hero h1 mark { background: linear-gradient(transparent 58%, rgba(194, 119, 82, .28) 58%); color: inherit; padding: 0 4px; border-radius: 4px; }
.hero-lede { margin: 0 0 26px; font-size: 17px; color: var(--ink-2); max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.hero-facts { display: inline-flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 22px; padding: 8px 18px; border: 1.5px solid var(--tint-2); border-radius: 999px; background: rgba(255,255,255,.6); font-size: 14px; color: var(--ink-2); font-family: var(--display); }
.hero-facts span + span::before { content: '•'; margin-right: 12px; color: var(--brand-2); }
.hero-photo { position: relative; border-radius: 28px; overflow: hidden; box-shadow: var(--shadow-lg); aspect-ratio: 5 / 4; background: var(--brand-soft); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-photo .hand-tag { position: absolute; left: 16px; bottom: 16px; }
.web-badge { position: absolute; right: -6px; top: 18px; background: var(--tile); color: #fff; font-family: var(--display); padding: 10px 18px 10px 16px; border-radius: 16px 0 0 16px; box-shadow: 0 8px 18px rgba(173, 99, 66, .3); line-height: 1.15; }
.web-badge b { display: block; font-size: 28px; font-weight: 600; }
.web-badge span { font-size: 13px; }

/* ภาพแทนรูปจริง: บ้าน A-frame ลายเส้น (จนกว่าร้านจะส่งรูป) */
.art-aframe { position: absolute; inset: 0; display: grid; place-items: center; background: radial-gradient(120% 80% at 50% 110%, #d7e2cc, transparent 60%), linear-gradient(180deg, #eef3e8, #e3ebdb); }
.art-aframe svg { width: 62%; height: auto; }

/* กล่องค้นห้องว่าง (ลอยทับขอบคลื่น) */
.search-card { position: relative; z-index: 3; max-width: 1040px; margin: -64px auto 0; background: var(--paper); border-radius: 26px; padding: 18px 20px 16px; box-shadow: var(--shadow-lg); border: 1px solid var(--line-2); }
.search-card form { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.search-card form > div { flex: 1 1 160px; min-width: 0; }
.search-card form > .shrink { flex: 0 0 auto; }
.search-card label { margin-top: 0; font-family: var(--display); font-weight: 500; }
.search-card .btn { height: 46px; }
.tonight { margin: 12px 4px 0; font-size: 14.5px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.tonight b { color: var(--brand-deep); font-family: var(--display); font-size: 17px; font-weight: 600; }
.tonight s { color: var(--muted); }

/* หัวข้อช่วง */
.sec-head { text-align: center; margin: 64px auto 26px; max-width: 640px; }
.sec-head h2 { font-size: 34px; margin: 12px 0 6px; }
.sec-head p { margin: 0; color: var(--muted); }

/* การ์ดห้องพัก (รูปซ้าย ข้อมูลขวา แบบ 4 Legs) */
.room-list { display: grid; gap: 22px; }
.room-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); background: var(--paper); border-radius: 28px; overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line-2); }
.room-photo { position: relative; min-height: 300px; background: var(--brand-soft); }
.room-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.room-photo .hand-tag { position: absolute; left: 16px; top: 16px; }
.room-body { padding: 30px 32px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.room-body h3 { font-size: 28px; margin: 0; }
.room-body .desc { margin: 0; color: var(--ink-2); }
.feat { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 10px; }
.feat li { display: flex; align-items: center; gap: 12px; color: var(--ink-2); }
.feat .dot { width: 34px; height: 34px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-deep); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.room-foot { margin-top: auto; padding-top: 16px; border-top: 2px dashed var(--line); display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; justify-content: space-between; }
.price-new { font-family: var(--display); font-weight: 600; font-size: 32px; color: var(--brand-deep); line-height: 1; }
.price-old { text-decoration: line-through; color: var(--muted); font-size: 14.5px; }
.price-unit { font-size: 13.5px; color: var(--muted); }
.tag-web { display: inline-flex; align-items: center; background: var(--tile-soft); color: #8a4d32; border-radius: 999px; padding: 2px 11px; font-size: 12.5px; font-weight: 600; }

/* จุดเด่น 3 ข้อ */
.perks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.perk { text-align: center; padding: 28px 20px 24px; border-radius: 26px; background: linear-gradient(180deg, var(--paper), #f8f6f0); border: 1px solid var(--line-2); box-shadow: var(--shadow); min-width: 0; }
.perk .dot { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-deep); display: flex; align-items: center; justify-content: center; }
.perk h3 { font-size: 18px; margin: 0 0 6px; }
.perk p { margin: 0; font-size: 14px; color: var(--ink-2); }

/* แถบชวนจอง */
.cta-band { position: relative; margin-top: 64px; background: var(--brand); color: #fff; border-radius: 32px; padding: 46px 28px; text-align: center; overflow: hidden; }
.cta-band h2 { color: #fff; font-size: 32px; margin: 0 0 8px; }
.cta-band p { margin: 0 0 22px; color: #e6eee1; }
.cta-band .btn { background: var(--paper); color: var(--brand-deep); box-shadow: 0 5px 0 #c9d4c2; }
.cta-band .deco { position: absolute; color: rgba(255,255,255,.14); }
.cta-band .deco.l { left: 26px; top: 20px; } .cta-band .deco.r { right: 30px; bottom: 16px; }

.visit { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 28px; align-items: start; margin-top: 8px; }
.visit p { margin: 0 0 8px; }
.visit .contact-list { display: grid; gap: 10px; }
.visit .contact-list div { display: flex; gap: 10px; align-items: center; }
.visit .contact-list .ic { color: var(--brand); }

/* ขอบคลื่น */
.wave { display: block; width: 100%; height: 56px; }
.wave-bottom { position: absolute; left: 0; right: 0; bottom: -1px; z-index: 2; }

/* ลำดับขั้นการจอง */
.steps { display: flex; gap: 0; flex-wrap: wrap; margin: 0 0 18px; font-size: 14.5px; counter-reset: s; font-family: var(--display); }
.steps span { counter-increment: s; display: inline-flex; align-items: center; gap: 8px; padding: 0 18px 0 0; color: var(--muted); }
.steps span::before { content: counter(s); width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--line); color: var(--ink-2); font-size: 13px; font-weight: 600; }
.steps span.on { color: var(--ink); }
.steps span.on::before { background: var(--brand); color: #fff; }
.steps span.done::before { background: var(--brand-soft); color: var(--brand-deep); }
.qr-box { text-align: center; padding: 14px; background: var(--tint); border-radius: 18px; margin-bottom: 12px; }
.qr-box img { max-width: 220px; }
.area-site .card { border-radius: 24px; border-color: var(--line-2); }
.stay-summary h2 { font-size: 26px; }

.site-footer { position: relative; background: var(--brand-night); color: #c6d0c0; margin-top: 80px; }
.site-footer .wave { position: absolute; left: 0; right: 0; top: -55px; }
.footer-in { max-width: 1140px; margin: 0 auto; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 24px; padding: 34px max(16px, env(safe-area-inset-right, 0px)) 22px max(16px, env(safe-area-inset-left, 0px)); font-size: 14px; }
.footer-in b { color: #fff; font-family: var(--display); font-weight: 500; font-size: 15px; }
.footer-in p { margin: 6px 0 0; }
.site-footer .logo { color: #fff; }
.footer-copy { text-align: center; font-size: 12.5px; padding: 14px 16px 22px; border-top: 1px solid rgba(255,255,255,.08); color: #93a08f; }

/* หน้าเข้าสู่ระบบ */
.auth-wrap { min-height: calc(100vh - 300px); display: flex; align-items: center; justify-content: center; padding: 20px 0; }
.auth-card { width: 100%; max-width: 440px; padding: 30px 30px 24px; border-radius: 28px; box-shadow: var(--shadow-lg); }
.auth-card .logo { color: var(--ink); margin-bottom: 18px; }
.auth-card h1 { font-size: 30px; margin-bottom: 4px; }
.auth-card .lead { color: var(--muted); margin: 0 0 14px; }
.auth-card .btn { width: 100%; height: 48px; margin-top: 16px; }
.demo-accounts { margin-top: 18px; font-size: 13px; background: var(--tint); border-radius: 16px; padding: 12px 14px; color: var(--ink-2); }
.demo-accounts code { font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; }

/* ---------- ลูกเล่นหน้าแรก ---------- */
/* เปิดหน้า: ขึ้นทีละส่วน (เริ่มจากมองเห็นอยู่แล้วบางส่วน ไม่ซ่อนเนื้อหา) */
@keyframes rise { from { opacity: .25; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes drop-in { from { opacity: .3; transform: rotate(2deg) translateY(26px) scale(.97); } to { opacity: 1; transform: rotate(-2.2deg); } }
@keyframes pop { 0% { transform: scale(.6) rotate(-8deg); opacity: .3; } 70% { transform: scale(1.08) rotate(2deg); opacity: 1; } 100% { transform: scale(1) rotate(0); } }
@keyframes draw { from { stroke-dashoffset: 420; } to { stroke-dashoffset: 0; } }
@keyframes sway { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }
@keyframes drift { 0%, 100% { transform: translate(0, 0) rotate(0deg); } 50% { transform: translate(8px, -14px) rotate(14deg); } }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes glow { 0%, 100% { opacity: .35; } 50% { opacity: .85; } }

.hero-in > div:first-child > * { animation: rise .7s cubic-bezier(.2, .8, .2, 1) both; }
.hero-in > div:first-child > :nth-child(2) { animation-delay: .08s; }
.hero-in > div:first-child > :nth-child(3) { animation-delay: .16s; }
.hero-in > div:first-child > :nth-child(4) { animation-delay: .24s; }
.hero-in > div:first-child > :nth-child(5) { animation-delay: .32s; }

/* รูปบ้านแบบโพลารอยด์ เอียงนิด มีเทปแปะ */
.hero-photo.tilt { overflow: visible; background: transparent; box-shadow: none; aspect-ratio: auto; }
.polaroid { position: relative; background: var(--paper); padding: 14px 14px 46px; border-radius: 20px; box-shadow: var(--shadow-lg); transform: rotate(-2.2deg);
  animation: drop-in .9s .15s cubic-bezier(.2, .8, .2, 1) both; transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
.polaroid:hover { transform: rotate(0deg) translateY(-4px); }
.polaroid .frame { position: relative; aspect-ratio: 5 / 4; border-radius: 12px; overflow: hidden; background: var(--brand-soft); }
.polaroid .frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.polaroid .caption { position: absolute; left: 0; right: 0; bottom: 12px; text-align: center; font-family: var(--hand); font-weight: 600; color: var(--ink-2); font-size: 16px; }
.polaroid .tape { position: absolute; top: -12px; left: 50%; width: 110px; height: 26px; margin-left: -55px; background: rgba(232, 226, 205, .82); transform: rotate(-3deg); box-shadow: 0 1px 2px rgba(0,0,0,.06); border-radius: 3px; }
.hero-photo.tilt .web-badge { top: 30px; right: -14px; animation: pop .6s .75s cubic-bezier(.2, .8, .2, 1) both; border-radius: 16px; }

/* ใบไม้ลอย */
.leaf { position: absolute; z-index: 0; color: var(--leaf); pointer-events: none; animation: drift 7s ease-in-out infinite; }
.leaf.l1 { top: 96px; right: 44%; width: 26px; animation-duration: 8s; }
.leaf.l2 { bottom: 120px; right: 6%; width: 34px; color: var(--brand-2); animation-duration: 9.5s; animation-delay: -2s; }
.leaf.l3 { top: 160px; right: 3%; width: 20px; color: var(--tile); opacity: .7; animation-duration: 6.5s; animation-delay: -4s; }

/* ต้นไม้ในภาพลายเส้นแกว่ง + ไฟหน้าต่าง */
.art-aframe .sway-l, .art-aframe .sway-r { transform-box: fill-box; animation: sway 4.5s ease-in-out infinite; }
.art-aframe .sway-l { transform-origin: 50% 100%; }
.art-aframe .sway-r { transform-origin: 50% 100%; animation-delay: -2.2s; }
.art-aframe .glow { animation: glow 3.2s ease-in-out infinite; }

/* เส้นใต้แบบวาดมือ */
.squiggle { position: relative; display: inline-block; white-space: nowrap; }
.squiggle svg { position: absolute; left: -2%; right: -2%; bottom: -10px; width: 104%; height: 16px; overflow: visible; }
.squiggle path { stroke: var(--tile); stroke-width: 5; fill: none; stroke-linecap: round; stroke-dasharray: 420; animation: draw 1.1s .55s cubic-bezier(.5, 0, .2, 1) both; }

/* แถบข้อความเลื่อน */
.ribbon { position: relative; margin: 46px calc(50% - 50vw) 0; overflow: hidden; background: var(--brand-soft); border-block: 1px solid var(--tint-2); transform: rotate(-1deg); }
.ribbon-track { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.ribbon:hover .ribbon-track { animation-play-state: paused; }
.ribbon span { display: inline-flex; align-items: center; gap: 14px; padding: 12px 22px; font-family: var(--display); font-size: 17px; color: var(--brand-deep); white-space: nowrap; }
.ribbon span::after { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--tile); margin-left: 22px; }

/* จำนวนคืนในกล่องค้นห้อง */
.nights { display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-deep); font-family: var(--display); font-size: 14px; transition: transform .2s; }
.nights.bump { transform: scale(1.12); }

/* โผล่ตอนเลื่อนถึง (เปิดใช้เมื่อสคริปต์ทำงาน) */
.js-reveal .reveal { opacity: .2; transform: translateY(26px); transition: opacity .7s cubic-bezier(.2, .8, .2, 1), transform .7s cubic-bezier(.2, .8, .2, 1); }
.js-reveal .reveal.in { opacity: 1; transform: none; }
.perks .perk.reveal:nth-child(2) { transition-delay: .08s; } .perks .perk.reveal:nth-child(3) { transition-delay: .16s; } .perks .perk.reveal:nth-child(4) { transition-delay: .24s; }

/* ไมโครอินเทอแรกชัน */
.room-photo img { transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.room-card:hover .room-photo img { transform: scale(1.04); }
.room-card { transition: box-shadow .25s, transform .25s; }
.room-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.perk { transition: transform .25s, box-shadow .25s; }
.perk:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.perk .dot { transition: transform .35s cubic-bezier(.2, .8, .2, 1.6); }
.perk:hover .dot { transform: rotate(-10deg) scale(1.08); }
.cta-band .deco { animation: drift 9s ease-in-out infinite; }
.cta-band .deco.r { animation-delay: -4s; }

/* ---------- จอเล็ก ---------- */
@media (max-width: 960px) {
  .perks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-in { grid-template-columns: 1fr; gap: 28px; }
  .hero h1 { font-size: 44px; }
}
@media (max-width: 900px) {
  .menu-btn { display: inline-flex; }
  .sidenav { transform: translateX(-100%); transition: transform .22s cubic-bezier(.2, .8, .2, 1); box-shadow: var(--shadow-lg); }
  body.nav-open .sidenav { transform: none; }
  body.nav-open .nav-scrim { display: block; position: fixed; inset: 0; background: rgba(30, 40, 30, .4); z-index: 25; }
  .admin-shell { margin-left: 0; }
  .topbar { padding: 0 16px; }
  .admin-main { padding: 20px 16px 48px; }
  .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .user-meta { display: none; }
  .room-card { grid-template-columns: 1fr; }
  .room-photo { min-height: 220px; }
}
@media (max-width: 640px) {
  .g2, .g3, .g4, .footer-in, .visit, .perks { grid-template-columns: 1fr; }
  .board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-header { padding-top: 8px; }
  .site-header-in { border-radius: 24px; padding: 8px 12px; }
  .site-nav { font-size: 13.5px; }
  .site-nav a:not(.btn) { padding: 5px 9px; }
  .hero { margin-top: -110px; padding-top: 140px; padding-bottom: 100px; }
  .hero h1 { font-size: 34px; }
  .squiggle { white-space: normal; }
  .leaf.l1 { display: none; }
  .polaroid { padding: 10px 10px 40px; }
  .hero-photo.tilt .web-badge { right: -6px; }
  .ribbon span { font-size: 15px; padding: 10px 16px; }
  .hero-lede { font-size: 15.5px; }
  .hero-facts { border-radius: 18px; }
  .search-card { padding: 14px; border-radius: 22px; }
  .search-card .btn { width: 100%; }
  .sec-head { margin-top: 48px; }
  .sec-head h2 { font-size: 27px; }
  .room-body { padding: 22px 20px; }
  .room-body h3 { font-size: 24px; }
  .cta-band { padding: 36px 20px; border-radius: 26px; }
  .cta-band h2 { font-size: 25px; }
  .kpi .value { font-size: 22px; }
  .card { padding: 16px; }
  .auth-card { padding: 24px 18px; }
  .area-site h1 { font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } .js-reveal .reveal { opacity: 1; transform: none; } .squiggle path { stroke-dasharray: none; } }

/* ---------- พิมพ์ / PDF ---------- */
@media print {
  .topbar, .sidenav, .nav-scrim, .no-print, .site-header, .site-footer, form.no-print, .wave { display: none !important; }
  .admin-shell { margin: 0; }
  .admin-main { padding: 0; max-width: none; }
  body { background: #fff; font-size: 12px; }
  .card, .kpi { border: 0; padding: 0; box-shadow: none; break-inside: avoid; }
}

/* สไลด์รูปห้อง (การ์ดห้อง) + จัดการรูปหลังบ้าน — 24 ต.ค. 2569 */
[hidden] { display: none !important; }
.room-photo .gal { position: absolute; inset: 0; }
.room-photo .gal img { transition: transform .4s; }
.room-photo .slider-btn { position: absolute; top: 50%; z-index: 2; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.9); color: var(--ink); font-size: 26px; line-height: 1; cursor: pointer; box-shadow: 0 3px 10px rgba(0,0,0,.16); display: flex; align-items: center; justify-content: center; padding: 0 0 3px; }
.room-photo .slider-btn:hover { background: #fff; }
.room-photo .slider-btn.prev { left: 12px; } .room-photo .slider-btn.next { right: 12px; }
.room-photo .gal-count { position: absolute; right: 14px; bottom: 12px; z-index: 2; background: rgba(0,0,0,.5); color: #fff; font-size: 12.5px; padding: 2px 10px; border-radius: 999px; }
.room-photo .hand-tag { z-index: 2; }
.polaroid .frame img { transition: opacity .4s; }
.amenities { list-style: none; margin: 2px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.amenities li { font-size: 13px; padding: 3px 11px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-deep); }
.ph-slot { padding: 14px 0; border-top: 1px solid var(--line-2); }
.ph-slot h3 { margin: 0 0 10px; font-size: 16px; }
.ph-grid { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; }
.ph-item { margin: 0; width: 150px; }
.ph-item img { width: 150px; height: 100px; object-fit: cover; border-radius: 10px; display: block; border: 1px solid var(--line); }
.ph-item.first img { border: 3px solid var(--brand); }
.ph-item figcaption { display: flex; gap: 4px; margin-top: 6px; flex-wrap: wrap; align-items: center; }
.ph-item figcaption .btn { padding: 4px 9px; font-size: 12px; }
.ph-add { margin: 0; }
.ph-pick { width: 150px; height: 100px; border: 2px dashed var(--line); border-radius: 10px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--brand-deep); font-weight: 600; margin: 0; }
.ph-pick:hover { border-color: var(--brand); background: var(--brand-soft); }
.ph-pick input { display: none; }
.ph-preview { width: 220px; }
.ph-preview img { width: 220px; height: 146px; object-fit: cover; border-radius: 10px; display: block; border: 3px dashed var(--brand-2, var(--brand)); }
.ph-preview .ph-note { margin: 6px 0; }

/* แผนผังห้องจริง (หลังบ้าน) — 27 ต.ค. 2569 */
.seg { display: inline-flex; background: var(--brand-soft); border-radius: 999px; padding: 3px; margin: 0 0 12px; }
.seg button { border: 0; background: transparent; padding: 6px 16px; border-radius: 999px; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.seg button.on { background: var(--paper); color: var(--brand-deep); box-shadow: 0 1px 4px rgba(0,0,0,.1); }
.site-map-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.site-map { position: relative; min-width: 640px; aspect-ratio: 735 / 625; background: #f6f8f4; border: 2px solid var(--line); border-radius: 16px;
  background-image: linear-gradient(var(--line-2) 1px, transparent 1px), linear-gradient(90deg, var(--line-2) 1px, transparent 1px); background-size: 5% 5%; }
.map-room { position: absolute; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; text-decoration: none;
  background: var(--cs); border: 2px solid var(--c); border-radius: 10px; color: var(--ink); padding: 2px; overflow: hidden; transition: transform .12s, box-shadow .12s; }
.map-room:hover, .map-room:focus-visible { transform: scale(1.06); box-shadow: var(--shadow-lg); z-index: 2; color: var(--ink); }
.map-room b { font-size: clamp(15px, 2.2vw, 22px); line-height: 1.1; }
.map-room span { font-size: 11px; font-weight: 600; color: var(--c); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* หน้า "ห้องและโซน": สีตามประเภทห้อง */
.rt-0 { --c: #2f7a55; --cs: #e3f2e9; } .rt-1 { --c: #1a6fc4; --cs: #e3effa; } .rt-2 { --c: #b0601c; --cs: #fbeee2; }
.rt-3 { --c: #6a44c2; --cs: #efe9fb; } .rt-4 { --c: #0f8f83; --cs: #ddf3f0; } .rt-5 { --c: #a2366a; --cs: #fae8f0; }
.rt-off { --c: #9aa7b1; --cs: #f1f3f5; }
.map-room.rt-off, .room.rt-off { border-style: dashed; opacity: .75; }
.table-wrap tr { scroll-margin-top: 90px; }
.row-flash td { background: var(--brand-soft); transition: background .3s; }
.sm-zone { position: absolute; display: flex; align-items: center; justify-content: center; font-size: 12.5px; color: var(--muted); border-radius: 8px; }
.sm-park { background: repeating-linear-gradient(90deg, #e9ece6 0 26px, #dfe3dc 26px 28px); }
.sm-office { background: #efe7dc; border: 1.5px dashed #c9b8a2; color: #8a6d4f; text-align: center; padding: 4px; }
.sm-label { position: absolute; transform: translateX(-50%); font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.sm-gate { color: var(--danger); font-weight: 700; }
.sm-compass { position: absolute; font-size: 12px; font-weight: 700; color: var(--muted); }

/* เลือกห้องตอนจอง (หน้าเว็บลูกค้า) */
.unit-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; margin: 10px 0 6px; }
.unit { position: relative; border: 2px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--paper); cursor: pointer; display: flex; flex-direction: column; }
.unit:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.unit input { position: absolute; top: 10px; left: 10px; z-index: 3; width: 20px; height: 20px; accent-color: var(--brand); }
.unit .room-photo { min-height: 130px; }
.unit .u-body { padding: 10px 12px 12px; font-size: 13.5px; }
.unit .u-body b { font-size: 16px; }
.unit .u-body p { margin: 4px 0 0; color: var(--ink-2); }
.unit.auto { justify-content: center; align-items: center; text-align: center; padding: 18px; min-height: 120px; }
.room-units { display: flex; flex-wrap: wrap; gap: 6px; }
.room-units .js-photo { width: 52px; height: 40px; border-radius: 8px; overflow: hidden; position: relative; }
.room-units .js-photo img { width: 100%; height: 100%; object-fit: cover; }
.room-units .js-photo span { position: absolute; inset: auto 0 0; background: rgba(0,0,0,.55); color: #fff; font-size: 10.5px; text-align: center; }

/* เลือกห้องจากแผนผัง (หน้าจอง) — 27 ต.ค. 2569 */
.picker { margin-bottom: 18px; }
.picker-head { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.picker-head h2 { margin: 0; }
.picker-head p { margin: 2px 0 0; }
.picker-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.picker input[type=radio] { position: absolute; opacity: 0; pointer-events: none; }
.pick-auto { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px; border: 2px solid var(--line); border-radius: 999px; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--ink-2); background: var(--paper); margin: 0; }
.pick-auto::before { content: ''; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line); }
.pick-auto.on { border-color: var(--brand); color: var(--brand-deep); background: var(--brand-soft); }
.pick-auto.on::before { border-color: var(--brand); background: var(--brand); box-shadow: inset 0 0 0 2px #fff; }
.site-map-pick { min-width: 460px; }
.pick-room { position: absolute; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 10px; font-weight: 700; font-size: clamp(14px, 1.7vw, 19px); line-height: 1.1; margin: 0; user-select: none; }
.pick-room small { font-size: 10.5px; font-weight: 600; }
.pick-room.free { background: #fff; border: 2px solid var(--brand); color: var(--brand-deep); cursor: pointer; box-shadow: 0 2px 0 var(--brand-soft); transition: transform .12s, background .12s; }
.pick-room.free:hover { transform: translateY(-2px); background: var(--brand-soft); }
.pick-room.free:has(input:focus-visible) { outline: 3px solid var(--brand-2, var(--brand)); outline-offset: 2px; }
.pick-room.free.on { background: var(--brand); color: #fff; box-shadow: 0 4px 12px rgba(0,0,0,.18); transform: scale(1.06); z-index: 2; }
.pick-room.taken { background: #eceeea; border: 2px dashed #c8ccc4; color: #a3a99f; }
.pick-room.other { background: transparent; border: 1.5px solid #dcdfd8; color: #c3c8bf; font-size: 13px; font-weight: 600; }
.pick-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; color: var(--ink-2); }
.pick-legend .lg::before { content: ''; display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 6px; vertical-align: -1px; }
.lg.free::before { background: #fff; border: 2px solid var(--brand); } .lg.on::before { background: var(--brand); }
.lg.taken::before { background: #eceeea; border: 2px dashed #c8ccc4; } .lg.other::before { border: 1.5px solid #dcdfd8; }
.pick-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.pick-chip { position: relative; display: flex; flex-direction: column; gap: 2px; border: 2px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--paper); cursor: pointer; margin: 0; padding-bottom: 8px; text-align: center; }
.pick-chip img { width: 100%; height: 86px; object-fit: cover; display: block; margin-bottom: 6px; }
.pick-chip b { font-size: 15px; } .pick-chip small { color: var(--muted); }
.pick-chip.on { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.pick-chip.taken { opacity: .45; cursor: default; }
.picker-preview { border-radius: 20px; overflow: hidden; border: 1px solid var(--line-2); background: var(--paper); box-shadow: var(--shadow); position: sticky; top: 90px; }
.picker-preview .room-photo { min-height: 0; aspect-ratio: 4 / 3; }
.pv-body { padding: 14px 16px 16px; }
.pv-body b { font-size: 20px; font-family: var(--display); }
.pv-body p { margin: 6px 0 0; color: var(--ink-2); }
@media (max-width: 860px) {
  .picker-grid { grid-template-columns: 1fr; }
  .picker-preview { position: static; }
}
@media (max-width: 860px) {
  .picker-grid { grid-template-columns: minmax(0, 1fr); }
  .site-map-pick { min-width: 0; }
  .pick-room small { display: none; }
  .pick-room { border-radius: 7px; font-size: 13px; }
  .pick-room.other { font-size: 10.5px; }
  .site-map-pick .sm-zone, .site-map-pick .sm-label { font-size: 9.5px; }
  .picker-head .pick-auto { width: 100%; justify-content: center; }
}

/* เสียงแจ้งเตือน + ตรวจรูปก่อนส่ง — 27 ต.ค. 2569 */
.side-btn { width: 100%; background: none; border: 0; font: inherit; text-align: left; cursor: pointer; }
.side-btn.off { opacity: .55; }
.side-btn[hidden] { display: none !important; }
.alert-toasts { position: fixed; right: 16px; bottom: 16px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; max-width: min(360px, calc(100vw - 32px)); }
.alert-toast { display: grid; gap: 2px; padding: 14px 18px; border-radius: 16px; background: #2f4a32; color: #fff; text-decoration: none; box-shadow: 0 10px 30px rgba(0,0,0,.25);
  transform: translateY(20px); opacity: 0; transition: transform .3s, opacity .3s; border-left: 5px solid #e2a76f; }
.alert-toast.show { transform: none; opacity: 1; }
.alert-toast:hover { color: #fff; background: #3a5a3d; }
.alert-toast b { font-size: 13px; opacity: .85; } .alert-toast span { font-size: 15px; font-weight: 600; } .alert-toast small { opacity: .7; }
.upload-note { display: flex; align-items: center; gap: 10px; margin: 6px 0 2px; font-size: 13px; color: var(--ok, #157a4a); }
.upload-note img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.upload-note.bad { color: var(--danger, #b42318); font-weight: 600; }

/* แถบเว็บทดลอง (SITE_PREVIEW) */
.preview-bar { position: relative; z-index: 60; background: #b45309; color: #fff; text-align: center; font-size: 13.5px; font-weight: 600; padding: 7px 16px; line-height: 1.4; }

/* คำขออนุมัติจากผู้จัดการ (admin_approvals.php, 11 พ.ย. 2569) */
.side-count { margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: 999px; background: #d9534f; color: #fff; font-size: 12px; line-height: 20px; text-align: center; }
.st-ok { background: var(--ok-soft); color: var(--ok); } .st-no { background: var(--danger-soft); color: var(--danger); }
.appr-mode label { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.appr-mode input[type=checkbox] { width: 20px; height: 20px; margin-top: 3px; flex: 0 0 auto; }
.appr-card { margin-bottom: 12px; }
.appr-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.appr-title { font-size: 16.5px; }
.appr-details { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 10px 0 4px; padding: 10px 12px; background: var(--tint); border-radius: var(--radius-sm); font-size: 14px; }
.appr-details dt { color: var(--muted); } .appr-details dd { margin: 0; overflow-wrap: anywhere; }
.appr-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 10px; }
.appr-reject { display: flex; gap: 8px; flex: 1 1 280px; }
.appr-reject input { flex: 1; min-width: 0; }
.appr-warn { color: var(--danger); }
.appr-banner a { font-weight: 600; }
@media (max-width: 560px) { .appr-details { grid-template-columns: 1fr; } .appr-details dd { margin-bottom: 6px; } }
