/* ==========================================================
   MSH จองห้องพิเศษ — Lavender Theme (public pages)
   ========================================================== */
:root {
  --lav-25: #fcfaff;
  --lav-50: #f7f3ff;
  --lav-100: #efe8ff;
  --lav-200: #e2d6fb;
  --lav-300: #cbb7f3;
  --lav-400: #ad93e6;
  --lav-500: #9174d6;
  --lav-600: #7a5cc4;
  --lav-700: #6247a6;
  --lav-800: #4a3680;
  --ink: #2b2341;
  --ink-2: #4d4566;
  --muted: #7c7495;
  --line: #e8e1f6;
  --gold: #c6a56b;
  --danger: #d6456b;
  --success: #2f9e77;
  --warning: #d9952b;
  --radius-lg: 22px;
  --radius: 14px;
  --shadow-sm: 0 2px 8px rgba(74, 54, 128, .06);
  --shadow: 0 10px 30px rgba(74, 54, 128, .10);
  --shadow-lg: 0 24px 60px rgba(74, 54, 128, .16);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  font-family: 'Prompt', 'Sarabun', system-ui, sans-serif;
  font-weight: 300;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 100% -10%, rgba(203, 183, 243, .35), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(226, 214, 251, .45), transparent 60%),
    var(--lav-25);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6 { font-weight: 500; color: var(--ink); }
a { color: var(--lav-700); }
a:hover { color: var(--lav-800); }
::selection { background: var(--lav-300); color: var(--ink); }

/* ---------- Navbar ---------- */
.msh-nav {
  position: sticky; top: 0; z-index: 1030;
  background: rgba(255, 255, 255, .78);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid rgba(203, 183, 243, .45);
  padding: .65rem 0;
}
.msh-brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; }
.msh-brand-mark {
  width: 42px; height: 42px; border-radius: 13px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--lav-400), var(--lav-700));
  color: #fff; font-size: 1.25rem;
  box-shadow: 0 6px 16px rgba(122, 92, 196, .35);
}
.msh-brand-text { line-height: 1.15; }
.msh-brand-text strong { display: block; font-weight: 600; color: var(--ink); font-size: 1.08rem; }
.msh-brand-text small { color: var(--muted); font-size: .78rem; letter-spacing: .02em; }
.msh-nav .nav-link {
  color: var(--ink-2); font-weight: 400; padding: .5rem .9rem !important;
  border-radius: 999px; transition: all .2s ease;
}
.msh-nav .nav-link:hover, .msh-nav .nav-link.active { color: var(--lav-700); background: var(--lav-100); }
.navbar-toggler { border: 0; }
.navbar-toggler:focus { box-shadow: 0 0 0 3px var(--lav-200); }

/* ---------- Buttons ---------- */
.btn { font-weight: 400; border-radius: 999px; padding: .6rem 1.35rem; transition: all .2s ease; }
.btn-lav {
  color: #fff; border: 0;
  background: linear-gradient(135deg, var(--lav-500), var(--lav-700));
  box-shadow: 0 8px 20px rgba(122, 92, 196, .32);
}
.btn-lav:hover, .btn-lav:focus { color: #fff; transform: translateY(-1px); box-shadow: 0 12px 26px rgba(122, 92, 196, .42); }
.btn-lav-soft { color: var(--lav-700); background: var(--lav-100); border: 1px solid var(--lav-200); }
.btn-lav-soft:hover { color: var(--lav-800); background: var(--lav-200); }
.btn-ghost-light { color: #fff; border: 1px solid rgba(255, 255, 255, .6); background: rgba(255, 255, 255, .12); backdrop-filter: blur(6px); }
.btn-ghost-light:hover { color: var(--lav-800); background: #fff; }
.btn-outline-lav { color: var(--lav-700); border: 1px solid var(--lav-300); background: #fff; }
.btn-outline-lav:hover { color: #fff; background: var(--lav-600); border-color: var(--lav-600); }
.btn-lg { padding: .8rem 1.8rem; font-size: 1.05rem; }

/* ---------- Hero ---------- */
.hero { padding: 2.5rem 0 0; }
.hero-frame {
  position: relative; border-radius: 28px; overflow: hidden;
  box-shadow: var(--shadow-lg); isolation: isolate;
  border: 6px solid #fff; background: #fff;
}
.hero-frame::after {
  content: ""; position: absolute; inset: -40px -40px auto auto; width: 180px; height: 180px; z-index: -1;
  border-radius: 50%; background: var(--lav-200); filter: blur(30px);
}
.hero-frame .carousel-item img { width: 100%; aspect-ratio: 21 / 10; object-fit: cover; display: block; border-radius: 22px; }
.hero-content { display: flex; flex-direction: column; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: .45rem; align-self: flex-start;
  font-size: .85rem; padding: .35rem .85rem; border-radius: 999px;
  background: #fff; border: 1px solid var(--lav-200); color: var(--lav-700);
  box-shadow: var(--shadow-sm); margin-bottom: 1.1rem;
}
.hero-content h1 { font-weight: 600; font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.2; margin-bottom: .9rem; letter-spacing: -.01em; }
.hero-content h1 span {
  background: linear-gradient(90deg, var(--lav-500), var(--lav-800));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-content p { color: var(--ink-2); font-size: clamp(.98rem, 1.5vw, 1.1rem); margin-bottom: 1.6rem; max-width: 30em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.page-hero .hero-eyebrow { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .3); color: #fff; box-shadow: none; }
.hero-frame .carousel-indicators { z-index: 4; margin-bottom: 1.1rem; }
.hero-frame .carousel-indicators [data-bs-target] { width: 26px; height: 4px; border-radius: 4px; border: 0; }
.hero-frame .carousel-control-prev, .hero-frame .carousel-control-next { z-index: 4; width: 7%; }

.hero-stats { position: relative; z-index: 5; margin-top: 2.2rem; }
.stat-chip {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 1.1rem 1.25rem; display: flex; gap: .9rem; align-items: center;
  box-shadow: var(--shadow); height: 100%;
}
.stat-chip .ic {
  flex: 0 0 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  background: var(--lav-100); color: var(--lav-700); font-size: 1.35rem;
}
.stat-chip b { display: block; font-weight: 500; color: var(--ink); }
.stat-chip span { color: var(--muted); font-size: .88rem; }

/* ---------- Sections ---------- */
.section { padding: 4.5rem 0 1rem; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 2.2rem; }
.section-kicker {
  display: inline-block; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--lav-600); background: var(--lav-100); padding: .3rem .8rem; border-radius: 999px; margin-bottom: .75rem; font-weight: 500;
}
.section-head h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin-bottom: .5rem; }
.section-head p { color: var(--muted); margin: 0; }

.lux-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); padding: 1.6rem; height: 100%;
  transition: transform .25s ease, box-shadow .25s ease;
}
.lux-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.rule-num {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  font-weight: 600; font-size: 1.15rem; color: #fff; margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--lav-400), var(--lav-700));
  box-shadow: 0 6px 14px rgba(122, 92, 196, .28);
}
.lux-card h5 { font-size: 1.05rem; margin-bottom: .4rem; }
.lux-card p { color: var(--ink-2); margin: 0; }
.lux-card u { text-decoration-color: var(--lav-400); text-underline-offset: 4px; }

.notice {
  display: flex; gap: .9rem; align-items: flex-start;
  background: linear-gradient(135deg, #fff7fa, #fdf2ff);
  border: 1px solid #f3d3e2; border-radius: var(--radius); padding: 1rem 1.2rem; color: #8a2f55;
}
.notice i { font-size: 1.3rem; line-height: 1.2; color: var(--danger); }

.consent-box {
  margin-top: 1.4rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 1.25rem 1.4rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem;
  box-shadow: var(--shadow-sm);
}
.consent-box .q { font-weight: 500; display: flex; align-items: center; gap: .6rem; }
.consent-box .q i { color: var(--lav-600); font-size: 1.3rem; }

/* Pill radio */
.pill-group { display: inline-flex; flex-wrap: wrap; gap: .5rem; }
.pill-radio { position: relative; }
.pill-radio input { position: absolute; opacity: 0; pointer-events: none; }
.pill-radio label {
  display: inline-flex; align-items: center; gap: .45rem; cursor: pointer;
  padding: .55rem 1.1rem; border-radius: 999px; border: 1.5px solid var(--lav-200);
  color: var(--ink-2); background: var(--lav-25); transition: all .18s ease; user-select: none; margin: 0; font-weight: 400;
}
.pill-radio label::before {
  content: ""; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--lav-300); background: #fff; transition: all .18s ease;
}
.pill-radio input:checked + label { border-color: var(--lav-600); background: var(--lav-100); color: var(--lav-800); }
.pill-radio input:checked + label::before { border: 5px solid var(--lav-600); }
.pill-radio input:focus-visible + label { box-shadow: 0 0 0 4px var(--lav-200); }
.pill-radio.danger input:checked + label { border-color: var(--danger); background: #fff1f5; color: #9e2a4d; }
.pill-radio.danger input:checked + label::before { border-color: var(--danger); }

.how-card { display: flex; gap: 1.1rem; }
.how-card .ic {
  flex: 0 0 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; font-size: 1.6rem;
  background: var(--lav-100); color: var(--lav-700);
}
.how-card .tag { font-size: .8rem; color: var(--lav-700); background: var(--lav-50); border: 1px solid var(--lav-200); padding: .15rem .6rem; border-radius: 999px; }

/* ---------- Booking form ---------- */
.booking-wrap {
  position: relative; border-radius: 30px; overflow: hidden; box-shadow: var(--shadow-lg);
  background: #fff; border: 1px solid var(--line);
}
.booking-side {
  position: relative; color: #fff; padding: 2.2rem; height: 100%; min-height: 260px;
  background:
    linear-gradient(160deg, rgba(74, 54, 128, .88), rgba(145, 116, 214, .78)),
    url("../image/msh2.jpg") center/cover no-repeat;
}
.booking-side h3 { color: #fff; font-weight: 600; }
.booking-side p { color: rgba(255, 255, 255, .85); }
.booking-side ul { list-style: none; padding: 0; margin: 1.5rem 0 0; }
.booking-side li { display: flex; gap: .7rem; align-items: flex-start; margin-bottom: .9rem; color: rgba(255, 255, 255, .92); }
.booking-side li i { color: var(--lav-200); font-size: 1.1rem; }
.booking-body { padding: clamp(1.4rem, 3.5vw, 2.6rem); }

.step { padding: 1.4rem 0; border-bottom: 1px dashed var(--line); }
.step:first-child { padding-top: 0; }
.step:last-of-type { border-bottom: 0; }
.step-title { display: flex; align-items: center; gap: .75rem; margin-bottom: 1rem; }
.step-no {
  flex: 0 0 34px; height: 34px; border-radius: 11px; display: grid; place-items: center;
  background: var(--lav-100); color: var(--lav-700); font-weight: 600; font-size: .95rem;
}
.step-title h5 { margin: 0; font-size: 1.05rem; }
.step-title small { color: var(--muted); font-weight: 300; }

.form-label { font-size: .9rem; color: var(--ink-2); font-weight: 400; margin-bottom: .35rem; }
.form-label .req { color: var(--danger); }
.form-control, .form-select {
  border-radius: 12px; border: 1.5px solid var(--line); background-color: var(--lav-25);
  padding: .7rem .95rem; font-family: inherit; font-weight: 300; color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.form-control::placeholder { color: #a9a2bf; }
.form-control:focus, .form-select:focus {
  border-color: var(--lav-500); background-color: #fff; box-shadow: 0 0 0 4px rgba(173, 147, 230, .25);
}
.input-icon { position: relative; }
.input-icon > i { position: absolute; left: .95rem; top: 50%; transform: translateY(-50%); color: var(--lav-500); pointer-events: none; }
.input-icon > .form-control, .input-icon > .form-select { padding-left: 2.6rem; }
.form-hint { font-size: .82rem; color: var(--muted); margin-top: .35rem; }

.form-actions { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: flex-end; padding-top: 1.5rem; border-top: 1px solid var(--line); margin-top: .5rem; }
.btn-reset { color: var(--muted); background: transparent; border: 1px solid var(--line); }
.btn-reset:hover { color: var(--danger); border-color: #f1c4d3; background: #fff5f8; }

.consent-off {
  text-align: center; padding: 3rem 1.5rem; background: #fff; border: 1px dashed var(--lav-300);
  border-radius: var(--radius-lg); color: var(--muted);
}
.consent-off i { font-size: 2.2rem; color: var(--lav-400); }

/* ---------- Check page ---------- */
.page-hero {
  margin-top: 1.5rem; border-radius: 28px; padding: clamp(2rem, 5vw, 3.5rem);
  background:
    radial-gradient(600px 300px at 90% 0%, rgba(255, 255, 255, .25), transparent 60%),
    linear-gradient(135deg, var(--lav-500), var(--lav-800));
  color: #fff; box-shadow: var(--shadow-lg); position: relative; overflow: hidden;
}
.page-hero::after {
  content: ""; position: absolute; right: -60px; bottom: -80px; width: 280px; height: 280px; border-radius: 50%;
  background: rgba(255, 255, 255, .08);
}
.page-hero h1 { color: #fff; font-weight: 600; font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
.page-hero p { color: rgba(255, 255, 255, .85); margin-bottom: 1.5rem; }
.search-bar {
  position: relative; z-index: 2; display: flex; gap: .5rem; background: #fff; padding: .45rem; border-radius: 999px;
  max-width: 560px; box-shadow: 0 12px 30px rgba(43, 26, 92, .25);
}
.search-bar .form-control { border: 0; background: transparent; border-radius: 999px; padding-left: 1.2rem; }
.search-bar .form-control:focus { box-shadow: none; }
.search-bar .btn { white-space: nowrap; flex: 0 0 auto; }
.search-bar i.lead-ic { align-self: center; padding-left: .9rem; color: var(--lav-600); font-size: 1.15rem; }

.result-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; }
.result-card .head { padding: 1.1rem 1.4rem; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.table-lav { margin: 0; }
.table-lav thead th {
  background: var(--lav-50); color: var(--ink-2); font-weight: 500; font-size: .88rem;
  border-bottom: 1px solid var(--line); padding: .9rem 1rem; white-space: nowrap;
}
.table-lav td { padding: .95rem 1rem; vertical-align: middle; border-color: var(--line); color: var(--ink); }
.table-lav tbody tr:hover td { background: var(--lav-25); }

.status-pill {
  display: inline-flex; align-items: center; gap: .4rem; padding: .32rem .8rem; border-radius: 999px;
  font-size: .82rem; font-weight: 500; white-space: nowrap;
}
.status-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.st-pending { background: #fff1f5; color: #c23a62; }
.st-accept { background: #fff7e8; color: #b7781a; }
.st-admit { background: #e9f8f1; color: #23845f; }
.st-other { background: var(--lav-100); color: var(--lav-700); }

.empty-state { text-align: center; padding: 3rem 1.5rem; color: var(--muted); }
.empty-state .ic { width: 72px; height: 72px; border-radius: 22px; margin: 0 auto 1rem; display: grid; place-items: center; background: var(--lav-100); color: var(--lav-600); font-size: 2rem; }

/* ---------- Footer ---------- */
.msh-footer { margin-top: 5rem; padding: 2.2rem 0; background: #fff; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
.msh-footer a { color: var(--lav-700); text-decoration: none; }

/* ---------- Reveal animation ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
  .reveal.in { opacity: 1; transform: none; }
}

@media (max-width: 991.98px) {
  .msh-nav .navbar-collapse { padding: .75rem 0; }
  .hero { padding-top: 1.5rem; }
}
@media (max-width: 575.98px) {
  .hero-frame { border-radius: 20px; }
  .hero-content { max-width: 100%; }
  .booking-wrap { border-radius: 22px; }
  .form-actions .btn { flex: 1 1 100%; }
}
