/* =====================================================
   DALAT CLICK — Design tokens v2
   Giao diện app di động kiểu Facebook, nền sáng,
   logo chữ ký, feed dạng story + post
   ===================================================== */
:root {
  --white: #ffffff;
  --page-bg: #f0f2f5;
  --active-bg: #e8f5e9;
  --ink-900: #1c1e21;
  --ink-600: #65676b;
  --ink-400: #90949c;
  --forest-800: #16281f;
  --forest-700: #1f3d2e;
  --forest-600: #2f5c44;
  --forest-500: #3c7355;
  --amber-500: #e3a857;
  --clay-600: #b5652e;
  --promo-featured-red: #e5384d;
  --promo-highlighted-purple: #8b5cf6;
  --border: #e4e6e9;
  --border-strong: #dadde1;
  --heart-red: #f3425f;
  --radius-card: 10px;
  --radius-pill: 5px;
  --shadow-card: 0 1px 2px rgba(0,0,0,.08);
  --font-script: "Dancing Script", cursive;
  --font-body: "Inter", -apple-system, "Segoe UI", sans-serif;
  --font-display: "Inter", -apple-system, "Segoe UI", sans-serif;
  --font-heading: var(--font-display);

  /* Alias bổ sung - các trang quản trị (admin/*) đã lỡ dùng những tên biến
     này (--pine-800, --mist-300, --ink-500, --ink-700, --forest-100) từ
     trước mà KHÔNG được khai báo ở đây, khiến CSS âm thầm hỏng (biến không
     tồn tại thì trình duyệt bỏ qua thuộc tính, ra màu/viền mặc định sai) -
     khai báo lại đúng 1 lần ở đây để mọi nơi đã dùng tự động đúng màu, không
     phải sửa lại từng trang. */
  --pine-800: var(--forest-800);
  --mist-300: #d7dbe2;
  --ink-500: #7d818a;
  --ink-700: #4a4d52;
  --forest-100: #e3f0e8;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; padding: 0;
  background: var(--page-bg);
  font-family: var(--font-body);
  color: var(--ink-900);
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { font-family: var(--font-body); }

/* ---------- Twemoji (footer.php tự động thay MỌI ký tự emoji bằng thẻ
   <img class="emoji">) - BẮT BUỘC phải có rule này thì ảnh emoji mới co
   đúng theo cỡ chữ xung quanh (1em). Twemoji KHÔNG tự chèn kích thước cho
   ảnh - thiếu rule này ảnh sẽ hiện nguyên kích thước gốc của file SVG (to
   bất thường, phá vỡ toàn bộ layout xung quanh, đúng lỗi đã gặp). Dùng
   "em" (không phải px cố định) để tự động khớp với mọi ngữ cảnh cỡ chữ
   khác nhau trong app (chữ thường 14-15px, icon to trong màn hình trống
   40px...), y hệt hành vi ký tự emoji gốc trước đây. */
img.emoji { display: inline-block; height: 1em; width: 1em; margin: 0 .05em 0 .1em; vertical-align: -0.1em; }

/* App shell: giới hạn bề rộng như đang xem trên điện thoại,
   nhưng vẫn responsive tốt trên desktop */
.app-shell {
  max-width: 470px;
  margin: 0 auto;
  background: var(--page-bg);
  min-height: 100vh;
  position: relative;
  padding-bottom: 70px; /* chừa chỗ cho bottom tab bar */
}
/* Độ rộng thật của .app-shell trên desktop RỘNG (≥992px) do khung 3 cột
   (.page-shell-3col) bên dưới quyết định, không còn max-width cố định ở
   đây - xem khối "KHUNG 3 CỘT DESKTOP" cuối file. */

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 90;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px;
}
.topbar .icon-btn {
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: var(--ink-900); background: transparent; border: none; cursor: pointer;
  position: relative;
}
.topbar .icon-btn:active { background: var(--page-bg); }
.topbar .icon-group { display: flex; gap: 4px; align-items: center; }
.topbar-search-label { display: none; } /* mobile: chỉ hiện icon tròn như cũ, chữ chú thích CHỈ hiện trên desktop (xem @media 992px) */

/* Dropdown tìm kiếm ngay tại header - xổ ra tại chỗ, không rời trang. Định vị
   TƯƠNG ĐỐI theo .topbar-search-wrap (bọc quanh nút + dropdown) để dropdown
   luôn bám đúng dưới nút, dùng được cả mobile lẫn desktop. */
.topbar-search-wrap { position: relative; }
.topbar-search-dropdown {
  display: none; position: absolute; top: calc(100% + 8px); left: 0; width: 320px; max-width: 90vw;
  background: var(--white); border-radius: 14px; border: 1px solid var(--border);
  box-shadow: 0 8px 28px rgba(0,0,0,.15); z-index: 400; overflow: hidden;
}
.topbar-search-dropdown.show { display: block; }
.topbar-search-dropdown-input-row {
  display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--border);
}
.topbar-search-dropdown-input-row input { flex: 1; border: none; outline: none; font-size: 14px; font-family: var(--font-body); }
#topbarSearchResults { max-height: 360px; overflow-y: auto; padding: 6px; }
.topbar-search-empty { padding: 16px 12px; text-align: center; font-size: 12.5px; color: var(--ink-500); }
.topbar-search-group-title { font-size: 11px; font-weight: 700; color: var(--ink-500); text-transform: uppercase; letter-spacing: .3px; padding: 8px 10px 4px; }
.topbar-search-result-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px;
  text-decoration: none; color: var(--ink-900); font-size: 13.5px; font-weight: 600;
}
.topbar-search-result-item:hover { background: var(--page-bg); }
.topbar-search-result-item > img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.topbar-search-viewall {
  display: block; text-align: center; padding: 10px; margin-top: 4px; border-top: 1px solid var(--border);
  font-size: 12.5px; font-weight: 700; color: var(--forest-700); text-decoration: none;
}
.topbar-search-viewall:hover { text-decoration: underline; }

.badge-dot {
  position: absolute; top: 6px; right: 6px;
  width: 8px; height: 8px; border-radius: 50%; background: var(--heart-red);
  border: 1.5px solid var(--white);
}
.brand-logo { text-align: left; line-height: 1; }
.brand-logo .script {
  font-family: var(--font-script);
  font-size: 26px; font-weight: 700; color: var(--forest-700);
  display: block; margin-bottom: -2px;
}
.brand-logo .caption {
  font-size: 10px; letter-spacing: 4px; color: var(--ink-600); font-weight: 600;
}
/* "dalat.click" cạnh logo - CHỈ hiện trên desktop rộng (mobile giữ nguyên
   logo gọn như cũ, không đủ chỗ để thêm chữ). Đỡ trống trải bên trái khi
   logo đứng lẻ loi trên nền desktop rộng. */
.brand-logo-domain { display: none; }

/* ---------- Composer bar (Bạn đang nghĩ gì?) - CÓ nền trắng (khung thẻ),
   khác với hàng Story bên dưới (KHÔNG có nền trắng - xem .stories). ---------- */
.composer {
  background: var(--white);
  margin: 0 10px 12px;
  padding: 12px 14px 6px;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.composer-row { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; background-size: cover; background-position: center;
  background-color: var(--border-strong); flex-shrink: 0; display: inline-block;
}
.composer-input {
  flex: 1; background: var(--page-bg); border-radius: 20px; padding: 9px 16px;
  color: var(--ink-400); font-size: 14.5px;
}
.composer-actions {
  display: flex; justify-content: space-between; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--border);
  overflow-x: auto; scrollbar-width: none;
}
.composer-actions::-webkit-scrollbar { display: none; }
.composer-actions .action {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 5px; white-space: nowrap;
  font-size: 12px; color: var(--ink-600); padding: 8px 4px; font-weight: 600;
}

/* ---------- Stories row - dạng thẻ NHỎ GỌN giống Facebook thật (KHÔNG có
   nền trắng bọc ngoài - khác với .composer phía trên) ---------- */
.stories-wrap { position: relative; }
.stories-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%;
  background: #fff; border: 1px solid var(--border-strong); box-shadow: 0 1px 4px rgba(0,0,0,.15);
  display: flex; align-items: center; justify-content: center; font-size: 16px; cursor: pointer; z-index: 5;
  color: var(--ink-900);
}
.stories-arrow.left { left: 4px; }
.stories-arrow.right { right: 4px; }
.stories {
  display: flex; gap: 6px; overflow-x: auto; padding: 4px 10px 10px;
  margin: 0; background: transparent; border: none; box-shadow: none;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
}
.stories::-webkit-scrollbar { display: none; }

.fb-story-card {
  position: relative; flex-shrink: 0; width: 84px; height: 140px; border-radius: 10px;
  overflow: hidden; background-size: cover; background-position: center; background-color: #ddd;
  text-decoration: none; display: block; scroll-snap-align: start;
  box-shadow: 0 1px 3px rgba(0,0,0,.12);
}
.fb-story-bg { width: 100%; height: 100%; object-fit: cover; display: block; }
.fb-story-text {
  position: absolute; inset: 8px 6px 30px; z-index: 1; display: flex; align-items: center; justify-content: center;
}
.fb-story-text span {
  color: #fff; font-weight: 700; font-size: 12.5px; line-height: 1.35; text-align: center;
  text-shadow: 0 1px 4px rgba(0,0,0,.45); word-break: break-word;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical;
}
.fb-story-gradient {
  position: absolute; left: 0; right: 0; bottom: 0; height: 65%; pointer-events: none;
  background: linear-gradient(to top, rgba(0,0,0,.68), rgba(0,0,0,0) 70%);
}
.fb-story-play-icon {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.85); font-size: 18px; z-index: 1;
}
.fb-story-avatar-badge {
  position: absolute; top: 6px; left: 6px; width: 24px; height: 24px; border-radius: 50%;
  border: 2px solid #fff; overflow: hidden; background: #fff; z-index: 2;
}
.fb-story-avatar-badge::before {
  content: ''; position: absolute; inset: -3px; border-radius: 50%; z-index: -1;
  background: conic-gradient(from 0deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888, #7b2ff7, #f09433);
  animation: storyRingSpin 5s linear infinite;
}
@keyframes storyRingSpin { to { transform: rotate(360deg); } }
.fb-story-avatar-badge img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fb-story-name {
  position: absolute; bottom: 6px; left: 6px; right: 6px; color: #fff; font-size: 10.5px; font-weight: 700;
  text-shadow: 0 1px 3px rgba(0,0,0,.5); line-height: 1.25; z-index: 2;
  overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
/* Thẻ "Tạo tin" khi chưa có story nào - ảnh full thẻ, gradient tối phía dưới,
   chữ "Tạo tin" + nút "+" nằm HẲN BÊN TRONG thẻ (không lồi ra ngoài viền nữa -
   trước đây dùng translate(Y,50%) để lồi ra nhưng bị chính overflow:hidden của
   thẻ cắt cụt mất nửa dưới, trông như lỗi CSS - giờ đơn giản và chắc chắn hơn) */
.fb-story-card.add-card { display: flex; flex-direction: column; }
.fb-story-card.add-card .fb-story-bg { height: 100%; }
.fb-story-card.add-card .fb-story-add-label {
  position: absolute; bottom: 8px; left: 4px; right: 4px; text-align: center; color: #fff;
  font-size: 10.5px; font-weight: 700; text-shadow: 0 1px 3px rgba(0,0,0,.5); z-index: 2;
}
.fb-story-card.add-card .fb-story-add-btn {
  position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%);
  width: 24px; height: 24px; border-radius: 50%; background: #1877F2; color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 800;
  line-height: 1; border: 2.5px solid #fff; z-index: 3; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.3);
}

/* Thẻ "Đăng nhập để xem/tạo tin" khi chưa đăng nhập - thiết kế chủ đích, không phải khung trống lỗi CSS */
.fb-story-card.login-card {
  background: linear-gradient(160deg, #2f5c44, #1a3d2c); display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; padding: 12px; gap: 8px;
}
.fb-story-login-icon { font-size: 20px; }
.fb-story-login-text { color: #fff; font-size: 10.5px; font-weight: 600; line-height: 1.3; }

/* ---------- Feed post card (mỗi căn = 1 bài đăng) ---------- */
.feed-section-title {
  font-size: 13px; color: var(--ink-600); font-weight: 700; padding: 14px 14px 6px; letter-spacing: .3px;
}
.post {
  background: var(--white);
  margin: 0 10px 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  overflow: hidden;
  padding-bottom: 4px;
}

/* ---------- Bài viết CHÍNH THỨC từ sàn (đăng tự động lên tường từ Bản tin
   admin soạn - xem admin/announcements.php, tuỳ chọn "Đăng lên tường") -
   PHẢI trông khác hẳn bài viết thường để không ai giả mạo/bắt chước được:
   viền gradient vàng-đen sang trọng (không dùng màu thường của app), dải
   ruy băng "khiên bảo vệ" phía trên card, dấu tick xanh dương cạnh tên.
   QUAN TRỌNG: những style này chỉ thật sự CÓ Ý NGHĨA khi đi kèm điều kiện
   kiểm tra Ở SERVER (post.id có nằm trong bảng platform_announcements hay
   không - xem render_full_post_card() trong social_widgets.php) - ai đó
   dù có sao chép y hệt đoạn HTML/CSS này để tự dựng 1 bài viết giả, bài đó
   VẪN KHÔNG NẰM trong bảng platform_announcements nên hệ thống sẽ không tự
   thêm class/badge này vào - kẻ giả mạo phải tự tay chèn thủ công, và
   phần lớn người dùng có thể phát hiện qua việc bấm vào xem chi tiết
   "Bản tin từ sàn" thật ở /announcements.php để đối chiếu. */
.post-official-announcement {
  border: 2px solid transparent;
  background:
    linear-gradient(var(--white), var(--white)) padding-box,
    linear-gradient(135deg, #f5c451, #1a1a2e 45%, #f5c451) border-box;
  box-shadow: 0 6px 24px rgba(26,26,46,.16);
}
.post-official-ribbon {
  background: linear-gradient(135deg, #1a1a2e, #2d2d54);
  color: #f5c451; font-weight: 800; font-size: 11.5px; letter-spacing: .6px;
  padding: 9px 16px; display: flex; align-items: center; gap: 7px;
  margin: -1px -1px 0;
}
.post-official-check { margin-left: 3px; filter: drop-shadow(0 0 1px rgba(0,0,0,.15)); }
.post-official-announcement .post-head { padding-top: 14px; }
.post-official-content p, .post-official-content div { margin: 0 0 8px; }
.post-official-content ul, .post-official-content ol { padding-left: 20px; margin: 0 0 8px; }

.post-head {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px 8px;
}
.post-head .meta { flex: 1; }
.post-head .page-name { font-size: 14.5px; font-weight: 700; color: var(--ink-900); }
.quick-msg-icon {
  display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%;
  background: var(--page-bg); font-size: 11.5px; text-decoration: none; margin-left: 4px; vertical-align: middle;
  transition: background-color .12s ease, transform .1s ease;
}
.quick-msg-icon:hover { background: #eaf3ee; transform: scale(1.1); }
.post-head .timestamp { font-size: 12px; color: var(--ink-600); }
.post-head .more {
  color: var(--ink-600); font-size: 20px; padding: 0; margin-left: auto;
  width: 32px; height: 32px; border-radius: 50%;
  background: transparent; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; line-height: 1;
  transition: background-color .15s ease, color .15s ease;
}
.post-head .more:hover, .post-head .more:focus-visible { background: var(--page-bg); color: var(--ink-900); }
.post-head .more:active { background: var(--border); }
.post-head div.more { cursor: default; }
.post-head div.more:hover { background: transparent; }
.post-text {
  padding: 0 15px 15px; font-size: 14px; line-height: 1.55; color: var(--ink-900);
}
.post-media {
  position: relative; width: 100%; aspect-ratio: 4/3; background-size: cover; background-position: center;
}
/* Placeholder DÙNG CHUNG khi villa CHƯA có ảnh nào - áp dụng đồng nhất cho
   MỌI nơi hiện ảnh villa (trang chủ .post-media, trang chi tiết .hero-photo,
   trang Khám phá .explore-card-media) - trước đây mỗi nơi tự xử lý 1 kiểu
   khác nhau (có nơi xanh lá đậm không chữ, có nơi xanh lá đậm có chữ, có nơi
   xám trơn không icon) trông thiếu chủ đích, như lỗi hiển thị. Giờ dùng
   ĐÚNG 1 kiểu: nền be-xám nhẹ nhàng chuyên nghiệp, icon 🏡 + chữ rõ ràng. */
.no-photo-placeholder {
  display: flex !important; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  background: linear-gradient(135deg, #eef1ec, #e2e7de) !important;
}
.no-photo-placeholder .npp-icon { font-size: 34px; opacity: .5; }
.no-photo-placeholder .npp-text { font-size: 12.5px; font-weight: 700; color: var(--forest-700); opacity: .75; }
.price-chip {
  position: absolute; right: 10px; bottom: 10px;
  background: rgba(15,17,20,.88); color: #fff; font-weight: 800; font-size: 13.5px;
  padding: 7px 13px; border-radius: 5px; box-shadow: 0 2px 8px rgba(0,0,0,.35); letter-spacing: .2px;
}
.post-stats {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 14px; font-size: 12px; color: var(--ink-600);
}
.post-actions {
  display: flex; border-top: none; margin: 0 14px;
}
.post-actions button {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 5px;
  background: none; border: none; padding: 4px 0 8px; font-size: 12.5px; font-weight: 600; color: var(--ink-600); cursor: pointer;
}
.post-cta {
  margin: 10px 14px 14px;
}
.post-cta a {
  display: block; text-align: center; background: linear-gradient(135deg, var(--forest-600), #059669); color: var(--white);
  padding: 11px; border-radius: 5px; font-weight: 700; font-size: 14px;
}

/* ---------- 2 nút "Liên hệ Sale/Host" + "Đặt phòng ngay" trên card villa -
   gọn hơn hẳn khối nút đơn cũ (.post-cta), 2 nút chia đôi 1 hàng. ---------- */
.post-cta-row { display: flex; gap: 8px; margin: 10px 14px 14px; }
.post-cta-btn {
  flex: 1; text-align: center; padding: 10px; border-radius: 5px;
  font-weight: 700; font-size: 13.5px;
}
.post-cta-btn-primary { background: linear-gradient(135deg, var(--forest-600), #059669); color: var(--white); }
.post-cta-btn-outline { background: var(--page-bg); color: var(--forest-700); border: 1.5px solid var(--border-strong); }

/* ---------- Khung "nội dung được chia sẻ" (giống Facebook Share-to-Feed) ---------- */
.shared-embed {
  display: block; border: 1px solid var(--border); border-radius: 12px;
  margin: 0 15px 15px; overflow: hidden; color: inherit; background: var(--white);
}
/* Bài viết CHÍNH THỨC từ sàn, khi bị chia sẻ lại bởi người khác - vẫn phải
   giữ nguyên dấu hiệu nhận biết (viền vàng-đen sang trọng, y hệt lúc xem
   bài gốc trực tiếp - xem .post-official-announcement) dù đang xem qua
   khung "chia sẻ lại", không để mất dấu hiệu xác thực khi bị share vòng
   qua nhiều người. */
.shared-embed-official {
  border: 2px solid transparent;
  background:
    linear-gradient(var(--white), var(--white)) padding-box,
    linear-gradient(135deg, #f5c451, #1a1a2e 45%, #f5c451) border-box;
}
.shared-embed-missing { padding: 14px; font-size: 13.5px; color: var(--ink-600); background: var(--page-bg); }
.shared-embed-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px 4px; }
.shared-embed-avatar { width: 24px; height: 24px; border-radius: 50%; background-size: cover; background-position: center; flex-shrink: 0; }
.shared-embed-name { font-weight: 700; font-size: 13.5px; }
.shared-embed-text {
  padding: 2px 12px 10px; font-size: 13.5px; color: var(--ink-600);
  overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  /* Giữ xuống dòng bằng CSS (pre-line) THAY VÌ chèn thẻ <br> thủ công qua
     nl2br() như trước - <br> là phần tử khối, xung đột với cách
     -webkit-line-clamp tự đếm dòng dựa vào chữ tự ngắt, khiến 1 số trình
     duyệt mobile (đặc biệt Chrome/WebView Android) tính sai chiều cao khối
     này (co lại bất thường), làm ảnh .shared-embed-thumb ngay bên dưới bị
     đẩy đè lên phần chữ. Bỏ nl2br() (xem includes/helpers.php) + thêm
     max-height CHẶN CỨNG dự phòng cho các trình duyệt không hỗ trợ tốt
     -webkit-line-clamp, để layout luôn ổn định dù trường hợp nào. */
  white-space: pre-line;
  line-height: 1.45; max-height: calc(1.45em * 3 + 4px);
  position: relative; z-index: 1;
}
.shared-embed-thumb { width: 100%; aspect-ratio: 16/10; background-size: cover; background-position: center; background-color: #ddd; margin-top: 0; position: relative; z-index: 0; }

/* Vùng bấm được (avatar/tên/tóm tắt) - .shared-embed giờ là <div> bọc ngoài
   (không còn là thẻ <a> như trước) vì bên trong còn có thêm gallery đầy đủ +
   thẻ villa gắn kèm, mỗi phần có link RIÊNG (bấm vào ảnh không nên nhảy
   sang bài gốc mà nên phóng to ảnh, xem render_post_media()). */
.shared-embed-link-area { display: block; text-decoration: none; color: inherit; }
/* Gallery ảnh/video ĐẦY ĐỦ của bài gốc - dùng chung layout với post-image-grid
   thật (render_post_media() tự áp class đó), chỉ bo góc dưới cho khớp khung
   chia sẻ (bo góc trên đã có ở .shared-embed-text/.shared-embed-head phía trên). */
.shared-embed-media { overflow: hidden; }
.share-preview-loading { padding: 30px 16px; text-align: center; color: var(--ink-500); font-size: 13px; }
/* Villa RICH lồng bên trong khung "chia sẻ lại bài viết" (bài gốc có gắn
   villa) - bỏ viền/bo góc/khoảng cách ngoài của thẻ villa con để không bị
   "viền đôi" xấu (2 lớp khung lồng nhau) - chỉ còn 1 khung ngoài cùng duy nhất. */
.shared-embed > .shared-embed-rich { border: none; border-radius: 0; margin: 10px 0 0; border-top: 1px solid var(--border); }
.shared-embed-media .post-image-grid { border-radius: 0; margin: 0; }

/* Thẻ villa THU GỌN gắn kèm bài gốc (nếu Sale/Host đăng bài kèm 1 villa cụ
   thể) - khác hẳn khung "chia sẻ villa trực tiếp" (đầy đủ giá/gallery/CTA
   đặt phòng), ở đây chỉ cần đủ để nhận diện + dẫn qua trang villa xem tiếp,
   tránh lặp lại quá nhiều thông tin trong 1 bài chia sẻ. */
.shared-embed-villa-mini {
  display: flex; align-items: center; gap: 10px; margin: 10px 12px 12px;
  padding: 8px; border-radius: 10px; background: var(--page-bg); text-decoration: none; color: inherit;
  border: 1px solid var(--border);
}
.shared-embed-villa-mini:hover { background: var(--active-bg); }
.shared-embed-villa-mini-thumb {
  width: 52px; height: 52px; border-radius: 8px; flex-shrink: 0;
  background-size: cover; background-position: center; background-color: #ddd;
}
.shared-embed-villa-mini-info { min-width: 0; }
.shared-embed-villa-mini-title { font-size: 13px; font-weight: 700; color: var(--ink-900); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shared-embed-villa-mini-sub { font-size: 11.5px; color: var(--ink-600); margin-top: 2px; }
.shared-embed-book-btn {
  display: block; text-align: center; background: linear-gradient(135deg, var(--forest-600), #059669); color: var(--white);
  font-weight: 700; font-size: 13.5px; padding: 10px; text-decoration: none;
}
/* Nút "Đặt phòng theo ưu đãi của Sale" - màu CAM riêng biệt (khác xanh lá
   của "Đặt phòng ngay" thông thường) để nổi bật đây là ưu đãi qua Sale,
   đúng mẫu tham khảo. */
.shared-embed-book-btn-sale { background: linear-gradient(135deg, var(--amber-500), #f59e0b); color: #4a2e00; }

/* ---------- Lịch trống/bận công khai (sidebar phải trang chi tiết villa) ---------- */
.side-calendar-card {
  background: var(--white); border: 1px solid var(--border); border-radius: 16px;
  padding: 14px; margin-bottom: 14px; box-shadow: 0 4px 20px rgba(0,0,0,.06);
}
.side-calendar-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.side-calendar-title { font-weight: 700; font-size: 14px; color: var(--ink-900); }
.side-calendar-nav {
  width: 26px; height: 26px; border-radius: 50%; background: var(--page-bg); color: var(--ink-900);
  display: flex; align-items: center; justify-content: center; font-size: 15px; text-decoration: none; font-weight: 700;
}
.side-calendar-nav:hover { background: var(--active-bg); }
.side-calendar-nav-disabled { opacity: .35; pointer-events: none; }
.side-calendar-weekdays, .side-calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.side-calendar-weekdays span { text-align: center; font-size: 10.5px; color: var(--ink-500); font-weight: 700; padding-bottom: 4px; }
.side-calendar-day {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border-radius: 8px;
  font-size: 11.5px; font-weight: 600; cursor: default;
}
.side-calendar-day.cal-free { background: var(--active-bg); color: var(--forest-700); }
.side-calendar-day.cal-booked { background: #fde8e8; color: #c0392b; text-decoration: line-through; }
.side-calendar-day.cal-locked { background: var(--page-bg); color: var(--ink-400); }
.side-calendar-day.cal-past { color: var(--ink-300); }
.side-calendar-legend { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; font-size: 10.5px; color: var(--ink-600); }
.side-calendar-dot { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 3px; vertical-align: middle; }
.side-calendar-dot.cal-free { background: var(--forest-500); }
.side-calendar-dot.cal-booked { background: #e2604f; }
.side-calendar-dot.cal-locked { background: var(--ink-300); }
/* ---------- Khung villa chi tiết (tiện ích + giá) ---------- */
.shared-embed-rich { margin: 0 15px 15px; border-radius: 12px; }
.shared-embed-body { padding: 15px; background: var(--page-bg); }
.shared-embed-rich .shared-embed-name { font-weight: 700; font-size: 16px; }
.shared-embed-details { font-size: 13px; color: var(--ink-700); margin-top: 6px; margin-bottom: 10px; line-height: 1.6; }
.shared-embed-amenities { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.shared-embed-amenity-chip { font-size: 12px; background: var(--active-bg); border-radius: 8px; padding: 4px 8px; color: var(--forest-800); font-weight: 600; }
.shared-embed-price { font-size: 15px; color: var(--forest-700); }

/* ---------- Modal "Chia sẻ" kiểu Facebook (soạn caption + xem trước nội dung gốc) ---------- */
.share-compose-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 600;
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.share-compose-box {
  background: var(--white); border-radius: 12px; width: 100%; max-width: 420px;
  max-height: 86vh; overflow-y: auto; display: flex; flex-direction: column;
}
.share-compose-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--border); font-weight: 800; font-size: 16px;
}
.share-compose-head button { background: none; border: none; font-size: 20px; cursor: pointer; color: var(--ink-600); line-height: 1; }
.share-compose-body { padding: 12px 16px 16px; }
.share-compose-user { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.share-compose-avatar { width: 34px; height: 34px; border-radius: 50%; background-size: cover; background-position: center; background-color: #ddd; }
.share-compose-user-name { font-weight: 700; font-size: 14px; }
.share-compose-audience { font-size: 12px; color: var(--ink-600); background: var(--page-bg); border-radius: 6px; padding: 1px 6px; display: inline-block; margin-top: 2px; }
.share-compose-textarea {
  width: 100%; border: none; outline: none; resize: none; font-family: var(--font-body);
  font-size: 15px; min-height: 70px; padding: 4px 0; box-sizing: border-box;
}
.share-compose-submit {
  width: 100%; background: var(--forest-600); color: var(--white); border: none;
  border-radius: 5px; padding: 11px; font-weight: 700; font-size: 14.5px; margin-top: 10px; cursor: pointer;
}
.share-compose-submit:disabled { opacity: .6; cursor: default; }

/* ---------- Trang Khám phá: thẻ villa chuyên nghiệp + bộ lọc ---------- */
.explore-search-bar { display: flex; gap: 10px; padding: 12px 10px 8px; }
/* #exploreSearchForm chỉ tồn tại để GOM dữ liệu gửi đi (name/value các input
   ẩn), KHÔNG được phép chen vào giữa luồng flex - display:contents loại bỏ
   hẳn form khỏi cây bố cục (children của nó render như thể là con TRỰC TIẾP
   của .explore-search-bar), nhờ đó flex:1 trên .explore-search-input-wrap
   mới thật sự có tác dụng (trước đây form là con trực tiếp của flex container,
   còn input-wrap chỉ là cháu - flex:1 đặt sai cấp nên vô hiệu, để lại khoảng
   trống trước nút Bộ lọc). */
#exploreSearchForm { display: contents; }
.explore-search-input-wrap {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; background: var(--page-bg);
  border: none; border-radius: 8px; padding: 10px 15px;
}
.explore-search-input-wrap input { flex: 1; min-width: 0; border: none; outline: none; font-size: 15px; font-family: var(--font-body); background: none; }
.explore-filter-btn {
  position: relative; white-space: nowrap; flex-shrink: 0; background: var(--active-bg); color: var(--forest-800);
  border: 1px solid var(--forest-600); border-radius: 10px; padding: 0 20px; font-weight: 600; font-size: 14px; cursor: pointer;
  display: flex; align-items: center; gap: 8px; transition: background-color .15s ease;
}
.explore-filter-btn:hover { background: #dcefe2; }
.explore-filter-dot { position: absolute; top: 6px; right: 8px; width: 7px; height: 7px; background: var(--amber-500); border-radius: 50%; }

.explore-sort-row { display: flex; gap: 10px; overflow-x: auto; padding: 0 14px 10px; scrollbar-width: none; }
.explore-sort-row::-webkit-scrollbar { display: none; }
.explore-sort-chip {
  white-space: nowrap; font-size: 13px; font-weight: 500; padding: 8px 16px;
  border-radius: 5px; border: 1px solid var(--border-strong); color: var(--ink-900); background: var(--page-bg);
}
.explore-sort-chip.active { background: var(--active-bg); color: var(--forest-800); border-color: var(--forest-600); }

.explore-result-count { padding: 0 14px 8px; font-size: 12.5px; color: var(--ink-600); }
.explore-result-count a { color: var(--forest-700); font-weight: 700; }

/* ---------- Banner quảng cáo ngang trên trang Khám phá - CHỈ MOBILE ----------
   Trên desktop, quảng cáo đã hiện ngay lập tức ở cột phải (.global-sidebar-right)
   nên ẩn hẳn banner này để tránh trùng lặp/rối mắt. Trên mobile, cột phải bị
   gộp vào menu ☰ ẩn (khách phải tự mở mới thấy) - banner này bù lại, đặt
   ngay trên đầu kết quả (trước "Đề xuất"/"Nổi bật") để khách thấy NGAY như
   trải nghiệm desktop. */
.mobile-explore-ad-banner { display: none; }
@media (max-width: 991px) {
  .mobile-explore-ad-banner { display: block; }
}
.mobile-ad-item {
  border-radius: 14px; margin: 0 14px 10px; overflow: hidden;
  background: linear-gradient(135deg, #fff7e6, #fffdf7);
  border: 1.5px solid #f5c97a;
}
.mobile-ad-item-link {
  display: flex; align-items: center; gap: 12px; padding: 12px; text-decoration: none; color: inherit;
}
.mobile-ad-item-img {
  flex-shrink: 0; width: 68px; height: 68px; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.mobile-ad-item-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mobile-ad-item-body { flex: 1; min-width: 0; }
.mobile-ad-item-body .gsb-sponsored-badge { margin-bottom: 4px; color: #c2410c; }
/* Emoji "📢" nhấp nháy nhẹ để mắt tự động chú ý đây là quảng cáo - rõ ràng,
   bắt mắt hơn hẳn chữ tĩnh, nhưng vẫn nhẹ nhàng (không giật giật gây khó chịu). */
.mobile-ad-item-body .gsb-sponsored-badge .ad-pulse-icon {
  display: inline-block; animation: adPulseIcon 1.6s ease-in-out infinite;
}
@keyframes adPulseIcon {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.25); opacity: .7; }
}
.mobile-ad-item-title {
  font-weight: 700; font-size: 14.5px; color: var(--ink-900); line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.mobile-ad-item-caption { font-size: 12.5px; color: var(--ink-800); line-height: 1.4; margin-top: 3px; }
.mobile-ad-item-sub { font-size: 12.5px; color: var(--ink-600); margin-top: 3px; }
.mobile-ad-item-arrow {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; background: rgba(224,36,94,.1);
  color: #e0245e; font-size: 18px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}

.explore-grid { display: flex; flex-direction: column; gap: 14px; padding: 4px 14px 16px; }
.explore-section-header {
  font-family: var(--font-display); font-size: 15px; font-weight: 800; color: var(--ink-900);
  margin: 18px 0 2px; padding-top: 4px;
}
.explore-section-header:first-child { margin-top: 0; }
.explore-card-promo-badge {
  position: absolute; top: 10px; left: 10px; font-size: 11px; font-weight: 800;
  padding: 4px 10px; border-radius: 20px; box-shadow: 0 2px 6px rgba(0,0,0,.25);
}
.explore-card-promo-featured { background: var(--promo-featured-red); color: #fff; }
.explore-card-promo-highlighted { background: var(--promo-highlighted-purple); color: #fff; }
.explore-filters-container { background: var(--white); border-radius: 12px; padding: 15px; box-shadow: 0 1px 3px rgba(0,0,0,.1); margin: 8px 0 14px; }
.explore-filters-container .explore-search-bar { padding: 0; margin-bottom: 15px; }
.explore-filters-container .explore-sort-row { padding: 0; }

/* Hàng chọn nhanh loại hình lưu trú - chip cuộn ngang kiểu Airbnb.
   TRƯỚC ĐÂY ẩn hẳn thanh cuộn (scrollbar-width:none) khiến máy bàn dùng
   CHUỘT THƯỜNG (không phải trackpad/cảm ứng) HOÀN TOÀN không có cách nào
   cuộn ngang được - không có gì để kéo, lăn chuột dọc không có tác dụng.
   Giờ: thêm 2 nút mũi tên trái/phải (chỉ hiện trên màn hình rộng, ẩn trên
   di động vì đã vuốt tay được rồi) + JS chuyển lăn chuột DỌC thành cuộn
   NGANG khi rê chuột qua hàng này - cách chuẩn phổ biến cho carousel ngang
   trên desktop. */
.explore-category-wrap { position: relative; margin-top: 16px; padding-top: 4px; border-top: 1px solid var(--border); }
.explore-category-row {
  display: flex; gap: 8px; overflow-x: auto; padding: 10px 4px 10px; margin: 0;
  scroll-behavior: smooth; scrollbar-width: none;
}
/* Thanh cuộn MẢNH, gần như vô hình lúc bình thường - chỉ rõ nét hơn 1 chút
   khi rê chuột qua (đủ để biết "kéo được" nếu cần), không phải thanh cuộn
   mặc định dày/thô của trình duyệt. Chrome/Safari/Edge dùng ::-webkit-*,
   Firefox dùng scrollbar-width (không chỉnh màu riêng được nên để "none" và
   dựa vào 2 nút mũi tên + cuộn chuột cho trình duyệt đó). */
.explore-category-row::-webkit-scrollbar { height: 4px; }
.explore-category-row::-webkit-scrollbar-track { background: transparent; }
.explore-category-row::-webkit-scrollbar-thumb { background: transparent; border-radius: 4px; }
.explore-category-wrap:hover .explore-category-row::-webkit-scrollbar-thumb { background: var(--border-strong); }
.explore-category-row:hover::-webkit-scrollbar-thumb { background: var(--forest-400, #8fb39d); }
.explore-category-nav-btn {
  display: none; position: absolute; top: 55%; transform: translateY(-50%);
  width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--border-strong);
  background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.12); cursor: pointer; z-index: 2;
  align-items: center; justify-content: center; font-size: 14px; color: var(--ink-700);
}
.explore-category-nav-btn:hover { background: var(--page-bg); }
.explore-category-nav-prev { left: -6px; }
.explore-category-nav-next { right: -6px; }
@media (min-width: 900px) {
  .explore-category-nav-btn { display: flex; }
}
.explore-category-chip {
  display: flex; flex-direction: column; align-items: center; gap: 4px; flex-shrink: 0;
  padding: 8px 12px; border-radius: 12px; border: 1.5px solid transparent; background: none;
  cursor: pointer; font-size: 11px; font-weight: 600; color: var(--ink-600); font-family: var(--font-body);
  transition: border-color .15s, color .15s;
}
.explore-category-chip:hover { color: var(--ink-900); }
.explore-category-chip.active { border-color: var(--forest-700); color: var(--forest-800); background: #f0f7f2; }
.explore-category-chip-icon { font-size: 20px; }
.explore-card {
  display: flex; flex-direction: column; background: var(--white); border-radius: 12px;
  overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.1); transition: transform .2s, box-shadow .2s;
}
.explore-card:hover { transform: translateY(-4px); box-shadow: 0 8px 16px rgba(0,0,0,.1); }
.explore-card-media { position: relative; width: 100%; aspect-ratio: 16/10; background-size: cover; background-position: center; background-color: #ddd; }
/* ---------- Nhãn giá trên ảnh đại diện villa - kiểu "deal giá nóng"
   (gradient cam-đỏ bắt mắt + emoji lửa + hiệu ứng nhấp nháy nhẹ) thay cho
   nền đen chữ trắng cũ (Từ 5.000.000đ/đêm) nhìn cũ kỹ, thiếu điểm nhấn.
   Tự tôn trọng "prefers-reduced-motion" - tắt hẳn animation cho người dùng
   đã bật cài đặt hạn chế chuyển động của hệ điều hành. */
.explore-card-price-badge {
  position: absolute; left: 10px; bottom: 10px;
  background: linear-gradient(135deg, #ff6b35, #f7931e); color: #fff;
  font-size: 12.5px; font-weight: 600; padding: 7px 13px 7px 10px; border-radius: 20px;
  display: inline-flex; align-items: center; gap: 4px;
  box-shadow: 0 4px 14px rgba(247,147,30,.45), 0 0 0 2px rgba(255,255,255,.18) inset;
  animation: priceBadgePulse 2.4s ease-in-out infinite;
}
.explore-card-price-badge::before { content: '🔥'; font-size: 12.5px; line-height: 1; }
.explore-card-price-badge b { font-size: 14.5px; font-weight: 800; margin: 0 1px; }
@keyframes priceBadgePulse {
  0%, 100% { transform: scale(1); box-shadow: 0 4px 14px rgba(247,147,30,.45), 0 0 0 2px rgba(255,255,255,.18) inset; }
  50% { transform: scale(1.04); box-shadow: 0 6px 20px rgba(247,147,30,.6), 0 0 0 2px rgba(255,255,255,.3) inset; }
}
@media (prefers-reduced-motion: reduce) {
  .explore-card-price-badge { animation: none; }
}
.explore-card-body { padding: 15px; display: flex; flex-direction: column; flex: 1; }
.explore-card-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.explore-card-title { font-weight: 700; font-size: 16px; margin: 0; line-height: 1.3; color: var(--ink-900); }
.explore-card-rating { flex-shrink: 0; font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.explore-card-rating span { color: var(--ink-600); font-weight: 400; }
.explore-card-category-pill {
  display: inline-flex; align-self: flex-start; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 700; color: var(--forest-700); background: var(--forest-100, #eaf3ee);
  padding: 3px 10px; border-radius: 20px; margin-bottom: 8px;
}
.explore-card-loc {
  font-size: 12.5px; color: var(--ink-600); margin-bottom: 12px;
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px;
}
.explore-card-loc span {
  display: inline-flex; align-items: flex-start; gap: 4px;
  white-space: normal; word-break: break-word; max-width: 100%;
}
.explore-card-specs { display: flex; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--ink-900); font-weight: 500; margin-bottom: 15px; padding-bottom: 15px; border-bottom: 1px solid var(--border); }
.explore-card-amenities { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.explore-amenity-chip { font-size: 11px; background: var(--page-bg); color: var(--ink-600); font-weight: 500; padding: 4px 8px; border-radius: 5px; }

.explore-empty { text-align: center; padding: 50px 24px; }

/* ---------- Bộ lọc dạng bottom sheet ---------- */
.filter-sheet-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 600; display: none; align-items: flex-end; }
.filter-sheet-overlay.show { display: flex; }
.filter-sheet-box { background: var(--white); width: 100%; max-height: 82vh; overflow-y: auto; overflow-x: hidden; border-radius: 16px 16px 0 0; }
.filter-sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--border); font-weight: 800; font-size: 16px; position: sticky; top: 0; background: var(--white); }
.filter-sheet-head button { background: none; border: none; font-size: 20px; cursor: pointer; color: var(--ink-600); }
.filter-sheet-body { padding: 14px 16px 20px; }
.filter-section-title { font-weight: 700; font-size: 13.5px; margin: 16px 0 8px; }
.filter-section-title:first-child { margin-top: 0; }
.filter-price-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.filter-price-row input {
  flex: 1 1 0; min-width: 0; width: 0; padding: 10px 10px; border: 1px solid var(--border-strong);
  border-radius: 8px; font-size: 14px; font-family: var(--font-body); box-sizing: border-box;
}
.filter-price-row span { flex-shrink: 0; color: var(--ink-400); }
.filter-chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-chip { cursor: pointer; }
.filter-chip input { position: absolute; opacity: 0; width: 0; height: 0; }
.filter-chip span {
  display: inline-block; font-size: 12.5px; font-weight: 600; padding: 7px 12px;
  border-radius: 8px; border: 1px solid var(--border-strong); color: var(--ink-700);
  transition: border-color .15s ease, background-color .15s ease;
}
.filter-chip:hover span { border-color: var(--forest-500); }
.filter-chip input:checked + span { background: var(--active-bg); color: var(--forest-800); border-color: var(--forest-600); }
.filter-chip small { opacity: .8; font-weight: 400; }
.filter-apply-btn {
  width: 100%; margin-top: 18px; background: var(--active-bg); color: var(--forest-800); border: 1px solid var(--forest-600);
  border-radius: 10px; padding: 13px; font-weight: 700; font-size: 15px; cursor: pointer;
  transition: background-color .15s ease;
}
.filter-apply-btn:hover { background: #dcefe2; }
.mb-filter-text-input {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: 8px;
  font-size: 14px; font-family: var(--font-body); box-sizing: border-box;
}

/* ---------- Trang "Đặt phòng của tôi" ---------- */
.mb-list { display: flex; flex-direction: column; gap: 14px; padding: 0 14px 20px; }
.mb-card {
  display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-card); overflow: hidden; box-shadow: var(--shadow-card); text-decoration: none; color: inherit;
}
.mb-card-top-row { display: flex; gap: 12px; padding: 12px; }
.mb-card-media { width: 76px; height: 76px; flex-shrink: 0; border-radius: 10px; background-size: cover; background-position: center; background-color: #ddd; }
.mb-card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.mb-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.mb-card-title { font-weight: 800; font-size: 15px; line-height: 1.3; min-width: 0; overflow-wrap: break-word; }
.mb-status-badge { flex-shrink: 0; font-size: 10.5px; font-weight: 700; border: 1px solid; border-radius: 8px; padding: 3px 9px; white-space: nowrap; }
.mb-card-code { font-size: 12px; color: var(--ink-600); word-break: break-all; }
.mb-card-dates { font-size: 12.5px; color: var(--ink-700); }
.mb-card-source { font-size: 12px; color: var(--ink-600); }
.mb-card-price { font-size: 15px; font-weight: 800; color: var(--forest-700); margin-top: 2px; }
.mb-card-review-row { border-top: 1px solid var(--border); padding: 10px 12px; background: var(--page-bg); }

.mb-partner-toolbar { display: flex; align-items: center; gap: 10px; padding: 12px 14px 8px; flex-wrap: wrap; }
.mb-partner-count { font-size: 12.5px; color: var(--ink-600); }
.mb-clear-link { font-size: 12.5px; color: var(--forest-700); font-weight: 700; margin-left: auto; }

/* Tab chuyển "Đơn khách hàng" / "Đơn của chính tôi" - dạng segmented control
   bo tròn trong 1 khung nền xám, tab đang chọn nổi hẳn lên nền trắng + đổ
   bóng nhẹ, thay cho kiểu 2 nút phẳng cũ (inline style, không đồng bộ với
   phong cách pill/chip đang dùng khắp app). */
.mb-view-tabs {
  display: flex; gap: 3px; margin: 0 16px 14px; padding: 3px;
  background: var(--page-bg); border-radius: 14px; border: 1px solid var(--border);
}
.mb-view-tab {
  flex: 1; text-align: center; padding: 9px 10px; border-radius: 10px;
  font-size: 12.5px; font-weight: 700; text-decoration: none; color: var(--ink-600);
  transition: background-color .15s, color .15s, box-shadow .15s;
}
.mb-view-tab.active { background: var(--white); color: var(--forest-700); box-shadow: 0 1px 4px rgba(0,0,0,.1); }

.mb-account-banner {
  display: flex; gap: 12px; align-items: flex-start; margin: 12px 14px 16px;
  background: linear-gradient(135deg, var(--forest-700), var(--forest-600)); color: #fff;
  border-radius: 12px; padding: 14px 16px;
}
.mb-account-banner-icon { font-size: 22px; flex-shrink: 0; }
.mb-account-banner-title { font-weight: 800; font-size: 14px; margin-bottom: 3px; }
.mb-account-banner-text { font-size: 12.5px; line-height: 1.6; opacity: .92; }
.mb-account-banner-text b { color: #ffe4ae; }
.mb-referral-banner {
  display: block; margin: 0 14px 16px; padding: 13px 16px; background: #fff8ec; border: 1px solid #f0d9a8;
  border-radius: 10px; font-size: 13px; color: #8a5a10; text-decoration: none;
}
.mb-referral-banner b { color: #6d4409; }
.mb-points-overview { margin: 0 14px 16px; background: var(--white); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; }
.mb-points-overview-head { display: flex; justify-content: space-between; align-items: center; font-size: 13.5px; font-weight: 700; }
.mb-points-overview-head b { color: var(--forest-700); font-size: 15px; }
.mb-points-overview-hint { font-size: 11px; color: var(--ink-400); margin: 4px 0 10px; line-height: 1.5; }
.mb-points-overview-list { display: flex; flex-direction: column; gap: 6px; }
.mb-points-overview-row { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--ink-700); padding-top: 6px; border-top: 1px solid var(--border); }
.mb-points-overview-row:first-child { border-top: none; padding-top: 0; }
.mb-points-overview-row b { color: var(--forest-700); }

.mb-pagination { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 6px 14px 24px; }
.mb-page-btn {
  font-size: 13px; font-weight: 700; color: var(--forest-700); padding: 8px 14px;
  border: 1px solid var(--border-strong); border-radius: 10px; text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease;
}
.mb-page-btn:not(.disabled):hover { background: var(--active-bg); border-color: var(--forest-500); }
.mb-page-btn.disabled { color: var(--ink-400); pointer-events: none; opacity: .5; }
.mb-page-info { font-size: 12.5px; color: var(--ink-600); }

/* ---------- Trang thông báo ---------- */
.top-action-bar {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--white); padding: 15px 20px; border-radius: 12px; box-shadow: 0 1px 2px rgba(0,0,0,.1);
}
.top-action-bar h2 { font-size: 20px; font-weight: 700; }
.mark-read-btn {
  background: transparent; color: var(--forest-700); border: none; font-size: 14px; font-weight: 600;
  cursor: pointer; padding: 8px 12px; border-radius: 5px; transition: background .2s;
}
.mark-read-btn:hover { background: var(--active-bg); }
.mark-read-btn:disabled { opacity: .5; cursor: default; }

.notif-card { background: var(--white); border-radius: 12px; box-shadow: 0 1px 2px rgba(0,0,0,.1); overflow: hidden; margin-bottom: 15px; }
.notif-section-title { font-size: 16px; font-weight: 600; padding: 15px 20px 5px; color: var(--ink-900); }
.notif-list { display: flex; flex-direction: column; }
.notif-row {
  display: flex; align-items: flex-start; gap: 15px; padding: 15px 20px;
  text-decoration: none; color: var(--ink-900); transition: background .2s;
  border-bottom: 1px solid var(--border); position: relative;
}
.notif-list .notif-row:last-child { border-bottom: none; }
.notif-row:hover { background: var(--page-bg); }
.notif-row.unread { background: var(--active-bg); }
.notif-row.unread::after {
  content: ''; position: absolute; right: 20px; top: 50%; transform: translateY(-50%);
  width: 10px; height: 10px; background: var(--forest-600); border-radius: 50%;
}
.notif-friend-row { align-items: center; }
.notif-avatar-wrap { position: relative; flex-shrink: 0; }
.notif-avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border); background-color: #ddd; flex-shrink: 0; }
.notif-badge {
  position: absolute; bottom: -2px; right: -2px; width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 12px; color: #fff;
  border: 2px solid var(--white);
}
.badge-booking { background: var(--forest-600); }
.badge-comment { background: var(--amber-500); }
.badge-share { background: #3a8fd9; }
.badge-alert { background: #e2604f; }
.badge-system { background: #e3a857; }
.notif-content { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.notif-text { font-size: 15px; line-height: 1.4; color: var(--ink-900); }
.notif-text b { font-weight: 600; }
.notif-time { font-size: 13px; color: var(--ink-600); font-weight: 500; }
.notif-alert-box { background: #fdecea; border: 1px solid #f5b7b1; padding: 10px 12px; border-radius: 8px; margin-top: 2px; font-size: 13.5px; color: #922b21; }
.notif-friend-actions { display: flex; gap: 8px; margin-top: 9px; }
.notif-btn-accept, .notif-btn-decline {
  flex: 1; border: none; border-radius: 5px; padding: 8px; font-weight: 700; font-size: 13px; cursor: pointer;
}
.notif-btn-accept { background: var(--forest-600); color: #fff; }
.notif-btn-decline { background: var(--page-bg); color: var(--ink-700); }

/* ---------- Trang lỗi 404 ---------- */
.err-page { text-align: center; padding: 60px 24px 40px; }
.err-emoji { font-size: 40px; margin-bottom: 6px; }
.err-code { font-family: var(--font-display); font-size: 46px; font-weight: 800; color: var(--forest-700); line-height: 1; margin-bottom: 8px; }
.err-page h2 { font-size: 18px; margin: 0 0 8px; }
.err-page p { font-size: 13.5px; color: var(--ink-600); line-height: 1.7; margin: 0 auto 22px; }
.err-actions { display: flex; flex-direction: column; gap: 10px; max-width: 260px; margin: 0 auto; }
.err-actions .btn { text-decoration: none; }
.err-contact { display: block; margin-top: 18px; font-size: 12.5px; color: var(--forest-700); font-weight: 700; }

/* ---------- Khu vực Đánh giá trên trang chi tiết villa ---------- */
.detail-rating-row { font-size: 14px; color: var(--ink-900); font-weight: 600; margin: 2px 0 8px; }
.detail-rating-row a { color: var(--forest-700); text-decoration: none; font-weight: 600; }
.detail-loyalty-badge { background: linear-gradient(135deg, #fdfbf7, #fdf4e3); border: 1px solid #f6e5c0; border-radius: 5px; padding: 12px 15px; font-size: 13px; color: #b07d12; margin: 0 0 20px; line-height: 1.5; }
.reviews-section { margin: 0 0 20px; padding: 20px; background: var(--white); border-radius: var(--radius-card); box-shadow: 0 1px 2px rgba(0,0,0,.1); }
.reviews-section-title { font-weight: 600; font-size: 18px; display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.reviews-section-title span { font-size: 15px; font-weight: 600; color: var(--ink-900); }
.reviews-empty { font-size: 13px; color: var(--ink-600); text-align: center; padding: 20px 0; }
.review-item { padding: 15px 0; border-top: none; border-bottom: 1px solid var(--border); }
.review-item:last-child { border-bottom: none; padding-bottom: 0; }
.review-item:first-child { padding-top: 0; }
.review-item-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 8px; }
.review-item-avatar {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  background-size: cover; background-position: center; background-color: var(--page-bg);
  box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--border);
}
.review-item-headtext { flex: 1; min-width: 0; }
.review-item-name { font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.review-item-stars { color: #ffb400; font-size: 12px; letter-spacing: 2px; margin-top: 2px; }
/* Huy hiệu "Đã từng ở đây" - MỌI review trong hệ thống chắc chắn đến từ
   khách đã hoàn tất lưu trú thật (write_review.php chỉ cho đánh giá khi
   booking đã 'completed'), nên hiện huy hiệu này cho TẤT CẢ review, tăng độ
   tin cậy/uy tín cho villa với khách đang cân nhắc đặt phòng. */
.review-verified-badge {
  display: inline-flex; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 700;
  color: var(--forest-700); background: var(--forest-100); padding: 2px 8px; border-radius: 10px;
  white-space: nowrap;
}
.review-item-date { font-size: 12px; color: var(--ink-500); margin-top: 1px; }
.review-item-comment { font-size: 14px; color: var(--ink-900); line-height: 1.5; margin-top: 0; margin-bottom: 10px; }
.review-item-images { display: flex; gap: 10px; margin-bottom: 10px; }
.review-item-image { width: 80px; height: 80px; border-radius: 8px; background-size: cover; background-position: center; background-color: var(--page-bg); }
.review-item-reply { background: #f8f9fa; border-left: 3px solid var(--forest-600); border-radius: 4px 8px 8px 4px; padding: 10px 15px; margin-top: 10px; font-size: 13px; color: var(--ink-700); }
.review-item-reply-label { font-weight: 600; font-size: 13px; color: var(--forest-700); margin-bottom: 4px; }

/* ---------- Sao chọn đánh giá (write_review.php) ---------- */
.review-star-picker { display: flex; gap: 6px; font-size: 34px; color: var(--border-strong); }
.review-star { cursor: pointer; transition: color .1s; }
.review-star.filled { color: #e3a857; }

/* ---------- Nút "Đánh giá villa này" trong my-bookings.php ---------- */
.mb-review-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%;
  padding: 9px; background: var(--forest-600); color: #fff;
  border-radius: 10px; font-size: 13px; font-weight: 700; text-decoration: none; box-sizing: border-box;
  transition: background-color .15s ease;
}
.mb-review-btn:hover { background: var(--forest-700); }
.bs-review-cta {
  display: block; text-align: center; margin-top: 12px; padding: 11px; background: var(--forest-600); color: #fff;
  border-radius: 5px; font-size: 13.5px; font-weight: 700; text-decoration: none;
}
.bs-review-done { text-align: center; margin-top: 12px; padding: 10px; font-size: 13px; color: var(--forest-700); font-weight: 600; }

/* ---------- Trang quản lý Đánh giá của Host (admin/reviews.php) ---------- */
.rv-scope-note { font-size: 12.5px; color: var(--ink-600); margin-bottom: 14px; }
.rv-stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.rv-stat-box { background: var(--white); border: 1px solid var(--border); border-radius: 10px; padding: 14px 10px; text-align: center; }
.rv-stat-box-warn { border-color: var(--amber-500); background: #fff8ec; }
.rv-stat-value { font-size: 20px; font-weight: 800; color: var(--forest-700); }
.rv-stat-label { font-size: 11.5px; color: var(--ink-600); margin-top: 3px; }

.rv-breakdown { background: var(--white); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; margin-bottom: 16px; }
.rv-breakdown-row { display: flex; align-items: center; gap: 10px; padding: 4px 0; text-decoration: none; color: inherit; }
.rv-breakdown-star { width: 36px; flex-shrink: 0; font-size: 12.5px; font-weight: 600; }
.rv-breakdown-bar { flex: 1; height: 8px; background: var(--page-bg); border-radius: 4px; overflow: hidden; }
.rv-breakdown-bar span { display: block; height: 100%; background: var(--amber-500); }
.rv-breakdown-count { width: 24px; flex-shrink: 0; text-align: right; font-size: 12px; color: var(--ink-600); }

.rv-filter-form { background: var(--white); border: 1px solid var(--border); border-radius: 10px; padding: 14px; margin-bottom: 18px; }
.rv-filter-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.rv-filter-row:last-child { margin-bottom: 0; align-items: center; }
.rv-filter-row select, .rv-filter-row input[type="text"], .rv-filter-row input[type="date"] {
  padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border-strong); font-size: 13px; font-family: var(--font-body);
}
.rv-filter-count { font-size: 12.5px; color: var(--ink-600); margin-left: auto; }

.rv-card { background: var(--white); border: 1px solid var(--border); border-radius: 10px; padding: 16px; margin-bottom: 14px; }
.rv-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.rv-card-villa { font-weight: 700; color: var(--forest-700); text-decoration: none; font-size: 14.5px; }
.rv-card-meta { font-size: 12.5px; color: var(--ink-600); margin-top: 2px; }
.rv-card-stars { color: #e3a857; font-size: 15px; flex-shrink: 0; white-space: nowrap; }
.rv-card-comment { font-size: 14px; color: var(--ink-900); line-height: 1.6; margin: 10px 0; }
.rv-card-images { display: flex; gap: 6px; margin-bottom: 10px; }
.rv-card-image { width: 70px; height: 70px; border-radius: 8px; background-size: cover; background-position: center; background-color: var(--page-bg); }
.rv-card-reply { background: var(--page-bg); border-radius: 8px; padding: 10px 12px; font-size: 13.5px; color: var(--ink-700); margin-top: 8px; }
.rv-card-reply-time { font-size: 11px; color: var(--ink-400); font-weight: 400; margin-left: 4px; }
.rv-card-reply-form { display: flex; gap: 8px; margin-top: 10px; }
.rv-card-reply-form input { flex: 1; min-width: 0; padding: 9px 12px; border-radius: 8px; border: 1px solid var(--border-strong); font-size: 13px; font-family: var(--font-body); }

/* ---------- Menu giới thiệu sàn (drawer trượt từ trái, mở bằng nút ☰) ---------- */
.side-menu-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 500;
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.side-menu-overlay.show { opacity: 1; pointer-events: auto; }
.side-menu-panel {
  width: 84%; height: 100%; background: var(--white);
  transform: translateX(-100%); transition: transform .25s ease; overflow-y: auto;
}
.side-menu-overlay.show .side-menu-panel { transform: translateX(0); }
.side-menu-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 18px 14px; border-bottom: 1px solid var(--border); }
.side-menu-head button { background: none; border: none; font-size: 18px; color: var(--ink-600); cursor: pointer; }
.side-menu-intro { padding: 16px 18px; font-size: 13px; color: var(--ink-700); line-height: 1.7; background: var(--page-bg); margin: 14px 14px 6px; border-radius: 10px; }
.side-menu-item {
  display: flex; align-items: center; gap: 14px; padding: 14px 18px; text-decoration: none; color: inherit;
  border-bottom: 1px solid var(--border);
}
.side-menu-item-icon { font-size: 22px; flex-shrink: 0; }
.side-menu-item-title { font-weight: 700; font-size: 14px; color: var(--ink-900); }
.side-menu-item-sub { font-size: 12px; color: var(--ink-600); margin-top: 2px; }
.side-menu-extra-divider {
  font-size: 11.5px; font-weight: 700; color: var(--ink-400); text-transform: uppercase; letter-spacing: .5px;
  padding: 18px 18px 8px; border-top: 1px solid var(--border); margin-top: 6px;
}
/* .global-sidebar-left/-right mặc định display:none trên di động (chỉ hiện
   ở desktop, xem media query 992px) - nhưng khi đã được JS "bứng" vào NGAY
   BÊN TRONG drawer di động (#mobileMergedSidebars - xem mergeSidebarsIntoMobileMenu()
   ở includes/header.php) thì PHẢI hiện lại, đồng thời bỏ hết kiểu dáng
   riêng cho desktop (sticky/giới hạn chiều cao/thanh cuộn riêng) vì giờ nó
   chỉ là 1 khối nội dung chảy tự nhiên, cuộn CHUNG với cả drawer. */
#mobileMergedSidebars .global-sidebar-left,
#mobileMergedSidebars .global-sidebar-right {
  display: block; position: static; max-height: none; overflow: visible; padding: 4px 14px 20px;
}
#mobileMergedSidebars .gsb-divider { border-top: 1px solid var(--border); margin: 14px 0; }

/* ---------- Banner "được mời giới thiệu" trên trang đăng ký ---------- */
.ref-banner {
  display: flex; align-items: center; gap: 12px; background: linear-gradient(135deg, #fff8ec, #fff2dc);
  border: 1px solid #f0d9a8; border-radius: 12px; padding: 14px 16px; margin-bottom: 20px;
}
.ref-banner-avatar { width: 44px; height: 44px; border-radius: 50%; background-size: cover; background-position: center; background-color: #fff; flex-shrink: 0; box-shadow: 0 0 0 2px #fff; }
.ref-banner-body { min-width: 0; }
.ref-banner-title { font-size: 13.5px; color: #6d4409; line-height: 1.5; }
.ref-banner-title b { color: #4a2d05; }
.ref-banner-sub { font-size: 12px; color: #8a5a10; margin-top: 3px; line-height: 1.5; }

/* ---------- Trang đăng nhập/đăng ký - hero + card nổi, chuyên nghiệp hiện đại ---------- */
.auth-hero {
  background: linear-gradient(160deg, var(--forest-800), var(--forest-600) 70%);
  padding: 44px 24px 64px; text-align: center; color: #fff; position: relative; overflow: hidden;
}
.auth-hero::after {
  content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 80% 0%, rgba(255,255,255,.08), transparent 60%);
}
.auth-hero::before {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 18px 18px; opacity: .5;
}
.auth-hero-logo { height: 52px; width: auto; margin: 0 auto 6px; display: block; position: relative; z-index: 1; }
.auth-hero-title { font-family: var(--font-script); font-size: 30px; margin-bottom: 4px; position: relative; z-index: 1; }
.auth-hero-subtitle { font-size: 12.5px; opacity: .82; position: relative; z-index: 1; }
.auth-card {
  background: var(--white); border-radius: 22px 22px 0 0; margin-top: -32px; position: relative;
  padding: 26px 22px 40px; box-shadow: 0 -10px 32px rgba(0,0,0,.09); min-height: 50vh;
}
/* Chọn vai trò đăng nhập - 2 thẻ lớn, rõ ràng icon + mô tả, thay 2 nút tab
   chữ nhỏ trước đây (khó phân biệt, dễ nhầm) - đúng yêu cầu "hiện đại, dễ
   nhìn, biết ngay vai trò nào để đăng nhập". */
.auth-role-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 22px; }
.auth-role-card {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px;
  padding: 16px 10px; border-radius: 14px; border: 1.5px solid var(--border-strong); background: var(--white);
  cursor: pointer; transition: border-color .18s, box-shadow .18s, transform .12s, background .18s;
  font-family: var(--font-body);
}
.auth-role-card:hover { transform: translateY(-1px); border-color: var(--forest-400, #7fa88f); }
.auth-role-card.active {
  border-color: var(--forest-600); background: linear-gradient(160deg, #f0f7f2, #fff);
  box-shadow: 0 4px 16px rgba(47,92,68,.14);
}
.auth-role-card-icon { font-size: 26px; line-height: 1; margin-bottom: 2px; }
.auth-role-card-title { font-weight: 800; font-size: 14px; color: var(--ink-900); }
.auth-role-card.active .auth-role-card-title { color: var(--forest-800); }
.auth-role-card-desc { font-size: 11px; color: var(--ink-500); line-height: 1.4; }
.auth-social-col { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.auth-social-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px; border-radius: 5px; padding: 12px;
  font-weight: 600; font-size: 14px; font-family: var(--font-body); cursor: pointer; text-decoration: none; border: none;
}
.auth-social-icon { width: 19px; height: 19px; flex-shrink: 0; }
.auth-social-btn-google { border: 1px solid var(--border-strong); color: var(--ink-900); background: var(--white); }
.auth-social-btn-facebook { border: 1px solid var(--border-strong); color: var(--ink-900); background: var(--white); }
.auth-social-btn-zalo { background: #0068FF; color: #fff; }
.auth-social-row { display: flex; flex-direction: row; gap: 10px; margin-bottom: 18px; }
.auth-social-row .auth-social-btn {
  flex: 1 1 0; padding: 12px 8px; gap: 0;
}
.auth-social-row .auth-social-icon { width: 22px; height: 22px; }
.auth-divider { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; color: var(--ink-400); font-size: 12.5px; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.auth-label { font-size: 12.5px; font-weight: 600; color: var(--ink-600); display: block; margin-bottom: 5px; }
.auth-label-hint { font-weight: 400; color: var(--ink-400); }
.auth-field-status { font-size: 12px; margin-bottom: 14px; min-height: 16px; }
.auth-terms-note { text-align: center; font-size: 11px; color: var(--ink-400); margin: 12px 0 6px; line-height: 1.6; }
.auth-terms-note a { color: var(--ink-500); text-decoration: underline; }
.auth-input {
  width: 100%; padding: 13px 16px; border-radius: 12px; border: 1.5px solid var(--border-strong);
  margin-bottom: 14px; font-family: var(--font-body); font-size: 14.5px; box-sizing: border-box; transition: border-color .15s;
}
.auth-input:focus { outline: none; border-color: var(--forest-600); }
.auth-forgot-row { text-align: right; margin-top: -6px; margin-bottom: 18px; }
.auth-forgot-row a { font-size: 12.5px; color: var(--forest-700); font-weight: 700; text-decoration: none; }
.auth-submit-btn {
  width: 100%; background: linear-gradient(135deg, var(--forest-700), var(--forest-600)); color: #fff; border: none;
  border-radius: 5px; padding: 14px; font-weight: 700; font-size: 15px; cursor: pointer; box-shadow: 0 4px 14px rgba(47,92,68,.28);
}
.auth-bottom-link { text-align: center; font-size: 13px; color: var(--ink-600); margin-top: 18px; }
.auth-bottom-link a { color: var(--forest-700); font-weight: 700; text-decoration: none; }
.auth-partner-intro { font-size: 13.5px; color: var(--ink-600); margin-bottom: 16px; line-height: 1.6; background: var(--page-bg); border-radius: 10px; padding: 12px 14px; }

/* ---------- Trang Khách hàng (admin/customers.php) ---------- */
.cu-scope-note { font-size: 12.5px; color: var(--forest-700); background: #fff8ec; border-radius: 8px; padding: 8px 12px; margin-bottom: 16px; display: inline-block; }
.cu-filter-form { background: var(--white); border: 1px solid var(--border); border-radius: 10px; padding: 14px; margin-bottom: 18px; }
.cu-filter-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.cu-filter-row:last-child { margin-bottom: 0; }
.cu-filter-row input[type="text"], .cu-filter-row select {
  padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border-strong); font-size: 13px; font-family: var(--font-body);
}
.cu-checkbox-label { font-size: 13px; color: var(--ink-700); display: flex; align-items: center; gap: 6px; }
.cu-date-label { font-size: 12.5px; color: var(--ink-600); font-weight: 600; }
.cu-filter-row input[type="date"] { padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border-strong); font-size: 13px; font-family: var(--font-body); }

.cu-list { display: flex; flex-direction: column; gap: 12px; }
.cu-card { background: var(--white); border: 1px solid var(--border); border-radius: 10px; padding: 16px; }
.cu-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.cu-card-name { font-weight: 800; font-size: 15px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cu-repeat-badge { font-size: 11px; font-weight: 700; background: #fff3d6; color: #8a6d1e; padding: 2px 8px; border-radius: 5px; }
.cu-card-phone { font-size: 12.5px; color: var(--ink-600); margin-top: 3px; }
.cu-card-aliases { font-size: 11.5px; color: var(--ink-400); margin-top: 4px; font-style: italic; }
.cu-card-spent { text-align: right; flex-shrink: 0; }
.cu-card-spent-value { font-weight: 800; font-size: 15px; color: var(--forest-700); }
.cu-card-spent-label { font-size: 10.5px; color: var(--ink-400); }
.cu-card-villas { font-size: 13px; color: var(--ink-700); margin-top: 10px; }
.cu-card-status-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.cu-status-chip { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 5px; }
.cu-status-completed { background: #e3f3e6; color: #1f6b34; }
.cu-status-confirmed { background: #e8f2fb; color: #205a8a; }
.cu-status-pending { background: #fff3d6; color: #8a6d1e; }
.cu-status-cancelled { background: #fdf2f0; color: #c0392b; }
.cu-card-dates { font-size: 11.5px; color: var(--ink-400); margin-top: 8px; }
.cu-card-view-btn { display: inline-block; margin-top: 10px; font-size: 12.5px; font-weight: 700; color: var(--forest-700); text-decoration: none; }

.cu-pagination { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 18px 0; }
.cu-page-btn { font-size: 13px; font-weight: 700; color: var(--forest-700); padding: 8px 14px; border: 1px solid var(--border-strong); border-radius: 5px; text-decoration: none; }
.cu-page-btn.disabled { color: var(--ink-400); pointer-events: none; opacity: .5; }
.cu-page-info { font-size: 12.5px; color: var(--ink-600); }

@media (max-width: 480px) {
  .cu-card-head { flex-direction: column; }
  .cu-card-spent { text-align: left; }
}

/* ---------- Xem trước link (giống Facebook tự "bung" link dán vào) ---------- */
.link-preview-loading { padding: 12px 14px; font-size: 12.5px; color: var(--ink-600); }
.link-preview-card { position: relative; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--white); }
.link-preview-image { width: 100%; aspect-ratio: 16/9; background-size: cover; background-position: center; background-color: var(--page-bg); }
.link-preview-body { padding: 10px 12px; }
.link-preview-domain { font-size: 11px; color: var(--ink-400); text-transform: uppercase; letter-spacing: .3px; }
.link-preview-title { font-weight: 700; font-size: 13.5px; margin-top: 2px; line-height: 1.4; }
.link-preview-desc { font-size: 12px; color: var(--ink-600); margin-top: 4px; line-height: 1.5; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.link-preview-close {
  position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border-radius: 50%;
  background: rgba(0,0,0,.55); color: #fff; border: none; font-size: 13px; cursor: pointer;
}

/* Thẻ preview khi HIỂN THỊ bài viết (khác khung lúc soạn ở trên) */
.link-preview-embed {
  display: block; text-decoration: none; color: inherit; border: 1px solid var(--border);
  border-radius: 10px; overflow: hidden; margin: 8px 12px 4px; background: var(--white);
}
.link-preview-embed-image { width: 100%; aspect-ratio: 16/9; background-size: cover; background-position: center; background-color: var(--page-bg); }
/* Khung trống khi link chia sẻ KHÔNG lấy được ảnh thumbnail - trước đây ẩn
   hẳn (bỏ trống khoảng đó), giờ hiện khung nền tối + logo trắng thay vì để
   trống trơn, vẫn có nhận diện thương hiệu. */
.link-preview-embed-image-empty {
  background: linear-gradient(160deg, var(--forest-800), var(--forest-600) 70%);
  display: flex; align-items: center; justify-content: center;
}
.link-preview-embed-image-empty img { height: 32%; width: auto; opacity: .55; }
.link-preview-embed-body { padding: 10px 12px; }
.link-preview-embed-domain { font-size: 10.5px; color: var(--ink-400); text-transform: uppercase; letter-spacing: .3px; }
.link-preview-embed-title { font-weight: 700; font-size: 13.5px; margin-top: 2px; color: var(--ink-900); line-height: 1.4; }
.link-preview-embed-desc { font-size: 12px; color: var(--ink-600); margin-top: 4px; line-height: 1.5; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* ---------- Trang Giới thiệu bạn bè (refer_friend.php) ---------- */
.rf-hero {
  text-align: center; padding: 32px 24px 26px; background: linear-gradient(160deg, var(--forest-800), var(--forest-600) 75%); color: #fff;
}
.rf-hero-emoji { font-size: 40px; margin-bottom: 8px; }
.rf-hero-title { font-weight: 800; font-size: 18px; margin-bottom: 8px; }
.rf-hero-desc { font-size: 13px; line-height: 1.7; opacity: .92; margin: 0 auto; }
.rf-hero-desc b { color: #ffe4ae; }

.rf-link-box { margin: -18px 14px 18px; background: var(--white); border-radius: 14px; padding: 16px; box-shadow: 0 4px 18px rgba(0,0,0,.1); position: relative; z-index: 2; }
.rf-link-label { font-size: 12px; font-weight: 700; color: var(--ink-600); margin-bottom: 8px; }
.rf-link-row { display: flex; gap: 8px; margin-bottom: 10px; }
.rf-link-row input {
  flex: 1; min-width: 0; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--border-strong);
  font-size: 12.5px; font-family: var(--font-body); background: var(--page-bg); color: var(--ink-700);
}
.rf-link-row button { flex-shrink: 0; background: var(--forest-700); color: #fff; border: none; border-radius: 5px; padding: 0 16px; font-weight: 700; font-size: 12.5px; cursor: pointer; }
.rf-share-btn { width: 100%; background: var(--amber-500); color: #fff; border: none; border-radius: 5px; padding: 11px; font-weight: 700; font-size: 13.5px; cursor: pointer; }
.rf-no-username { margin: -18px 14px 18px; background: #fdf2f0; border-radius: 10px; padding: 14px; font-size: 13px; color: #c0392b; text-align: center; }

.rf-stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 0 14px; margin-bottom: 16px; }
.rf-stat-box { background: var(--white); border: 1px solid var(--border); border-radius: 10px; padding: 14px 8px; text-align: center; }
.rf-stat-box-green { border-color: #c8e6cf; background: #f3faf4; }
.rf-stat-box-amber { border-color: #f0d9a8; background: #fffaf0; }
.rf-stat-value { font-size: 19px; font-weight: 800; color: var(--forest-700); }
.rf-stat-label { font-size: 10.5px; color: var(--ink-600); margin-top: 3px; line-height: 1.3; }

.rf-balance-note { margin: 0 14px 18px; background: var(--page-bg); border-radius: 10px; padding: 12px 14px; font-size: 12.5px; color: var(--ink-700); }
.rf-section-title { font-weight: 800; font-size: 14.5px; padding: 0 14px; margin-bottom: 10px; }
.rf-empty { margin: 0 14px 20px; text-align: center; font-size: 13px; color: var(--ink-600); padding: 20px; background: var(--page-bg); border-radius: 10px; }

.rf-history-list { padding: 0 14px; margin-bottom: 20px; display: flex; flex-direction: column; gap: 8px; }
.rf-history-item { display: flex; align-items: center; gap: 10px; background: var(--white); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.rf-history-avatar { width: 38px; height: 38px; border-radius: 50%; background-size: cover; background-position: center; background-color: var(--page-bg); flex-shrink: 0; }
.rf-history-name { font-weight: 700; font-size: 13px; }
.rf-history-date { font-size: 11px; color: var(--ink-400); }
.rf-history-points { font-weight: 800; font-size: 13px; color: var(--forest-700); flex-shrink: 0; }

.rf-rules-box { margin: 0 14px 30px; background: var(--page-bg); border-radius: 10px; padding: 14px 16px; }
.rf-rules-title { font-weight: 700; font-size: 13px; margin-bottom: 8px; }
.rf-rules-box ul { margin: 0; padding-left: 18px; font-size: 12.5px; color: var(--ink-700); line-height: 1.8; }

/* ---------- Trang Tổng quan (Dashboard) Sale/Host/Admin ---------- */
.dq-header { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 8px; }
.dq-role-badge { display: inline-block; background: var(--page-bg); color: var(--ink-700); font-size: 12.5px; font-weight: 600; padding: 3px 10px; border-radius: 5px; }
.dq-filter-bar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.dq-filter-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.dq-filter-form input, .dq-filter-form select { padding: 8px 10px; border-radius: 8px; border: 1.5px solid var(--mist-300, var(--border-strong)); background: #f7f8f5; font-size: 13px; font-family: var(--font-body); }
.dq-scope-note { font-size: 12.5px; color: var(--forest-700); background: #fff8ec; border-radius: 8px; padding: 8px 12px; margin-bottom: 16px; display: inline-block; }

.dq-kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 18px; }
.dq-kpi { border-radius: 14px; padding: 14px 16px; color: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.08); min-width: 0; }
.dq-kpi-label { font-size: 11.5px; opacity: .92; margin-bottom: 8px; overflow-wrap: break-word; }
.dq-kpi-value { font-family: var(--font-display, var(--font-body)); font-size: 20px; font-weight: 700; overflow-wrap: break-word; }
.dq-kpi-purple { background: linear-gradient(135deg,#6c5ce7,#4834b3); }
.dq-kpi-purple-dark { background: linear-gradient(135deg,#4834b3,#2f2170); }
.dq-kpi-blue { background: linear-gradient(135deg,#3a8fd9,#2563a8); }
.dq-kpi-green { background: linear-gradient(135deg,#2f9e5e,#1f6b3f); }
.dq-kpi-amber { background: linear-gradient(135deg,#e3a857,#c8842f); }
.dq-kpi-teal { background: linear-gradient(135deg,#1fa39a,#0f7a72); }
.dq-kpi-red { background: linear-gradient(135deg,#e2604f,#c0392b); }
.dq-kpi-pink { background: linear-gradient(135deg,#e0609f,#b93e7a); }

/* ---------- Minh bạch hoa hồng gốc/thực nhận + hiệu quả mã giảm giá (Sale)
   và ghi chú cam kết chính sách với Host - đối soát công nợ ---------- */
.dq-transparency-panel {
  background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px;
  margin-bottom: 18px; box-shadow: 0 1px 6px rgba(0,0,0,.04);
}
.dq-transparency-title { font-weight: 700; font-size: 15px; margin-bottom: 14px; }
.dq-transparency-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.dq-transparency-item { flex: 1; min-width: 130px; }
.dq-transparency-label { font-size: 11.5px; color: var(--ink-600); font-weight: 600; margin-bottom: 4px; }
.dq-transparency-value { font-size: 17px; font-weight: 700; color: var(--ink-900); }
.dq-transparency-positive { color: var(--forest-700); }
.dq-transparency-negative { color: #c0392b; }
.dq-transparency-arrow { font-size: 18px; color: var(--ink-400); font-weight: 700; flex-shrink: 0; }
.dq-transparency-divider { border-top: 1px solid var(--border); margin: 16px 0; }
.dq-transparency-note {
  margin-top: 14px; padding: 10px 12px; background: var(--active-bg); border-radius: 8px;
  font-size: 12.5px; color: var(--forest-800); line-height: 1.6;
}

.dq-policy-note {
  background: var(--active-bg); border: 1px solid var(--forest-500); border-radius: 12px;
  padding: 14px 16px; margin-bottom: 18px; font-size: 13px; color: var(--forest-800); line-height: 1.6;
}

.dq-funnel-card { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px; margin-bottom: 18px; box-shadow: 0 1px 6px rgba(0,0,0,.04); }
.dq-funnel { display: flex; flex-direction: column; gap: 9px; margin-top: 12px; }
.dq-funnel-row { display: grid; grid-template-columns: 120px 1fr 40px; align-items: center; gap: 8px; }
.dq-funnel-label { font-size: 12px; color: var(--ink-700); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dq-funnel-track { background: var(--page-bg); border-radius: 6px; height: 16px; overflow: hidden; }
.dq-funnel-bar { height: 100%; border-radius: 6px; transition: width .3s; }
.dq-funnel-count { font-size: 13px; font-weight: 700; text-align: right; color: var(--ink-900); }

.dq-chart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.dq-chart-wide { grid-column: span 1; }
.dq-chart-card { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 16px; box-shadow: 0 1px 6px rgba(0,0,0,.04); min-width: 0; }
.dq-chart-title { font-size: 13px; font-weight: 700; color: var(--pine-800, var(--forest-700)); margin-bottom: 14px; }
.dq-canvas-box { position: relative; width: 100%; }
.dq-empty { color: var(--ink-600); font-size: 13px; text-align: center; padding: 30px 10px; }

.dq-section-title { font-family: var(--font-display, var(--font-body)); color: var(--pine-800, var(--forest-700)); margin-top: 28px; margin-bottom: 10px; font-size: 16px; }
.dq-table-wrap { overflow-x: auto; margin-bottom: 20px; -webkit-overflow-scrolling: touch; }
.dq-occ-pill { display: inline-block; padding: 3px 9px; border-radius: 5px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.dq-occ-high { background: #e3f3e6; color: #1f6b34; }
.dq-occ-mid { background: #fff3d6; color: #8a6d1e; }
.dq-occ-low { background: #fdf2f0; color: #c0392b; }

.booking-quick-dates { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.booking-quick-dates-label { font-size: 12.5px; color: var(--ink-600); margin-right: 2px; }
.booking-quick-date-btn { padding: 5px 12px; border-radius: 5px; background: var(--page-bg); font-size: 12.5px; color: var(--ink-700); text-decoration: none; border: 1px solid transparent; white-space: nowrap; }
.booking-quick-date-btn.active { background: #fff8ec; border-color: var(--amber-500); color: #8a5a10; font-weight: 700; }

/* Di động: co gọn lưới biểu đồ + KPI + phễu trạng thái cho màn hình hẹp,
   tránh chữ/số bị bể dòng hoặc tràn ngang như đã gặp ở các trang khác */
@media (max-width: 860px) {
  .dq-chart-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .dq-kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .dq-funnel-row { grid-template-columns: 92px 1fr 36px; gap: 6px; }
  .dq-filter-bar { flex-direction: column; align-items: stretch; }
  .dq-filter-form { width: 100%; }
  .dq-filter-form input, .dq-filter-form select { flex: 1; min-width: 0; }
}

/* ---------- Trang Tìm kiếm - gọn, rõ ràng, phong cách thông báo mạng xã hội lớn ---------- */
.search-bar-wrap { padding: 14px 14px 10px; background: var(--white); }
.search-input-pill {
  display: flex; align-items: center; gap: 10px; background: var(--page-bg);
  border: 1.5px solid transparent; border-radius: 5px; padding: 12px 16px; transition: border-color .15s;
}
.search-input-pill:focus-within { border-color: var(--forest-600); background: var(--white); }
.search-input-pill span { font-size: 15px; opacity: .6; }
.search-input-pill input { flex: 1; border: none; outline: none; background: none; font-size: 14.5px; font-family: var(--font-body); }
.search-tab-row { display: flex; gap: 4px; padding: 0 14px; border-bottom: 1px solid var(--border); background: var(--white); }
.search-tab-chip {
  border: none; background: none; padding: 10px 14px; font-size: 13.5px; font-weight: 600; color: var(--ink-600);
  border-bottom: 2.5px solid transparent; cursor: pointer; margin-bottom: -1px; transition: color .15s, border-color .15s;
}
.search-tab-chip.active { color: var(--forest-700); border-bottom-color: var(--forest-700); font-weight: 800; }
.search-placeholder { text-align: center; padding: 70px 24px; }
.search-placeholder .emoji { font-size: 36px; margin-bottom: 10px; opacity: .5; }
.search-placeholder h3 { font-size: 14px; color: var(--ink-400); font-weight: 600; margin: 0; }

/* Nút Xem thêm dùng chung cho cả 2 tab */
.search-load-more-btn {
  display: block; width: calc(100% - 32px); margin: 10px 16px 20px; padding: 11px;
  background: var(--page-bg); border: none; border-radius: 5px; font-weight: 700; font-size: 13px;
  color: var(--forest-700); cursor: pointer;
}

/* ---------- Lưới thẻ bạn bè (kết quả tìm kiếm) - kiểu "Những người bạn có thể biết" của Facebook ---------- */
.friend-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 10px 14px 4px; }
.friend-card { background: var(--white); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-card); }
.friend-card-photo { display: block; width: 100%; aspect-ratio: 1/1; background-size: cover; background-position: center; background-color: var(--page-bg); }
.friend-card-body { padding: 10px; }
.friend-card-name { display: block; font-weight: 700; font-size: 13.5px; color: var(--ink-900); text-decoration: none; line-height: 1.3; margin-bottom: 4px; }
.friend-card-followers { font-size: 11.5px; color: var(--ink-600); margin-bottom: 8px; }
.friend-card-mutual { display: flex; align-items: center; gap: 5px; margin-bottom: 8px; }
.friend-card-mutual-avatars { display: flex; }
.friend-card-mutual-avatar {
  width: 16px; height: 16px; border-radius: 50%; background-size: cover; background-position: center;
  background-color: var(--page-bg); border: 1.5px solid var(--white); margin-left: -6px;
}
.friend-card-mutual-avatar:first-child { margin-left: 0; }
.friend-card-mutual span { font-size: 11px; color: var(--ink-600); }
.friend-card-btn { width: 100%; border: none; border-radius: 5px; padding: 8px; font-weight: 700; font-size: 12.5px; cursor: pointer; }
.friend-card-btn-primary { background: var(--forest-600); color: #fff; }
.friend-card-btn-added { background: var(--page-bg); color: var(--ink-600); cursor: default; }

/* ---------- Bài viết trong kết quả tìm kiếm giờ dùng ĐÚNG class .post thật
   của feed chính (render_full_post_card() bên PHP) - không cần CSS riêng
   nữa, tự động thừa hưởng toàn bộ style + tương tác đã có sẵn. ---------- */

/* ---------- Bottom tab bar ---------- */
.bottom-nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%) translateZ(0);
  width: 100%; max-width: 470px;
  background: var(--white); border-top: 1px solid var(--border);
  display: flex; justify-content: space-around; align-items: center;
  padding: 8px 0 10px; z-index: 200;
  /* FIX lỗi Safari iOS: thanh nav "fixed" không được ép vào lớp tăng tốc
     phần cứng riêng (GPU layer) - khi cuộn nhanh qua nhiều ảnh/video nặng
     trong feed, WebKit render trễ khiến thanh này bị "kẹt" lơ lửng giữa nội
     dung 1 nhịp thay vì luôn dính đáy màn hình (đã có ảnh chụp lỗi thật).
     will-change + backface-visibility ép trình duyệt tạo hẳn 1 layer GPU
     riêng cho thanh này, không còn bị cuốn theo lúc repaint nội dung nữa. */
  will-change: transform;
  -webkit-backface-visibility: hidden; backface-visibility: hidden;
}
.bottom-nav a {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-size: 10.5px; color: var(--ink-400); font-weight: 600; flex: 1;
}
.bottom-nav a .icon { font-size: 20px; color: var(--ink-400); }
.bottom-nav a.active, .bottom-nav a.active .icon { color: var(--forest-700); }

/* ---------- Trang chi tiết (Property detail) ---------- */
.detail-topbar {
  position: sticky; top: 0; z-index: 50; background: var(--white);
  display: flex; align-items: center; gap: 15px; padding: 15px 20px;
  border-radius: 12px; box-shadow: 0 1px 2px rgba(0,0,0,.1);
  margin: 0 0 20px;
}
.detail-topbar .back { font-size: 20px; color: var(--ink-600); font-weight: 700; }
.detail-topbar h2 { font-size: 18px; margin: 0; font-weight: 600; }

/* KHỐI ẢNH - thẻ RIÊNG bo góc + đổ bóng độc lập (đúng mẫu .gallery-grid) -
   KHÔNG còn dính liền/đè lên khối thông tin bên dưới như trước. */
.detail-gallery-card {
  border-radius: 12px; overflow: hidden; box-shadow: 0 1px 2px rgba(0,0,0,.1);
  margin-bottom: 20px;
}

.hero-photo { width: 100%; aspect-ratio: 4/3; background-size: cover; background-position: center; }
.property-gallery-scroll { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; gap: 2px; }
.property-gallery-scroll::-webkit-scrollbar { display: none; }
.property-gallery-item { flex: 0 0 100%; aspect-ratio: 4/3; background-size: cover; background-position: center; background-color: #eee; scroll-snap-align: start; }
.property-gallery-item video { width: 100%; height: 100%; object-fit: cover; display: block; }
.detail-body {
  padding: 20px;
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(0,0,0,.1);
  margin-bottom: 20px;
}
.detail-name { font-size: 24px; font-weight: 700; margin: 0 0 8px; color: var(--ink-900); }
.detail-loc { font-size: 14px; color: var(--ink-600); margin-bottom: 15px; }

.stat-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 15px;
  padding: 0; border: none; margin-bottom: 20px;
}
.stat-grid .item { display: flex; align-items: center; gap: 8px; text-align: left; font-size: 14px; font-weight: 500; color: var(--ink-900); }
.stat-grid .item .ic {
  font-size: 18px; width: 32px; height: 32px; flex-shrink: 0; background: var(--page-bg);
  border-radius: 8px; display: flex; align-items: center; justify-content: center; margin-bottom: 0;
}
.stat-grid .item .lb { font-size: 14px; color: var(--ink-900); line-height: 1.3; font-weight: 500; }

.detail-desc-title { font-size: 18px; font-weight: 600; margin: 0 0 12px; }
.detail-desc { font-size: 14px; line-height: 1.6; color: var(--ink-600); margin-bottom: 20px; }
.detail-desc ul, .detail-desc ol { padding-left: 22px; margin: 6px 0; }
.detail-desc li { margin-bottom: 4px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.tag-pill { font-size: 13px; padding: 6px 12px; border-radius: 5px; background: var(--active-bg); color: var(--forest-800); font-weight: 500; }

.sticky-cta {
  position: fixed; left: 50%; transform: translateX(-50%);
  /* Đẩy lên TRÊN thanh điều hướng dưới (bottom-nav cao ~62px) - trước đây
     property.php không có bottom-nav nên nút này ở sát đáy màn hình
     (bottom:0) được, giờ đã thêm bottom-nav vào trang này (fix lỗi "mất
     trắng" khi bấm vào từ thông báo) nên phải nhường chỗ, không thì 2 thanh
     cố định ở đáy sẽ đè chồng lên nhau. */
  bottom: 62px;
  width: 100%; max-width: 470px;
  background: var(--white); border-top: 1px solid var(--border);
  padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 14px; z-index: 190;
}
.sticky-cta .price-block .from { font-size: 11px; color: var(--ink-600); }
.sticky-cta .price-block .amount { font-size: 17px; font-weight: 700; color: var(--forest-700); }
.sticky-cta a.btn-book {
  background: var(--forest-600); color: var(--white); font-weight: 700; padding: 12px 22px; border-radius: 5px; font-size: 14.5px;
}

/* ---------- Trang đặt phòng (Booking screen) ---------- */
.booking-summary {
  display: flex; gap: 15px; align-items: center; background: var(--white); margin: 0 0 20px; padding: 20px; border-radius: 12px; box-shadow: 0 1px 2px rgba(0,0,0,.1);
}
.booking-summary > img { width: 100px; height: 75px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.booking-summary .info { display: flex; flex-direction: column; gap: 4px; }
.booking-summary .info b { font-size: 18px; color: var(--ink-900); }
.booking-summary .info span { font-size: 14px; color: var(--ink-600); }
.booking-summary .info .price { color: var(--forest-700); font-weight: 600; font-size: 15px; margin-top: 4px; display: block; }

.form-section { background: var(--white); border-radius: 12px; box-shadow: 0 1px 2px rgba(0,0,0,.1); padding: 20px; margin-bottom: 20px; }
.form-section-title { font-size: 16px; font-weight: 600; margin-bottom: 15px; }
.form-row { display: flex; gap: 15px; margin-bottom: 15px; flex-wrap: wrap; }
.form-col { flex: 1; min-width: 140px; }

/* ---------- Hàng ngày nhận/trả phòng (booking.php) - TÁCH RIÊNG khỏi
   .form-row dùng chung (vốn có "min-width:140px" mỗi cột + tối đa 480px mới
   xuống dòng) vì input kiểu date trên di động có khung giờ/lịch riêng của
   hệ điều hành, không co giãn đẹp như input thường - nhét chung 1 hàng với
   cột thứ 3 ("Số khách") dễ bị tràn ra ngoài khung ở nhiều màn hình điện
   thoại (không đợi tới đúng breakpoint 480px mới vỡ). Luôn cố định 2 cột
   NGANG NHAU BẰNG NHAU (không phụ thuộc min-width/flex-wrap), dùng CSS Grid
   thay vì flex để không bao giờ bị đẩy tràn do nội dung input không chịu co. */
.booking-date-row {
  /* Theo đúng yêu cầu: 2 ô Ngày nhận/trả phòng xuống HẲN 2 HÀNG RIÊNG (không
     còn cố nhét chung 1 hàng ngang nữa) - input kiểu date trên di động (đặc
     biệt Safari iOS) có phần hiển thị nội bộ (ngày/tháng/năm + icon lịch)
     đôi khi KHÔNG chịu co nhỏ đúng theo khung CSS dù đã dùng Grid/min-width:0,
     nên cách chắc chắn nhất để không bao giờ còn tràn nữa là mỗi ô chiếm
     TRỌN 1 hàng, rộng đúng bằng khung chứa (width:100%, có box-sizing:border-box
     để cộng cả padding/viền vẫn không vượt quá 100%). */
  display: flex; flex-direction: column; gap: 14px; margin-bottom: 15px;
}
.booking-date-row .form-col { width: 100%; max-width: 100%; box-sizing: border-box; }
.booking-date-row .form-input { width: 100%; max-width: 100%; box-sizing: border-box; }
.input-label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-900); margin-bottom: 6px; }
.form-input {
  width: 100%; padding: 12px 15px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 14px; font-family: var(--font-body); color: var(--ink-900); background: var(--white);
  transition: border-color .2s;
}
.form-input:focus { border-color: var(--forest-600); outline: none; box-shadow: 0 0 0 3px var(--active-bg); }
.form-input[readonly] { background: var(--page-bg); cursor: not-allowed; color: var(--ink-600); }

/* ---------- Ô nhập mã giảm giá ở booking.php - dựng riêng KHÔNG dùng chung
   .form-row/.form-col (2 class đó là flex HÀNG NGANG dùng cho layout 2 cột
   thông tin khách, ghép thêm nút Áp dụng + dòng thông báo bên dưới vào
   CHUNG 1 hàng ngang đó khiến dòng thông báo lỗi bị ép nằm CẠNH ô nhập thay
   vì xuống dòng, nhìn bóp méo/nhảy hàng như ảnh chụp màn hình đã gửi). ---------- */
.discount-code-box { margin-bottom: 14px; }
.discount-code-row { display: flex; gap: 8px; }
.discount-code-row .form-input { flex: 1; min-width: 0; }
.discount-code-apply-btn { padding: 0 16px; white-space: nowrap; flex-shrink: 0; }
.discount-code-message { font-size: 12.5px; font-weight: 600; margin-top: 8px; line-height: 1.6; }
.discount-code-message.is-success { color: var(--forest-700); }
.discount-code-message.is-error { color: #c0392b; }
.discount-code-remove-btn {
  display: inline-block; margin-left: 4px; background: none; border: none; color: var(--ink-600);
  text-decoration: underline; font-size: 12px; font-weight: 600; cursor: pointer; padding: 0; font-family: var(--font-body);
}

/* ---------- Voucher/mã giảm giá của Sale hiện sẵn ngay trong khung đặt
   phòng (booking.php) - dạng thẻ vé số bo góc kiểu "ticket", cuộn ngang nếu
   nhiều voucher, có hiệu ứng lấp lánh nhẹ trên viền để bắt mắt mà không quá
   loè loẹt. Bấm thẳng vào thẻ là tự áp mã (xem applyVoucherCard() trong
   booking.php), không cần gõ tay. ---------- */
.voucher-showcase { margin-bottom: 16px; }
.voucher-showcase-title { font-weight: 700; font-size: 14px; margin-bottom: 10px; }
.voucher-scroll-row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; scroll-snap-type: x proximity; }
.voucher-card {
  position: relative; flex: 0 0 auto; width: 168px; scroll-snap-align: start; cursor: pointer;
  background: linear-gradient(135deg, #fff7ed, #fff); border: 1.5px dashed #f59e0b; border-radius: 14px;
  padding: 14px 14px 12px; box-shadow: 0 3px 10px rgba(245,158,11,.15); transition: transform .15s, box-shadow .15s;
  overflow: hidden;
}
.voucher-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(245,158,11,.28); }
.voucher-card::before {
  /* Dải sáng lướt qua nhẹ nhàng, lặp lại - gợi cảm giác "vé số/ưu đãi" lấp
     lánh mà không làm phân tán khỏi nội dung voucher. Tự tắt cho người dùng
     đã bật "giảm chuyển động" của hệ điều hành. */
  content: ''; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,.55), transparent);
  animation: voucherShine 3.2s ease-in-out infinite;
}
@keyframes voucherShine {
  0% { left: -60%; }
  50% { left: 130%; }
  100% { left: 130%; }
}
@media (prefers-reduced-motion: reduce) {
  .voucher-card::before { animation: none; }
}
.voucher-card-ribbon { font-size: 20px; margin-bottom: 4px; }
.voucher-card-value { font-weight: 800; font-size: 16px; color: #b45309; }
.voucher-card-code { font-weight: 700; font-size: 12.5px; color: var(--ink-900); letter-spacing: .5px; margin-top: 2px; }
.voucher-card-meta { font-size: 10.5px; color: var(--ink-600); margin-top: 6px; line-height: 1.5; }
.voucher-card-cta { font-size: 11px; font-weight: 700; color: #b45309; margin-top: 8px; }

/* Icon voucher trên thẻ villa được chia sẻ trong bài viết (feed trang chủ) -
   xem render_shared_embed()/render_villa_card_media() trong includes/helpers.php */
.shared-embed-voucher-badge {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px 5px 8px; border-radius: 20px;
  background: linear-gradient(135deg, #f59e0b, #ea580c); color: #fff; font-size: 11.5px; font-weight: 700;
  box-shadow: 0 3px 10px rgba(234,88,12,.4); animation: voucherBadgePulse 2s ease-in-out infinite;
}
@keyframes voucherBadgePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}
@media (prefers-reduced-motion: reduce) {
  .shared-embed-voucher-badge { animation: none; }
}

.total-box {
  background: var(--page-bg); border-radius: 12px; padding: 20px; margin-bottom: 20px; border: 1px solid var(--border);
}
.total-box .line { display: flex; justify-content: space-between; align-items: center; font-size: 15px; color: var(--ink-900); margin-bottom: 12px; }
.total-box .line.total { font-weight: 700; font-size: 18px; color: var(--forest-800); padding-top: 12px; margin-top: 5px; margin-bottom: 0; border-top: 1px solid var(--border-strong); }
.total-box .note { font-size: 12px; color: var(--ink-600); margin-top: 8px; text-align: right; }
.total-amount-strike { text-decoration: line-through; color: var(--ink-400); font-weight: 400; font-size: 14px; margin-right: 8px; }
.total-amount-final { color: #c81e3a; font-weight: 800; }
.total-savings-badge {
  display: inline-flex; align-items: center; gap: 4px; margin-top: 8px;
  background: linear-gradient(135deg, #ffe1e6, #ffd0da); color: #c81e3a;
  border: 1px solid #f7b8c4; border-radius: 20px; padding: 5px 12px;
  font-size: 12.5px; font-weight: 700;
}

.btn-continue {
  display: block; width: 100%; margin: 0; padding: 16px; text-align: center;
  background: var(--forest-600); color: var(--white); font-weight: 600; border: none; border-radius: 5px; font-size: 16px;
  box-shadow: 0 4px 6px rgba(47,92,68,.2); cursor: pointer;
}
.btn-continue:disabled { opacity: .6; cursor: not-allowed; }

/* ---------- Trang đăng ký đối tác (Sale/Host) ---------- */
.partner-form-card { background: var(--white); border-radius: 12px; box-shadow: 0 1px 2px rgba(0,0,0,.1); padding: 30px 24px; margin-bottom: 20px; }
.partner-form-header { margin-bottom: 25px; border-bottom: 1px solid var(--border); padding-bottom: 20px; }
.partner-form-header h2 { font-size: 22px; font-weight: 700; color: var(--forest-800); margin: 0 0 8px; }
.partner-form-header p { font-size: 14px; color: var(--ink-600); margin: 0; }
.partner-section-title { font-size: 16px; font-weight: 600; color: var(--ink-900); margin: 0 0 15px; display: flex; align-items: center; gap: 8px; }

.partner-checkbox-group { display: flex; flex-direction: column; gap: 12px; }
.partner-checkbox-label {
  display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--ink-900); cursor: pointer;
  padding: 12px 15px; border: 1px solid var(--border); border-radius: 8px; transition: background .2s, border-color .2s;
}
.partner-checkbox-label:hover { background: var(--page-bg); }
.partner-checkbox-label.active { border-color: var(--forest-600); background: var(--active-bg); }
.partner-checkbox-label input[type="checkbox"] { accent-color: var(--forest-600); width: 18px; height: 18px; flex-shrink: 0; }

.partner-warning-box { background: #fef5e7; border: 1px solid #f6e5c0; border-radius: 8px; padding: 15px; font-size: 13.5px; color: #8a5a10; line-height: 1.6; margin-bottom: 15px; }

.partner-file-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.partner-file-box { border: 2px dashed var(--border); border-radius: 8px; padding: 20px; text-align: center; background: var(--page-bg); }
.partner-file-label { font-size: 14px; color: var(--ink-900); font-weight: 600; display: block; margin-bottom: 8px; }
.partner-file-box input[type="file"] { font-size: 12px; color: var(--ink-600); width: 100%; }

.partner-bank-block { background: var(--page-bg); border: 1px solid var(--border); border-radius: 8px; padding: 20px; margin-bottom: 15px; }
.partner-bank-block-title { font-size: 14px; font-weight: 700; color: var(--forest-800); margin-bottom: 15px; display: flex; justify-content: space-between; align-items: center; }
.partner-bank-optional { color: var(--ink-600); font-weight: 500; font-size: 12px; }

@media (max-width: 480px) {
  .form-row { flex-direction: column; gap: 15px; }
  .partner-file-grid { grid-template-columns: 1fr; }
}
.contact-host-link-inline { color: var(--forest-700); font-weight: 600; text-decoration: underline; }

/* ---------- Alert ---------- */
.alert { margin: 10px 16px; padding: 11px 14px; border-radius: 8px; font-size: 13.5px; }
.alert-success { background: #e4f3e6; color: #205c2b; }
.alert-error { background: #f7e3e0; color: #8a2c1d; }

/* ---------- Placeholder screens (Khám phá/Thông báo/Cá nhân) ---------- */
.placeholder-screen {
  padding: 60px 30px; text-align: center; color: var(--ink-600);
}
.placeholder-screen .emoji { font-size: 40px; margin-bottom: 14px; }
.placeholder-screen h3 { color: var(--ink-900); font-family: var(--font-display); }

/* =====================================================
   ADMIN BACKOFFICE — giữ giao diện riêng (desktop tool)
   ===================================================== */
.admin-shell { display: flex; min-height: 100vh; font-family: var(--font-body); }
.admin-nav { width: 220px; background: var(--forest-800); color: var(--white); padding: 20px 14px; flex-shrink: 0; }
.admin-nav .brand { font-family: var(--font-display); font-size: 19px; margin-bottom: 24px; color: var(--amber-500); }
.admin-nav a { display: block; padding: 10px 12px; border-radius: 8px; font-size: 14px; margin-bottom: 4px; color: var(--white); }
.admin-nav a.active, .admin-nav a:hover { background: var(--forest-700); }
/* Nhóm menu gấp/mở (accordion) - trước đây menu Admin/Quản lý dài phẳng
   ~13 mục liên tiếp, rất rối mắt. Giờ gom thành nhóm, mặc định thu gọn, chỉ
   hiện đúng tiêu đề nhóm - bấm vào mới xổ ra các mục con. Nhóm nào ĐANG
   CHỨA trang đang xem thì PHP tự thêm class "open" sẵn (xem
   includes/admin_header.php), không cần khách tự mò. */
.admin-nav-group { margin-bottom: 4px; }
.admin-nav-group-head {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; border-radius: 8px; background: none; border: none; cursor: pointer;
  color: rgba(255,255,255,.85); font-size: 13.5px; font-weight: 700; font-family: var(--font-body);
  text-align: left; transition: background-color .15s;
}
.admin-nav-group-head:hover { background: rgba(255,255,255,.06); }
.admin-nav-group-chevron { transition: transform .2s; font-size: 15px; opacity: .7; }
.admin-nav-group.open .admin-nav-group-chevron { transform: rotate(90deg); }
.admin-nav-submenu { display: none; padding-left: 10px; border-left: 1px solid rgba(255,255,255,.12); margin: 2px 0 2px 14px; }
.admin-nav-group.open .admin-nav-submenu { display: block; }
.admin-nav-submenu a { font-size: 13px; padding: 8px 10px; }

.admin-main { flex: 1; padding: 28px 32px; background: var(--page-bg); }
.admin-main > * { max-width: 1200px; margin-left: auto; margin-right: auto; }
.admin-main h1 { font-family: var(--font-display); color: var(--forest-700); }
.string-lights { display: flex; align-items: center; gap: 10px; margin: 6px 0 14px; }
.string-lights::before, .string-lights::after {
  content: ""; flex: 1; height: 1px;
  background: repeating-linear-gradient(to right, var(--amber-500) 0, var(--amber-500) 4px, transparent 4px, transparent 14px);
  opacity: .55;
}
.string-lights span { width: 6px; height: 6px; border-radius: 50%; background: var(--amber-500); box-shadow: 0 0 6px 2px rgba(227,168,87,.55); flex-shrink: 0; }

table.data-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: 10px; overflow: hidden; }
table.data-table th, table.data-table td { text-align: left; padding: 10px 14px; font-size: 14px; border-bottom: 1px solid var(--border); }
table.data-table th { background: var(--forest-700); color: var(--white); font-weight: 600; }
.status-pill { padding: 3px 10px; border-radius: 5px; font-size: 12px; font-weight: 600; }
.status-pending { background: #fbe8cf; color: #8a5a1d; }
.status-confirmed { background: #dcf0de; color: #205c2b; }
.status-cancelled { background: #f4d9d5; color: #8a2c1d; }
.card { background: var(--white); border-radius: var(--radius-card); box-shadow: var(--shadow-card); overflow: hidden; margin-bottom: 20px; }
.card .body { padding: 16px 18px 18px; }
.btn { display: inline-block; padding: 9px 18px; border-radius: 5px; font-weight: 600; font-size: 14px; border: none; cursor: pointer; font-family: var(--font-body); }
.btn-primary { background: var(--amber-500); color: var(--forest-800); }
.btn-outline { background: transparent; border: 1px solid var(--border-strong); color: var(--ink-900); }
.meta-mini { font-size: 13px; color: var(--ink-600); }

.login-shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--forest-800); }
.login-box { background: var(--white); padding: 32px; border-radius: 16px; width: 340px; box-shadow: var(--shadow-card); }
.login-box h2 { font-family: var(--font-display); color: var(--forest-700); margin-top: 0; }
.login-box input { width: 100%; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--border-strong); margin-bottom: 12px; font-family: var(--font-body); }
.login-box button { width: 100%; padding: 11px; }

/* ---------- Reaction picker + Comment box (tính năng xã hội) ---------- */
.post-actions-wrap { position: relative; }
.react-picker {
  /* TRƯỚC ĐÂY "bottom:40px" không đủ chỗ trống để bung lên KHỎI cả dòng
     nút (Thích/Bình luận/Chia sẻ, ~30px) LẪN dòng đếm lượt thích/bình
     luận (.post-stats, ~28px) ngay phía trên nó - khiến bảng cảm xúc bị
     ĐÈ CHỒNG lên đúng dòng chữ đó (nhìn như bị "chìm xuống lớp dưới").
     Tăng khoảng cách đủ rộng để bung hẳn lên trên, đồng thời tăng z-index
     cao hơn hẳn để chắc chắn luôn nổi trên MỌI nội dung khác trong thẻ. */
  display: none; position: absolute; bottom: 70px; left: 8px; z-index: 45;
  background: var(--white); border-radius: 30px; padding: 6px 10px;
  box-shadow: 0 3px 14px rgba(0,0,0,.18); gap: 6px;
}
.react-picker.show { display: flex; }
.react-picker span { font-size: 23px; cursor: pointer; transition: transform .12s; }
.react-picker span:hover { transform: scale(1.35) translateY(-3px); }
.post-actions button.liked { color: var(--forest-700); }

.comment-box { display: none; padding: 10px 14px 14px; border-top: 1px solid var(--border); }
.comment-box.show { display: block; }
.comment-list {
  /* KHÔNG còn cố định "max-height:260px; overflow-y:auto" mặc định nữa -
     trước đây bấm "Xem thêm bình luận" xong vẫn bị nhét gọn vào khung nhỏ
     xíu, phải kéo thanh cuộn lên xuống rất khó coi. Giờ khung này cao tự
     nhiên theo đúng số bình luận đang hiện, cuộn CHUNG với cả trang - CHỈ
     khi số bình luận hiện ra đã rất nhiều (xem .is-long-list, bật tự động
     qua JS khi vượt COMMENT_LIST_SCROLL_THRESHOLD trong social-v2.js) mới
     giới hạn chiều cao + có thanh cuộn riêng, tránh trang bị kéo dài vô tận
     với bài viết có hàng ngàn/chục ngàn bình luận. */
  margin-bottom: 4px;
}
.comment-list.is-long-list { max-height: 640px; overflow-y: auto; }
.comment-form { display: flex; gap: 8px; margin-top: 8px; align-items: center; }
.comment-form input {
  flex: 1; border: 1px solid var(--border); border-radius: 18px; padding: 9px 14px;
  font-size: 13.5px; font-family: var(--font-body); background: var(--page-bg);
}
.comment-form button {
  border: none; background: var(--forest-600); color: var(--white);
  border-radius: 5px; padding: 9px 16px; font-size: 13px; font-weight: 700; cursor: pointer;
}

/* Grid ảnh/video nhiều tấm cho bài viết (gộp chung, tham khảo bố cục Facebook chuẩn) */
.post-image-grid { display: grid; gap: 3px; }
.post-image-grid.n1 { grid-template-columns: 1fr; }
.post-image-grid.n1 .media-tile { aspect-ratio: 4/3; }
.post-image-grid.n2 { grid-template-columns: 1fr 1fr; }
.post-image-grid.n2 .media-tile { aspect-ratio: 1; }
.post-image-grid.n3 { grid-template-columns: 2fr 1fr; grid-template-rows: 150px 150px; }
.post-image-grid.n3 .media-tile:first-child { grid-row: span 2; height: 100%; }
.post-image-grid.n3 .media-tile:not(:first-child) { height: 100%; }
.post-image-grid.n4plus { grid-template-columns: 1fr 1fr; }
.post-image-grid.n4plus .media-tile { aspect-ratio: 1; }
.media-tile { position: relative; overflow: hidden; cursor: pointer; background: #000; }
/* Áp dụng CHUNG cho MỌI kiểu lưới (n1/n2/n3/n4plus) - ảnh/video LUÔN lấp đầy
   trọn khung ô, không phụ thuộc kích thước gốc của ảnh/video - đây là lỗi
   gốc gây "thụt lên thụt xuống, hở khoảng trống" trước đây: chỉ có 1 khung
   .media-tile (ngoài) đặt aspect-ratio, còn <img>/<video> (trong) không có
   quy tắc lấp đầy nào, tuỳ ảnh/video co giãn khác nhau gây lệch từng ô. */
.media-tile img, .media-tile video { width: 100%; height: 100%; object-fit: cover; display: block; }
.video-play-badge {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 44px; height: 44px; border-radius: 50%; background: rgba(0,0,0,.5);
  color: #fff; display: flex; align-items: center; justify-content: center; font-size: 16px; pointer-events: none;
}
.media-tile.more-overlay::after {
  content: attr(data-more); position: absolute; inset: 0; background: rgba(0,0,0,.45);
  color: #fff; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700;
}

/* Top bar khi đã đăng nhập: avatar user + link đăng xuất */
.user-chip { display:flex; align-items:center; gap:6px; }
.user-chip img { width:30px; height:30px; border-radius:50%; object-fit:cover; }

/* ---------- Share sheet (menu chia sẻ dạng bottom sheet) ---------- */
.share-sheet {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 200;
  align-items: flex-end; justify-content: center;
}
.share-sheet.show { display: flex; }
.share-sheet-inner {
  background: var(--white); width: 100%; max-width: 470px; border-radius: 16px 16px 0 0;
  padding: 10px 0 24px;
}
.share-sheet-title { text-align:center; font-weight:700; font-size:15px; padding:10px 0 14px; border-bottom:1px solid var(--border); margin-bottom:6px; }
.share-opt {
  display:flex; align-items:center; gap:12px; width:100%; text-align:left; background:none; border:none;
  padding:13px 20px; font-size:14.5px; font-weight:600; color:var(--ink-900); cursor:pointer; font-family:var(--font-body);
}
.share-opt:active { background: var(--page-bg); }
.share-ic { width:32px; height:32px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:15px; color:#fff; flex-shrink:0; }

/* ---------- Menu "..." trên bài viết ---------- */
.post-menu-wrap { position: relative; }
.post-menu-dropdown {
  display: none; position: absolute; right: 0; top: 32px; z-index: 30;
  background: var(--white); border-radius: 10px; box-shadow: 0 3px 14px rgba(0,0,0,.18);
  min-width: 200px; overflow: hidden; padding: 6px 0;
}
.post-menu-dropdown.show { display: block; }
.post-menu-dropdown button {
  display: block; width: 100%; text-align: left; background: none; border: none;
  padding: 10px 16px; font-size: 13.5px; font-family: var(--font-body); color: var(--ink-900); cursor: pointer;
}
.post-menu-dropdown button:hover { background: var(--page-bg); }
.post-menu-dropdown button.danger { color: var(--heart-red); }

/* ---------- Bình luận lồng cấp (reply) ---------- */
.comment-item { margin-bottom: 10px; }
.comment-row { display: flex; gap: 8px; }
.comment-bubble { background: var(--page-bg); border-radius: 14px; padding: 7px 12px; flex: 1; }
.comment-bubble b { font-size: 13px; }
.comment-bubble span { font-size: 13.5px; }
.comment-actions { display: flex; gap: 14px; font-size: 12px; color: var(--ink-600); margin: 3px 0 0 12px; font-weight: 600; }
.comment-actions button { background: none; border: none; color: var(--ink-600); font-size: 12px; font-weight: 600; cursor: pointer; padding: 0; font-family: var(--font-body); }
.comment-pinned-badge { display: inline-block; background: #fbeee0; color: #a06a12; font-size: 10.5px; font-weight: 700; border-radius: 5px; padding: 1px 6px; margin-left: 6px; vertical-align: middle; }

/* ---------- Thả cảm xúc NGAY TRÊN 1 bình luận (giống .react-picker của cả
   bài viết, thu nhỏ lại cho vừa 1 dòng bình luận) ---------- */
.comment-react-count {
  align-self: flex-end; flex-shrink: 0; background: var(--white); border: 1px solid var(--border);
  border-radius: 10px; padding: 1px 7px; font-size: 11px; font-weight: 600; color: var(--ink-600);
  box-shadow: 0 1px 3px rgba(0,0,0,.08); margin-bottom: 2px; white-space: nowrap;
}
.comment-react-wrap { position: relative; }
.comment-react-btn {
  background: none; border: none; color: var(--ink-600); font-size: 12px; font-weight: 700;
  cursor: pointer; padding: 0; font-family: var(--font-body);
}
.comment-react-btn.liked { color: var(--forest-700); }
.comment-react-picker {
  /* TRƯỚC ĐÂY thu nhỏ hơn bảng cảm xúc của cả bài viết (emoji 18px, ít
     khoảng đệm hơn) - người dùng phản ánh khó bấm trúng, nên GIỜ dùng ĐÚNG
     kích thước/khoảng cách như .react-picker của cả bài viết (padding
     6px 10px, gap 6px, emoji 23px) cho dễ chọn như nhau ở mọi nơi. Vị trí
     thật giờ do JS tính (position:fixed - xem showReactPicker() trong
     social-v2.js), các giá trị bottom/left dưới đây chỉ là fallback an
     toàn nếu JS lỡ không chạy được vì lý do gì đó. */
  bottom: 26px; left: -8px; z-index: 45;
}

.comment-replies { margin-left: 34px; margin-top: 6px; }
.reply-input-row { display: none; gap: 8px; margin: 8px 0 0 34px; }
.reply-input-row.show { display: flex; }
.reply-input-row input {
  flex: 1; border: 1px solid var(--border); border-radius: 16px; padding: 7px 12px; font-size: 13px; font-family: var(--font-body); background: var(--page-bg);
}
.load-more-comments {
  background: none; border: none; color: var(--ink-600); font-size: 13px; font-weight: 600; cursor: pointer; padding: 4px 0; font-family: var(--font-body);
}
.load-more-replies {
  background: none; border: none; color: var(--ink-600); font-size: 12px; font-weight: 600; cursor: pointer; padding: 4px 0 4px 12px; font-family: var(--font-body); display: block;
}

/* ---------- Emoji picker ---------- */
.emoji-btn { background:none; border:none; font-size:18px; cursor:pointer; padding:4px; flex-shrink:0; }
.emoji-picker-panel {
  /* Giờ JS tự tính toạ độ THẬT (position:fixed) và gắn thẳng vào <body> -
     xem toggleEmojiPicker() trong social-v2.js - để không còn bị
     ".post"/".comment-list" (đều có overflow:hidden/auto) cắt mất 1 phần
     bảng emoji như trước. Các giá trị top/right dưới đây chỉ là fallback
     an toàn nếu JS lỡ không chạy được vì lý do gì đó. */
  position: fixed; z-index: 900;
  background: var(--white); border-radius: 12px;
  box-shadow: 0 6px 24px rgba(0,0,0,.22); padding: 8px; display: grid;
  grid-template-columns: repeat(6, 1fr); gap: 4px;
}
.emoji-picker-panel span { font-size: 20px; cursor: pointer; text-align: center; padding: 3px; border-radius: 6px; }
.emoji-picker-panel span:hover { background: var(--page-bg); }
.comment-form, .reply-input-row { position: relative; }

/* ---------- Dropdown gợi ý bạn bè khi gõ "@" trong khung bình luận ---------- */
.mention-dropdown {
  display: none; position: absolute; left: 0; right: 0; bottom: calc(100% + 6px);
  background: var(--white); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,.18); max-height: 220px; overflow-y: auto; z-index: 100;
}
.mention-dropdown.show { display: block; }
.mention-dropdown-item { display: flex; align-items: center; gap: 8px; padding: 8px 12px; cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--ink-900); }
.mention-dropdown-item > img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--page-bg); }
.mention-dropdown-item.active, .mention-dropdown-item:hover { background: var(--active-bg); }
.mention-dropdown-empty { padding: 10px 12px; font-size: 12.5px; color: var(--ink-600); }

/* ---------- Số bình luận/chia sẻ bấm được ---------- */
.stat-link {
  background: none; border: none; padding: 0; font-size: 13px; color: var(--ink-600);
  cursor: pointer; font-family: var(--font-body); text-decoration: none;
}
.stat-link:hover { text-decoration: underline; }

/* ---------- Ảnh đính kèm bình luận ---------- */
.comment-attached-image { max-width: 160px; border-radius: 8px; margin-top: 6px; cursor: pointer; display: block; }
.comment-image-preview { margin: 6px 0 0 0; }
.preview-thumb { position: relative; display: inline-block; }
.preview-thumb img { max-width: 90px; border-radius: 8px; display: block; }
.preview-thumb button {
  position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--ink-900); color: #fff; border: none; font-size: 11px; cursor: pointer; line-height: 1;
}

/* ---------- Nút Theo dõi ngay trong header bài viết ---------- */
.inline-follow-btn {
  margin-left: 6px; background: none; border: none; color: var(--forest-600);
  font-size: 12.5px; font-weight: 700; cursor: pointer; padding: 0; font-family: var(--font-body);
}
.inline-follow-btn[data-following="1"] { color: var(--ink-600); }

/* ---------- Lightbox xem ảnh/video phóng to (next/prev/tải xuống) ---------- */
.lightbox-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,.92); z-index: 300;
}
.lightbox-overlay.show { display: block; }
.lightbox-track-viewport { position: absolute; inset: 0; overflow: hidden; touch-action: pan-y; }
.lightbox-track { display: flex; width: 300%; height: 100%; transform: translateX(-33.3333%); will-change: transform; }
.lightbox-slide {
  width: 33.3333%; height: 100%; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  box-sizing: border-box; padding: 54px 14px 90px;
}
.lightbox-slide img, .lightbox-slide video {
  width: 100%; height: 100%; object-fit: contain; border-radius: 6px; display: block;
}
.lightbox-close {
  position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,.15); color: #fff; border: none; font-size: 18px; cursor: pointer; z-index: 2;
}
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,.15); color: #fff; border: none; font-size: 26px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; z-index: 2;
}
.lightbox-prev { left: 10px; }
.lightbox-next { right: 10px; }
.lightbox-toolbar {
  position: absolute; bottom: 18px; left: 0; right: 0; display: flex; align-items: center; justify-content: center; gap: 16px;
}
.lightbox-counter { color: #fff; font-size: 13px; opacity: .8; }
.lightbox-download {
  background: rgba(255,255,255,.15); color: #fff; padding: 8px 16px; border-radius: 5px;
  font-size: 13px; font-weight: 700; text-decoration: none;
}

/* ---------- Màn hình tìm kiếm vị trí check-in (dùng chung cho cả màn
   hình gắn thẻ bạn bè #tagPickerOverlay - xem create_post.php) ----------
   TRƯỚC ĐÂY dùng "inset:0; max-width:470px; margin:0 auto;" để vừa full
   màn hình VỪA giới hạn + căn giữa theo đúng bề rộng .app-shell (470px) -
   nhưng "margin:auto" chỉ có tác dụng căn giữa khi "width" có giá trị CỤ
   THỂ; ở đây "width" vẫn là "auto" (không khai báo) nên theo đúng chuẩn
   CSS, "margin:auto" hầu như KHÔNG được áp dụng - trên di động thì che
   được lỗi này vì màn hình vốn đã hẹp hơn 470px nên nhìn không khác gì,
   nhưng trên desktop (màn rộng hơn 470px) thì lộ rõ: hộp không được co
   lại + căn giữa đúng chỗ, hiện ra như "bảng trắng dài thòng lòng" lệch
   hẳn khỏi khung nội dung, nút "←" đóng lại cũng lọt ra ngoài tầm nhìn dễ
   thấy. Đổi sang kiểu "left:50%; transform:translateX(-50%); width:100%;
   max-width:470px;" - ĐÚNG kiểu đã dùng ổn định cho .bottom-nav/.sticky-cta
   trong chính file này - để đảm bảo luôn co đúng 470px và căn giữa chính
   xác trên MỌI kích thước màn hình. */
.checkin-overlay {
  display: none; position: fixed; top: 0; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 470px; background: var(--white); z-index: 250; overflow-y: auto;
}
.checkin-overlay.show { display: block; }
.checkin-search-topbar {
  display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--white);
}
.checkin-search-topbar .back { font-size: 20px; background: none; border: none; cursor: pointer; color: var(--ink-900); }
.checkin-search-topbar h2 { font-size: 16px; margin: 0; font-weight: 700; }
.checkin-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); cursor: pointer;
}
.checkin-item:active { background: var(--page-bg); }
.checkin-item-icon { font-size: 18px; flex-shrink: 0; }
.checkin-item-name { font-size: 14px; font-weight: 600; color: var(--ink-900); }
.checkin-item-sub { font-size: 12px; color: var(--ink-600); margin-top: 1px; text-transform: capitalize; }

/* ---------- @mention trong bình luận - nổi bật, không lẫn với text thường.
   Giờ là thẻ <a> bấm được (ra thẳng trang cá nhân người được nhắc), không
   còn hiện dấu "@" nữa (JS đã tự bỏ - xem mentionLinkHtml trong social-v2.js),
   y hệt cách Facebook hiển thị mention thật. ---------- */
.mention-tag {
  background: rgba(47,92,68,.12); color: var(--forest-700); font-weight: 700;
  padding: 1px 6px; border-radius: 8px; white-space: nowrap;
  text-decoration: none; cursor: pointer;
}
.mention-tag:hover { text-decoration: underline; }

/* ---------- Trang điểm tích luỹ của khách (/loyalty_points.php) ---------- */
.loyalty-total-card {
  background: linear-gradient(135deg, var(--forest-600), var(--forest-700)); color: #fff;
  border-radius: 16px; padding: 22px; text-align: center; margin-bottom: 18px;
}
.loyalty-total-label { font-size: 12.5px; opacity: .85; font-weight: 600; }
.loyalty-total-value { font-size: 28px; font-weight: 800; margin: 6px 0 8px; }
.loyalty-total-sub { font-size: 12px; opacity: .85; max-width: 320px; margin: 0 auto; }

.loyalty-villa-list { display: flex; flex-direction: column; gap: 8px; }
.loyalty-villa-row {
  display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--white);
  border: 1px solid var(--border); border-radius: 12px; text-decoration: none; color: var(--ink-900);
}
.loyalty-villa-thumb { width: 52px; height: 52px; border-radius: 10px; background-size: cover; background-position: center; background-color: #eee; flex-shrink: 0; }
.loyalty-villa-title { font-weight: 700; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.loyalty-villa-sub { font-size: 11.5px; color: var(--ink-600); margin-top: 2px; }
.loyalty-villa-balance { font-weight: 800; font-size: 15px; color: var(--forest-700); text-align: right; flex-shrink: 0; }
.loyalty-villa-balance span { display: block; font-size: 10px; font-weight: 600; color: var(--ink-500); }

/* ---------- #hashtag trong nội dung bài viết (VD #dalat) - link bấm được
   ra kết quả tìm kiếm đúng hashtag đó ---------- */
.hashtag-link { color: var(--forest-700); font-weight: 700; text-decoration: none; }
.hashtag-link:hover { text-decoration: underline; }

/* ---------- Popup "Thông báo từ sàn" (carousel nếu nhiều thông báo chưa
   đọc cùng lúc) - includes/announcement_popup.php. Trang trí lại HẲN từ
   khối trắng đơn điệu cũ sang kiểu "thẻ ưu đãi nổi bật" - ảnh full-bleed
   che gradient tối phía dưới để chữ tiêu đề nổi hẳn lên TRÊN ảnh (giống
   banner khuyến mãi app đặt phòng thật), có hiệu ứng trượt vào mượt mà lúc
   xuất hiện + đóng lại, dấu chấm chuyển slide dùng màu gradient thay vì
   xanh trơn. ---------- */
@keyframes annPopupCardIn {
  from { transform: scale(.92) translateY(14px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}
@keyframes annPopupOverlayIn {
  from { background: rgba(0,0,0,0); }
  to { background: rgba(0,0,0,.65); }
}
.ann-popup-overlay {
  position: fixed; inset: 0; z-index: 800; background: rgba(0,0,0,.65);
  display: flex; align-items: center; justify-content: center; padding: 20px; box-sizing: border-box;
  animation: annPopupOverlayIn .25s ease-out;
  transition: opacity .2s ease;
}
.ann-popup-overlay.is-closing { opacity: 0; }
.ann-popup-card {
  background: var(--white); border-radius: 22px; max-width: 380px; width: 100%;
  max-height: 88vh; overflow-y: auto; position: relative;
  box-shadow: 0 24px 70px rgba(0,0,0,.35);
  animation: annPopupCardIn .32s cubic-bezier(.2,.9,.3,1.3);
}
.ann-popup-close {
  position: absolute; top: 12px; right: 12px; z-index: 3; width: 32px; height: 32px; border-radius: 50%;
  background: rgba(0,0,0,.4); backdrop-filter: blur(3px); color: #fff; border: none; font-size: 15px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: background .15s;
}
.ann-popup-close:hover { background: rgba(0,0,0,.6); }
.ann-popup-slide { flex-direction: column; }
.ann-popup-image-wrap { position: relative; }
.ann-popup-image {
  width: 100%; aspect-ratio: 16/10; background-size: cover; background-position: center;
  background-color: var(--forest-700);
}
.ann-popup-image-fallback {
  display: flex; align-items: center; justify-content: center; font-size: 52px;
  background: linear-gradient(135deg, var(--forest-700), var(--forest-500));
}
.ann-popup-image-wrap::after {
  /* Dải gradient tối phủ đáy ảnh - để chữ tiêu đề (nếu sau này muốn đặt đè
     lên ảnh) hoặc badge luôn đọc rõ, đồng thời tạo chuyển tiếp mượt xuống
     phần thân trắng bên dưới thay vì cắt ngang đột ngột. */
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 40%;
  background: linear-gradient(180deg, rgba(0,0,0,0), rgba(0,0,0,.35));
  pointer-events: none;
}
.ann-popup-badge {
  position: absolute; top: 14px; left: 14px; z-index: 2;
  background: linear-gradient(135deg, #f59e0b, #ea580c); color: #fff; font-size: 11px; font-weight: 800;
  padding: 5px 12px; border-radius: 20px; box-shadow: 0 3px 10px rgba(234,88,12,.4);
  text-transform: uppercase; letter-spacing: .4px;
}
.ann-popup-media-strip { display: flex; gap: 6px; padding: 12px 20px 0; overflow-x: auto; }
.ann-popup-media-thumb { width: 60px; height: 60px; border-radius: 10px; background-size: cover; background-position: center; background-color: #eee; flex-shrink: 0; object-fit: cover; }
.ann-popup-body { padding: 20px; }
.ann-popup-title { font-weight: 800; font-size: 18px; margin-bottom: 8px; line-height: 1.35; color: var(--ink-900); }
.ann-popup-event {
  font-size: 12.5px; font-weight: 700; color: var(--forest-700); background: var(--active-bg);
  display: inline-flex; align-items: center; gap: 4px; padding: 4px 12px; border-radius: 20px; margin-bottom: 12px;
}
.ann-popup-content { font-size: 14px; color: var(--ink-800); line-height: 1.65; }
.ann-popup-content p { margin: 0 0 8px; }
.ann-content-link { color: var(--forest-700); font-weight: 700; text-decoration: underline; word-break: break-word; }

/* ---------- Cảnh báo tài khoản Sale/Host ĐANG BỊ KHOÁ/ĐÃ XOÁ - hiện trên
   MỌI bài viết/villa/link của tài khoản đó, dù cũ hay mới, kể cả khi đang
   xem qua khung "chia sẻ lại" - tránh khách lỡ giao dịch/chuyển khoản với
   tài khoản không còn hoạt động bình thường. ---------- */
.account-warning-banner {
  padding: 10px 14px; font-size: 12.5px; font-weight: 600; line-height: 1.5;
  border-radius: 0; margin: 0;
}
.account-warning-banner { background: #fce8e6; color: #9b2c1f; border-bottom: 1px solid #f3b8b0; }
.account-warning-suspended { background: #fce8e6; color: #9b2c1f; border-bottom: 1px solid #f3b8b0; }
.account-warning-deleted { background: #fce8e6; color: #9b2c1f; border-bottom: 1px solid #f3b8b0; }
.post .account-warning-banner:first-child, .shared-embed .account-warning-banner:first-child { border-radius: 16px 16px 0 0; }
.ann-popup-link {
  display: block; margin-top: 16px; text-align: center; background: linear-gradient(135deg, var(--forest-600), #059669);
  color: #fff; font-weight: 700; padding: 12px; border-radius: 12px; text-decoration: none;
  box-shadow: 0 6px 16px rgba(47,92,68,.3); transition: transform .15s;
}
.ann-popup-link:active { transform: scale(.97); }
.ann-popup-nav { display: flex; align-items: center; justify-content: space-between; padding: 0 20px 4px; }
.ann-popup-nav button { background: none; border: none; color: var(--forest-700); font-weight: 700; font-size: 13px; cursor: pointer; padding: 6px; }
.ann-popup-dots { display: flex; gap: 6px; }
.ann-popup-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--border-strong); transition: all .2s; }
.ann-popup-dot.active { background: linear-gradient(135deg, var(--forest-600), #059669); width: 20px; border-radius: 4px; }
.ann-popup-footer { padding: 14px 20px 20px; display: flex; flex-direction: column; gap: 8px; }
.ann-popup-seeall-btn { text-align: center; font-size: 12.5px; font-weight: 700; color: var(--forest-700); text-decoration: none; padding: 4px; }
.ann-popup-done-btn { display: block; width: 100%; padding: 12px; border-radius: 12px; border: 1.5px solid var(--border-strong); background: var(--white); color: var(--ink-700); font-weight: 700; cursor: pointer; font-family: var(--font-body); transition: background .15s; }
.ann-popup-done-btn:hover { background: var(--page-bg); }

/* ---------- Trang "Tất cả thông báo" (announcements.php - khách/Sale/Host) ---------- */
.ann-list-item { display: flex; gap: 12px; padding: 14px; border-radius: 12px; margin-bottom: 8px; background: var(--white); border: 1px solid var(--border); cursor: pointer; text-decoration: none; color: inherit; }
.ann-list-item.is-unread { background: var(--active-bg); border-color: var(--forest-500); }
.ann-list-thumb { width: 56px; height: 56px; border-radius: 10px; background-size: cover; background-position: center; background-color: var(--page-bg); flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 22px; }
.ann-list-title { font-weight: 700; font-size: 14px; }
.ann-list-snippet { font-size: 12.5px; color: var(--ink-600); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ann-list-time { font-size: 11px; color: var(--ink-400); margin-top: 4px; }
.ann-unread-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--forest-600); flex-shrink: 0; margin-top: 4px; }
.search-section-title { font-weight: 700; font-size: 13px; color: var(--ink-500); text-transform: uppercase; letter-spacing: .4px; margin: 16px 4px 8px; }
.search-section-title:first-child { margin-top: 4px; }
@media (prefers-reduced-motion: reduce) {
  .ann-popup-overlay, .ann-popup-card { animation: none; }
}

/* ---------- Trang chi tiết bản tin (announcement_detail.php) - kiểu "tấm
   phiếu nổi trên ảnh hero" (bottom-sheet style, giống Airbnb/app đặt phòng
   hiện đại) thay hẳn bố cục phẳng cũ: ảnh hero full-bleed cao, phần nội
   dung là 1 tấm thẻ trắng bo góc TRÊN, ĐÈ NHẸ LÊN ảnh (margin-top âm), tạo
   cảm giác 3D/phân lớp rõ ràng thay vì mọi thứ dính phẳng liền 1 khối. ---------- */
.ann-detail-page { max-width: 640px; margin: 0 auto; background: var(--page-bg); }
.ann-detail-hero {
  position: relative; width: 100%; height: 260px; background-size: cover; background-position: center;
  background-color: var(--forest-700);
}
.ann-detail-hero-fallback {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 68px;
  background: linear-gradient(135deg, var(--forest-700), var(--forest-500));
}
.ann-detail-hero-overlay {
  position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.25) 0%, rgba(0,0,0,0) 35%, rgba(0,0,0,.15) 100%);
}
.ann-detail-back-btn {
  position: absolute; top: 16px; left: 16px; z-index: 2; width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,.92); backdrop-filter: blur(4px); color: var(--ink-900); display: flex;
  align-items: center; justify-content: center; text-decoration: none; font-size: 18px; font-weight: 700;
  box-shadow: 0 3px 10px rgba(0,0,0,.2);
}
.ann-detail-audience-badge {
  position: absolute; top: 18px; right: 16px; z-index: 2; color: #fff; font-size: 11.5px; font-weight: 800;
  padding: 7px 14px; border-radius: 20px; box-shadow: 0 4px 12px rgba(0,0,0,.3); text-transform: uppercase; letter-spacing: .4px;
}
.ann-detail-sheet {
  position: relative; background: var(--white); border-radius: 26px 26px 0 0; margin-top: -28px;
  padding: 12px 22px 28px; box-shadow: 0 -8px 24px rgba(0,0,0,.06); min-height: 40vh;
}
.ann-detail-sheet-handle { width: 40px; height: 4px; border-radius: 4px; background: var(--border-strong); margin: 0 auto 18px; }
.ann-detail-title { font-size: 22px; font-weight: 800; line-height: 1.32; margin: 0 0 10px; color: var(--ink-900); }
.ann-detail-meta { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-500); margin-bottom: 18px; font-weight: 600; }
.ann-detail-source { color: var(--forest-700); }
.ann-detail-dot { opacity: .5; }
.ann-detail-event-card {
  display: flex; align-items: center; gap: 12px; background: linear-gradient(135deg, var(--active-bg), #fff);
  border: 1px solid var(--forest-500); border-radius: 14px; padding: 12px 16px; margin-bottom: 18px;
}
.ann-detail-event-icon { font-size: 26px; flex-shrink: 0; }
.ann-detail-event-label { font-size: 11px; color: var(--ink-600); font-weight: 600; text-transform: uppercase; letter-spacing: .3px; }
.ann-detail-event-value { font-size: 14.5px; font-weight: 800; color: var(--forest-800); margin-top: 1px; }
.ann-detail-content { font-size: 15px; line-height: 1.8; color: var(--ink-900); }
.ann-detail-content p { margin: 0 0 12px; }
.ann-detail-gallery-title { font-weight: 700; font-size: 14px; margin: 24px 0 10px; }
.ann-detail-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.ann-detail-gallery-item { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 14px; background: #000; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.ann-detail-link-btn {
  display: block; margin-top: 26px; text-align: center; background: linear-gradient(135deg, var(--forest-600), #059669);
  color: #fff; font-weight: 700; padding: 15px; border-radius: 16px; text-decoration: none; font-size: 15.5px;
  box-shadow: 0 10px 24px rgba(47,92,68,.32); transition: transform .15s;
}
.ann-detail-link-btn:active { transform: scale(.98); }
.ann-detail-back-link { display: block; text-align: center; padding: 22px 0 4px; color: var(--forest-700); font-weight: 700; text-decoration: none; font-size: 13.5px; }

/* ---------- Dropdown avatar trên header (Trang cá nhân/Đăng xuất) ---------- */
.header-avatar-wrap { position: relative; }
.header-avatar-dropdown {
  display: none; position: absolute; right: 0; top: 42px; z-index: 60;
  background: var(--white); border-radius: 12px; box-shadow: 0 3px 14px rgba(0,0,0,.18);
  min-width: 240px; overflow: hidden; padding: 8px 0;
}
.header-avatar-dropdown.show { display: block; }
.header-avatar-dropdown-name { padding: 8px 16px 6px; font-weight: 700; font-size: 13.5px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.header-avatar-dropdown a {
  display: block; padding: 10px 16px; font-size: 13.5px; color: var(--ink-900); font-weight: 500; white-space: nowrap;
}
.header-avatar-dropdown a:hover { background: var(--page-bg); }

/* ---------- Bài viết nền màu kiểu Facebook (chỉ áp dụng khi không có ảnh/video) ---------- */
.post-colorful {
  width: 100%; aspect-ratio: 1/1; max-height: 340px; display: flex; align-items: center; justify-content: center;
  padding: 30px; text-align: center; box-sizing: border-box; overflow: hidden; margin-bottom: 10px;
}
.post-colorful.expanded { aspect-ratio: unset; max-height: none; min-height: 220px; }
.post-colorful .post-text {
  color: #fff; font-size: 24px; font-weight: 700; line-height: 1.4;
  text-shadow: 0 1px 3px rgba(0,0,0,.25); word-break: break-word; max-width: 100%;
}
.post-colorful .see-more-link { color: #fff; text-decoration: underline; font-weight: 700; font-size: 0.8em; opacity: .9; cursor: pointer; white-space: nowrap; }
.bg-purple { background: #6C3EE8; }
.bg-sunset { background: linear-gradient(135deg, #FF6B6B, #FFA36C); }
.bg-ocean  { background: linear-gradient(135deg, #1CB5E0, #000851); }
.bg-forest { background: linear-gradient(135deg, #11998e, #38ef7d); }
.bg-berry  { background: linear-gradient(135deg, #C33764, #1D2671); }
.bg-gold   { background: linear-gradient(135deg, #F7971E, #FFD200); }
.bg-night  { background: linear-gradient(135deg, #232526, #414345); }
.bg-candy  { background: linear-gradient(135deg, #ee9ca7, #ffdde1); }

.swatch-picker { display: flex; gap: 8px; padding: 10px 0; overflow-x: auto; }
.swatch-picker .swatch {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; cursor: pointer;
  border: 2px solid transparent; transition: transform .15s;
}
.swatch-picker .swatch.selected { border-color: var(--ink-900); transform: scale(1.1); }
.swatch-picker .swatch.none { background: var(--page-bg); display:flex; align-items:center; justify-content:center; font-size:14px; color: var(--ink-600); }

/* ---------- Khung soạn nội dung bài viết (đổi giao diện khi chọn màu nền) ---------- */
.composer-text-box { width: 100%; border-radius: 14px; margin-bottom: 4px; transition: background .2s; overflow: hidden; box-sizing: border-box; cursor: text; }
.composer-text-box textarea {
  width: 100%; min-height: 220px; border: none; background: transparent; resize: vertical; outline: none;
  font-family: var(--font-body); padding: 16px; display: block; box-sizing: border-box;
}
.composer-text-box.has-bg {
  width: 100%; display: flex; align-items: center; justify-content: center; aspect-ratio: 1/1; max-height: 340px; padding: 20px; box-sizing: border-box;
}
.composer-text-box.has-bg textarea {
  color: #fff; font-size: 26px; font-weight: 700; text-align: center; text-shadow: 0 1px 4px rgba(0,0,0,.3);
  min-height: 80px; padding: 0;
}
.composer-text-box.has-bg textarea::placeholder { color: rgba(255,255,255,.85); }
.composer-text-box:not(.has-bg) textarea { font-size: 18px; color: var(--ink-900); }

/* Khung soạn bài contenteditable MỚI (thay <textarea> cũ - giữ định dạng dán
   vào từ Word/trang web, xem create_post.php) - CÙNG kiểu dáng với textarea
   cũ ở trên cho 2 chế độ (thường/nền màu), không lệch nhau. */
.composer-text-box .composer-rich-editor {
  width: 100%; min-height: 220px; border: none; background: transparent; outline: none;
  font-family: var(--font-body); padding: 16px; box-sizing: border-box; font-size: 18px; color: var(--ink-900);
}
.composer-text-box .composer-rich-editor:empty::before {
  content: attr(data-placeholder); color: var(--ink-500); pointer-events: none;
}
/* SỬA LỖI "danh sách lòi ra ngoài, mất định dạng": trình duyệt mặc định thụt
   lề <ul>/<ol> khá rộng (~40px) và không giới hạn chiều rộng - trong khung
   soạn thảo hẹp, danh sách bị TRÀN RA NGOÀI khung, nhìn vỡ layout. Giới hạn
   lại thụt lề vừa phải + đảm bảo nằm gọn trong khung. */
.composer-rich-editor ul, .composer-rich-editor ol {
  margin: 6px 0; padding-left: 22px; max-width: 100%; box-sizing: border-box;
}
.composer-rich-editor li { margin-bottom: 2px; word-break: break-word; }
.composer-text-box.has-bg .composer-rich-editor {
  color: #fff; font-size: 26px; font-weight: 700; text-align: center; text-shadow: 0 1px 4px rgba(0,0,0,.3);
  min-height: 80px; padding: 0;
}
.composer-text-box.has-bg .composer-rich-editor:empty::before { color: rgba(255,255,255,.85); }
/* SỬA LỖI "nút Danh sách dư chữ, tràn ra ngoài khung vuông 30x30": B/I/U chỉ
   có 1 ký tự nên vừa khít ô vuông, nhưng "• Danh sách" dài hơn hẳn nên bị vỡ
   layout khi ép width cố định. Đổi sang min-width + padding ngang để nút tự
   giãn theo đúng độ dài chữ, không còn bị cắt/tràn chữ nữa. Đồng thời tách
   hẳn toolbar thành 1 dải riêng (nền xám nhạt, bo góc trên theo đúng bo góc
   của .composer-card, viền dưới) thay vì để nút nổi trơ trên nền trắng dính
   sát mép thẻ - có khoảng đệm rõ ràng ở 4 phía, nhìn chuyên nghiệp/hiện đại
   hơn, không còn cảm giác "dính viền". */
.composer-rich-toolbar {
  display: flex; gap: 8px; flex-wrap: wrap; padding: 10px 16px; margin: 0 -16px 10px;
  background: var(--page-bg); border-bottom: 1px solid var(--border);
}
.composer-rich-toolbar button {
  min-width: 34px; height: 34px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--border-strong);
  background: #fff; cursor: pointer; box-sizing: border-box;
  font-size: 13px; font-weight: 600; color: var(--ink-700); font-family: var(--font-body);
  display: inline-flex; align-items: center; justify-content: center; gap: 4px; white-space: nowrap;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .08s ease;
}
.composer-rich-toolbar button:hover { background: var(--active-bg); border-color: var(--forest-500); color: var(--forest-700); }
.composer-rich-toolbar button:active { transform: scale(.94); }

/* ---------- Trang tạo bài viết (/create_post.php) - khung thẻ trắng nổi
   bật trên nền xám của app thay vì để mọi thứ bẹt phẳng không viền/không
   bóng đổ như trước (nhìn thiếu điểm nhấn, không khác gì nền trang) -
   dùng ĐÚNG ngôn ngữ thiết kế "thẻ trắng bo góc + đổ bóng nhẹ" đã áp dụng
   ở các nơi khác trong app (VD .side-calendar-card bên property.php) để
   đồng bộ toàn hệ thống. ---------- */
.composer-page { padding: 14px; }
.composer-card {
  background: var(--white); border: 1px solid var(--border); border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06); overflow: hidden;
}
.composer-head {
  display: flex; align-items: center; gap: 11px; padding: 16px 16px 14px;
  background: linear-gradient(180deg, var(--active-bg), rgba(232,245,233,0));
  border-bottom: 1px solid var(--border);
}
.composer-head .avatar { width: 44px; height: 44px; box-shadow: 0 0 0 2px var(--white); }
.composer-visibility-select {
  -webkit-appearance: none; appearance: none;
  font-size: 12.5px; border: 1px solid var(--border-strong); border-radius: 20px; padding: 5px 26px 5px 12px;
  background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2365676b' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 10px center;
  color: var(--ink-900); font-family: var(--font-body); font-weight: 600; cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.composer-visibility-select:hover { border-color: var(--forest-500); }
.composer-visibility-select:focus { outline: none; border-color: var(--forest-500); box-shadow: 0 0 0 3px var(--active-bg); }
.composer-body { padding: 0 18px 18px; }

/* Hàng 3 nút "Ảnh/Video · Check in · Gắn thẻ" - trước đây chỉ là <div
   style="display:flex;gap:8px"> dán thẳng ngay sát nút "Đăng" bên dưới
   (margin-bottom:0), nhìn dính chùm vào nhau. Giờ tách hẳn thành khối riêng
   có nền xám nhạt bao quanh + khoảng cách rõ ràng phía trên VÀ phía dưới
   trước khi tới nút "Đăng", đồng thời thêm hiệu ứng hover/nhấn cho từng nút
   để có cảm giác "bấm được" rõ ràng hơn thay vì phẳng lì. */
.composer-actions-row {
  display: flex; gap: 8px; margin: 14px 0 0; padding-top: 14px; border-top: 1px solid var(--border);
}
.composer-action-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px;
  border: 1px solid var(--border-strong); border-radius: 10px; padding: 11px 6px;
  cursor: pointer; font-weight: 600; font-size: 13.5px; background: var(--page-bg);
  transition: background .15s ease, border-color .15s ease, transform .08s ease;
}
.composer-action-btn:hover { background: var(--active-bg); border-color: var(--forest-500); }
.composer-action-btn:active { transform: scale(.96); }
.composer-action-btn.is-media { color: var(--forest-700); }
.composer-action-btn.is-checkin { color: var(--clay-600); }
.composer-action-btn.is-tag { color: #1877F2; }

/* Chừa khoảng cách RÕ RỆT giữa hàng 3 nút phía trên và nút "Đăng" phía dưới
   (trước đây .btn-continue có margin:0 nên dính sát luôn vào hàng nút trên) */
.composer-submit-wrap { margin-top: 16px; }


/* ---------- Mở rộng bộ phông nền bài viết (18 mẫu, không sao chép ảnh độc quyền) ---------- */
.bg-1  { background: linear-gradient(135deg,#a1c4fd,#c2e9fb); }
.bg-2  { background: linear-gradient(135deg,#6a82fb,#fc5c7d); }
.bg-3  { background: linear-gradient(135deg,#d3a17e,#f7e6d0); }
.bg-4  { background: linear-gradient(135deg,#8e2de2,#c0392b); }
.bg-5  { background: linear-gradient(135deg,#0f2027,#203a43,#2c5364); }
.bg-6  { background: linear-gradient(135deg,#bdc3c7,#8b8fa3); }
.bg-7  { background: linear-gradient(135deg,#ffafbd,#ffc3a0); }
.bg-8  { background: linear-gradient(135deg,#eb3349,#f45c43); }
.bg-9  { background: linear-gradient(135deg,#a8e063,#56ab2f); }
.bg-10 { background: #fdf1e7; }
.bg-11 { background: linear-gradient(135deg,#cfd9df,#e2ebf0); }
.bg-12 { background: linear-gradient(135deg,#a1ffce,#faffd1); }
.bg-13 { background: linear-gradient(135deg,#ffd452,#ffb75e); }
.bg-14 { background: radial-gradient(circle at 30% 30%, #3a1c71, #d76d77, #ffaf7b); }
.bg-15 { background: linear-gradient(135deg,#f3e7e9,#e3eeff); }
.bg-16 { background: linear-gradient(135deg,#ff9a9e,#fecfef); }
.bg-17 { background: linear-gradient(135deg,#f6d365,#fda085); }
.bg-18 { background: linear-gradient(135deg,#43cea2,#185a9d); }

/* ---------- Nút "Aa" mở màn hình chọn phông nền ---------- */
.aa-picker-btn {
  width: 40px; height: 40px; border-radius: 5px; border: none; cursor: pointer;
  background: linear-gradient(135deg,#ff2d78,#7b2ff7,#00c6ff,#ffce00);
  color: #fff; font-weight: 800; font-size: 15px; font-family: var(--font-body);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}

/* ---------- Màn hình chọn phông nền toàn màn hình ---------- */
.bg-picker-overlay {
  display: none; position: fixed; top: 0; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 470px; background: var(--white); z-index: 260; overflow-y: auto;
}
.bg-picker-overlay.show { display: block; }
.bg-picker-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 14px;
}
.bg-picker-grid .bg-thumb {
  aspect-ratio: 1; border-radius: 10px; cursor: pointer; border: 3px solid transparent;
}
.bg-picker-grid .bg-thumb.selected { border-color: var(--forest-600); }
.bg-picker-grid .bg-thumb.none-thumb {
  background: var(--page-bg); display: flex; align-items: center; justify-content: center; font-size: 13px; color: var(--ink-600); font-weight: 700;
}

/* ---------- Danh sách chọn người gắn thẻ ---------- */
.tag-user-row { position: relative; }
.tag-check-mark { display: none; color: var(--forest-600); font-weight: 800; font-size: 17px; }
.tag-user-row.tagged { background: rgba(47,92,68,.07); }
.tag-user-row.tagged .tag-check-mark { display: block; }
.tagged-chip {
  display: inline-flex; align-items: center; gap: 5px; background: var(--page-bg); border-radius: 5px;
  padding: 4px 10px 4px 4px; font-size: 12.5px; font-weight: 600; color: var(--ink-900);
}
/* .tagged-chip KHÔNG có <img> avatar thật nào (chỉ có icon 🏷️ + tên dạng
   chữ) - rule "img" ở đây từng là code thừa từ thiết kế cũ, GIỜ ĐÃ NGUY
   HIỂM: từ khi có Twemoji (footer.php), emoji 🏷️ tự động biến thành thẻ
   <img class="emoji"> - nếu còn rule này, icon 🏷️ sẽ bị ép cắt tròn 20x20
   méo mó. Xoá hẳn rule thừa/hại này. */
.tagged-chip button { border: none; background: none; color: var(--ink-600); cursor: pointer; font-size: 12px; padding: 0 2px; }

/* ---------- Trên màn hình đủ rộng (không chỉ riêng desktop to - cả laptop/
   cửa sổ trình duyệt cỡ vừa cũng tính): .checkin-overlay/.tagPickerOverlay/
   .bg-picker-overlay KHÔNG nên chiếm nguyên chiều cao màn hình (top:0;
   bottom:0) như mô phỏng "chuyển màn hình" trên di động nữa - nhìn "quá
   khổ" (1 dải trắng cao ngợp từ đầu tới cuối trình duyệt) so với phần còn
   lại của trang. Đổi thành 1 hộp thoại (modal) vừa phải, căn giữa MÀN
   HÌNH (cả ngang lẫn dọc), bo góc + đổ bóng, có lớp nền tối mờ phía sau
   (dùng box-shadow spread cực lớn thay vì thêm div nền riêng - đỡ phải
   sửa HTML/JS ở nhiều nơi đang dùng chung 2 class này). Y NGUYÊN hành vi
   full-màn-hình trên di động (không đụng gì tới CSS ở trên, chỉ áp dụng
   thêm từ đây trở lên).
   LƯU Ý: hạ mốc xuống 768px (thay vì 992px như phần bố cục 3 cột) - 1 khung
   tìm kiếm/gắn thẻ full-màn-hình vẫn "quá khổ" ngay cả trên cửa sổ trình
   duyệt cỡ vừa (laptop nhỏ, ~800-990px) dù chưa đủ rộng để bật bố cục 3
   cột - 2 việc này độc lập nhau nên dùng 2 mốc khác nhau là hợp lý. */
@media (min-width: 768px) {
  .checkin-overlay, .bg-picker-overlay {
    top: 50%; bottom: auto; left: 50%; margin: 0; transform: translate(-50%, -50%);
    width: 92%; max-width: 480px; height: auto; max-height: 80vh; border-radius: 16px;
    box-shadow: 0 0 0 2000px rgba(0,0,0,.5), 0 20px 60px rgba(0,0,0,.3);
  }
}

/* ---------- Thanh chọn màu nền dàn ngang nhỏ gọn (dễ thương, không to) ---------- */
.quick-swatch-row { display: flex; align-items: center; gap: 8px; padding: 10px 12px; overflow-x: auto; background: var(--page-bg); border-radius: 14px; margin: 10px 0; }
.composer-villa-panel { background: var(--page-bg); border-radius: 14px; padding: 14px; margin: 10px 0; }
.composer-preview-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin: 12px 0; }
.composer-preview-grid img, .composer-preview-grid video { border-radius: 10px; }
.quick-swatch {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; cursor: pointer;
  border: 2px solid transparent; transition: transform .15s;
}
.quick-swatch.selected { border-color: var(--ink-900); transform: scale(1.15); }
.quick-swatch.none-swatch {
  background: var(--page-bg); display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: var(--ink-600); border: 1px solid var(--border-strong);
}
.quick-swatch-more {
  width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0; cursor: pointer; border: none;
  background: var(--ink-900); color: #fff; font-size: 15px; display: flex; align-items: center; justify-content: center;
}

/* ---------- Reels: cuộn dọc full màn hình, mượt bằng scroll-snap gốc trình duyệt ---------- */
.reels-feed {
  height: 100vh; overflow-y: scroll; scroll-snap-type: y mandatory;
  scrollbar-width: none; background: #000;
}
.reels-feed::-webkit-scrollbar { display: none; }
.reels-item {
  height: 100vh; scroll-snap-align: start; scroll-snap-stop: always;
  position: relative; display: flex; align-items: center; justify-content: center; background: #000;
}
.reels-video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.reels-caption-wrap {
  position: absolute; bottom: 0; left: 0; right: 0; padding: 40px 16px 24px; z-index: 3;
  transition: background .2s;
}
.reels-caption-wrap .reels-caption-backdrop {
  position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.55), transparent); z-index: -1;
}
.reels-caption-wrap.expanded {
  bottom: 0; top: 0; padding-top: 70px; display: flex; flex-direction: column; justify-content: flex-end;
}
.reels-caption-wrap.expanded .reels-caption-backdrop { background: rgba(0,0,0,.72); }
.reels-caption-text {
  color: #fff; font-size: 14px; text-shadow: 0 1px 4px rgba(0,0,0,.6); line-height: 1.6; white-space: pre-line;
}
.reels-caption-toggle {
  display: block; margin-top: 8px; background: none; border: none; color: #fff; font-weight: 700;
  font-size: 13px; text-decoration: underline; cursor: pointer; padding: 0;
}

/* ---------- Nút thoát Reels - luôn hiện rõ, z-index cao nhất trang ---------- */
.reels-back-btn {
  position: fixed; top: 16px; left: 50%; transform: translateX(calc(-235px + 16px));
  width: 42px; height: 42px; border-radius: 50%; background: rgba(0,0,0,.55);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 22px; text-decoration: none; z-index: 999; border: 1px solid rgba(255,255,255,.25);
}
@media (max-width: 470px) {
  .reels-back-btn { left: 16px; transform: none; }
}

/* ---------- Trình soạn thảo tiểu sử có định dạng ---------- */
.rich-toolbar { display: flex; gap: 6px; padding: 6px 0; flex-wrap: wrap; position: relative; }
.rich-toolbar button, .rich-color-btn {
  width: 32px; height: 32px; border-radius: 5px; border: 1px solid var(--border-strong);
  background: #fff; font-size: 13px; cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-body); position: relative; overflow: hidden;
}
.rich-color-btn input[type="color"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.rich-editor {
  width: 100%; min-height: 100px; padding: 11px 14px; border-radius: 10px; border: 1px solid var(--border-strong);
  margin-bottom: 18px; font-family: var(--font-body); font-size: 14px; box-sizing: border-box; outline: none;
}
.rich-editor ul, .rich-editor ol { padding-left: 20px; margin: 6px 0; }

/* ---------- Tab chọn chế độ tạo tin (chữ / ảnh-video) ---------- */
.story-mode-tab {
  flex: 1; padding: 10px; border-radius: 10px; border: 1px solid var(--border-strong);
  background: #fff; font-family: var(--font-body); font-size: 13.5px; font-weight: 600; cursor: pointer; color: var(--ink-600);
}
.story-mode-tab.active { background: var(--forest-600); color: #fff; border-color: var(--forest-600); }

/* ---------- Trang tạo tin (/create_story.php) - ĐỒNG BỘ với ngôn ngữ
   thiết kế "thẻ trắng bo góc + đổ bóng nhẹ" của .composer-card (trang Tạo
   bài viết) thay vì để mọi thứ trôi nổi trực tiếp trên nền xám của app
   (không viền/không bóng, nhìn thô/xấu, lệch hẳn phần còn lại) như trước.
   Tab chuyển chế độ (chữ/ảnh) vẫn đặt NGOÀI thẻ như 1 thanh điều hướng
   riêng, còn toàn bộ nội dung soạn tin nằm gọn trong .story-card. */
.story-composer-page { padding: 14px; }
.story-card {
  background: var(--white); border: 1px solid var(--border); border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06); overflow: hidden; padding: 18px;
}

.story-mode-switch {
  display: flex; gap: 4px; background: var(--page-bg); border-radius: 12px;
  padding: 4px; margin-bottom: 14px;
}
.story-mode-switch .story-mode-tab {
  border: none; box-shadow: none; background: none; color: var(--ink-600);
}
.story-mode-switch .story-mode-tab.active {
  background: var(--white); color: var(--forest-700); box-shadow: 0 1px 4px rgba(0,0,0,.14); border-radius: 9px;
}

/* Khung chữ trên nền màu - ĐÚNG kích thước gốc (width:100% của cột chứa,
   max-height:420px, aspect-ratio:9/16), chỉ thêm bóng đổ + viền sáng mờ
   bên trong cho có chiều sâu, đỡ trông "dẹt" như 1 khối màu phẳng. */
.story-canvas {
  position: relative; width: 100%; max-height: 420px; aspect-ratio: 9/16;
  border-radius: 16px; overflow: hidden; box-sizing: border-box;
  display: flex; align-items: center; justify-content: center;
  padding: 26px; text-align: center;
}
.story-canvas::after {
  /* Viền tối rất nhẹ ở mép trong - giống hiệu ứng "khung máy" thật của story,
     giúp phân biệt rõ ranh giới canvas với nền trang dù màu nền trùng nhau. */
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); pointer-events: none;
}
.story-preview-text {
  width: 100%; color: #fff; font-weight: 700; font-size: 21px; line-height: 1.45;
  text-shadow: 0 1px 8px rgba(0,0,0,.32); word-break: break-word; white-space: pre-wrap;
}
.story-preview-text:empty::before {
  content: attr(data-placeholder); opacity: .75; font-weight: 600;
}

/* SỬA LỖI GỐC "ô màu nền không hiện": trước đây .story-swatch-row .swatch
   CHỈ có box-shadow, THIẾU HẲN width/height/border-radius nên các ô màu
   không có kích thước gì để hiện ra (co lại gần như biến mất) - bổ sung
   đầy đủ, ĐÚNG kiểu .swatch-picker .swatch đã ổn định ở nơi khác. Thêm nút
   "⊞ xem thêm" (dùng lại .quick-swatch-more có sẵn) để mở đủ 18 màu, không
   còn giới hạn cứng 8 màu như trước - khớp đúng số lượng màu nền đang có ở
   Tạo bài viết. */
.story-swatch-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 14px 0 4px; }
.story-swatch-row .swatch {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; cursor: pointer;
  border: 2px solid transparent; box-shadow: 0 1px 4px rgba(0,0,0,.18); transition: transform .15s;
}
.story-swatch-row .swatch.selected { border-color: var(--ink-900); transform: scale(1.1); }

.story-input {
  display: block; width: 100%; min-height: 60px; margin-top: 12px; padding: 14px; border-radius: 10px;
  border: 1px solid var(--border-strong); font-family: var(--font-body); font-size: 14px;
  background: var(--white); box-sizing: border-box; resize: vertical; transition: border-color .15s, background .15s;
}
.story-input:focus { outline: none; border-color: var(--forest-500); background: var(--active-bg); }

/* Ô chọn ảnh/video - ĐÚNG kiểu gốc (khối auto-height theo padding, KHÔNG
   ép tỉ lệ 9:16 cứng), chỉ thêm icon lớn hơn + 2 dòng chữ (chính/phụ) +
   hiệu ứng hover cho có điểm nhấn thay vì viền chấm chấm trơ trọi. */
.story-media-dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 60px 20px; border: 2px dashed var(--border-strong); border-radius: 14px;
  cursor: pointer; color: var(--forest-700);
  background: var(--page-bg); transition: border-color .15s, background .15s;
}
.story-media-dropzone:hover { border-color: var(--forest-500); background: var(--active-bg); }
.story-media-dropzone .story-dropzone-icon { font-size: 36px; }
.story-media-dropzone strong { font-size: 14px; font-weight: 700; }
.story-media-dropzone small { font-size: 12px; font-weight: 500; color: var(--ink-600); }

/* Khung xem trước ảnh/video đã chọn - ĐÚNG kiểu gốc (tự co theo
   max-height:420px + object-fit:contain, KHÔNG ép khung 9:16 cứng khiến
   ảnh ngang bị kéo méo) - bọc trong 1 khối "vừa khít nội dung"
   (display:inline-block) để bóng đổ/nút đổi ảnh bám sát đúng kích thước
   ảnh thật, không kéo giãn ra hết chiều ngang cột như khung chữ. */
.story-media-preview-frame {
  position: relative; display: inline-block; max-width: 100%; line-height: 0;
  border-radius: 12px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,.22); background: #000;
}
.story-media-preview-frame img, .story-media-preview-frame video {
  display: block; max-width: 100%; max-height: 420px; width: auto; height: auto; object-fit: contain;
}
.story-media-preview-frame img { cursor: pointer; }
.story-media-change-btn {
  position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 50%;
  border: none; background: rgba(0,0,0,.55); color: #fff; font-size: 14px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}

.story-compose-footer { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
.story-visibility-select {
  -webkit-appearance: none; appearance: none;
  width: 100%; padding: 11px 30px 11px 14px; border-radius: 10px; border: 1px solid var(--border-strong);
  font-family: var(--font-body); font-size: 13.5px; font-weight: 600; background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2365676b' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center;
  color: var(--ink-900); cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease;
}
.story-visibility-select:hover { border-color: var(--forest-500); }
.story-visibility-select:focus { outline: none; border-color: var(--forest-500); box-shadow: 0 0 0 3px var(--active-bg); }
.story-submit-btn { width: 100%; margin-top: 12px; }


/* ---------- Trình xem Story toàn màn hình ---------- */
.story-viewer { position: fixed; top: 0; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 470px; background: #000; z-index: 400; overflow: hidden; }
.story-progress-row { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; gap: 4px; z-index: 5; }
.story-progress-bar { flex: 1; height: 3px; background: rgba(255,255,255,.35); border-radius: 2px; overflow: hidden; }
.story-progress-fill { height: 100%; width: 0%; background: #fff; }
.story-viewer-header { position: absolute; top: 22px; left: 12px; right: 12px; display: flex; align-items: center; gap: 8px; z-index: 10; pointer-events: none; }
.story-viewer-header a, .story-viewer-header button { pointer-events: auto; }
.story-viewer-name { color: #fff; font-weight: 700; font-size: 13.5px; text-shadow: 0 1px 3px rgba(0,0,0,.4); text-decoration: none; }
.story-viewer-time { color: rgba(255,255,255,.75); font-size: 12px; }
.story-close-btn { margin-left: auto; color: #fff; font-size: 20px; text-decoration: none; padding: 4px 8px; }
.story-slide-wrap {
  width: 100%; height: 100%; position: relative; overflow: hidden;
  background: #000; display: flex; align-items: center; justify-content: center;
}
.story-media { width: 100%; height: 100%; object-fit: contain; background: #000; }
.story-caption {
  position: absolute; bottom: 30px; left: 16px; right: 16px; color: #fff; text-align: center;
  font-size: 14px; text-shadow: 0 1px 4px rgba(0,0,0,.6);
}
.story-tap-zone { position: absolute; top: 0; bottom: 0; width: 35%; z-index: 4; }
.story-tap-left { left: 0; }
.story-tap-right { right: 0; }

/* ---------- Tab tìm kiếm (Bạn bè / Bài viết) ---------- */
.search-tab {
  flex: 1; padding: 12px; border: none; background: none; font-family: var(--font-body);
  font-size: 13.5px; font-weight: 700; color: var(--ink-600); cursor: pointer;
}
.search-tab.active { color: var(--forest-700); border-bottom: 2px solid var(--forest-700); }

/* ---------- "Xem thêm" cho bài viết thường (nền trắng) ---------- */
.see-more-link-dark { color: var(--forest-700); font-weight: 700; cursor: pointer; }

/* ---------- "Đáng chú ý" - bài viết ghim trên trang cá nhân (tối đa 6, giống Facebook) ---------- */
.pinned-row-wrap { position: relative; }
.pinned-row {
  display: flex; gap: 16px; overflow-x: auto; padding: 0 20px 16px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity;
}
.pinned-row::-webkit-scrollbar { display: none; }
.pinned-card {
  flex-shrink: 0; min-width: 240px; background: var(--white); border: 1px solid var(--border); border-radius: 16px;
  padding: 14px; box-shadow: 0 1px 2px rgba(0,0,0,.05); text-decoration: none; scroll-snap-align: start;
  display: block; position: relative; transition: transform .2s, box-shadow .2s, border-color .2s;
}
.pinned-card:hover { transform: translateY(-4px); box-shadow: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -2px rgba(0,0,0,.05); border-color: var(--forest-600); }
.pinned-card-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.pinned-card-meta { min-width: 0; }
.pinned-card-name { font-size: 13px; font-weight: 600; color: var(--ink-900); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pinned-card-date { font-size: 11px; color: var(--ink-600); }
.pinned-card-text { font-size: 13px; font-weight: 500; color: var(--ink-900); margin-top: 8px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
/* Khung ảnh CỐ ĐỊNH chiều cao 120px đúng mẫu tham khảo (trước đây 100px) -
   giờ NẰM TRONG padding 14px của card (không sát viền nữa) nên ảnh tự bo
   góc riêng 8px thay vì dựa vào overflow:hidden của card như trước. */
.pinned-media-grid { display: grid; gap: 2px; height: 120px; grid-auto-rows: 1fr; border-radius: 8px; overflow: hidden; }
.pinned-media-grid.n1 { grid-template-columns: 1fr; }
.pinned-media-grid.n2 { grid-template-columns: 1fr 1fr; }
.pinned-media-grid.n3 { grid-template-columns: 1fr 1fr; }
.pinned-media-grid.n3 .pinned-media-tile:first-child { grid-column: span 2; }
.pinned-media-grid.n4 { grid-template-columns: 1fr 1fr; }
.pinned-media-tile { position: relative; background: #000; overflow: hidden; height: 100%; }
.pinned-media-tile img, .pinned-media-tile video { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- Trang cá nhân (user.php) - ảnh bìa/avatar/thống kê/tab ---------- */
/* QUAY VỀ đúng "chuẩn" chung toàn hệ thống (giống property.php/booking.php/
   notifications.php): NHIỀU THẺ CARD TÁCH RỜI, mỗi thẻ tự bo góc + đổ bóng
   riêng, cách nhau đều 20px - KHÔNG dùng kiểu "1 khối liền mạch duy nhất"
   (đã thử ở bản trước nhưng không đúng "chuẩn" đã thống nhất cho toàn site). */
.profile-info-card, .profile-pinned-card, .profile-feed-card {
  background: var(--white); border-radius: 12px; box-shadow: 0 1px 2px rgba(0,0,0,.1);
  overflow: hidden; margin-bottom: 20px;
}
.profile-pinned-card { padding: 14px 0 4px; overflow: visible; }
.profile-info-card .profile-section-title, .profile-pinned-card .profile-section-title { padding: 0 16px 10px; font-size: 16px; font-weight: 700; }

.profile-cover { width: 100%; aspect-ratio: 21/9; background-size: cover; background-position: center; background-color: var(--page-bg); position: relative; }
.profile-section { padding: 0 20px 24px; text-align: center; margin-top: -46px; position: relative; z-index: 2; }
.profile-avatar { width: 92px; height: 92px; margin: 0 auto 12px; border: 4px solid var(--white); box-shadow: 0 4px 10px rgba(0,0,0,.12); }
.profile-name { font-size: 20px; font-weight: 700; margin-bottom: 4px; color: var(--ink-900); }
.profile-bio { font-size: 14px; color: var(--ink-600); max-width: 340px; margin: 0 auto 16px; text-align: center; }

/* ---------- Khối thông tin minh bạch (họ tên/username/SĐT/email/ngày tham
   gia) - thẻ trắng bo góc riêng, tách bạch rõ ràng khỏi phần bio/story,
   mỗi dòng 1 icon + nhãn + giá trị canh đều nhau chuyên nghiệp, không phải
   chữ thường liệt kê. ---------- */
.profile-info-list {
  background: var(--page-bg); border-radius: 12px; padding: 4px 16px;
  max-width: 480px; margin: 0 auto 18px; text-align: left;
}
.profile-info-row {
  display: flex; align-items: baseline; gap: 10px; padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.profile-info-row:last-child { border-bottom: none; }
.profile-info-icon { font-size: 14px; flex-shrink: 0; width: 18px; text-align: center; }
.profile-info-label { font-size: 12.5px; color: var(--ink-600); font-weight: 600; width: 78px; flex-shrink: 0; }
.profile-info-value { font-size: 13.5px; color: var(--ink-900); font-weight: 600; word-break: break-word; min-width: 0; flex: 1; }
.profile-info-action {
  display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px;
  border-radius: 50%; background: var(--active-bg); margin-left: 6px; text-decoration: none; font-size: 13px;
  vertical-align: middle;
}
.profile-info-sub { display: block; font-size: 11px; color: var(--ink-600); font-weight: 500; margin-top: 1px; }
.profile-info-private-tag {
  display: inline-flex; align-items: center; justify-content: center; margin-left: 8px;
  width: 20px; height: 20px; border-radius: 50%; background: var(--page-bg); flex-shrink: 0; cursor: help;
}
.profile-info-private-tag::before { content: '🔒'; font-size: 10px; }

.profile-stats-row { display: flex; justify-content: center; gap: 32px; margin-bottom: 20px; }
.profile-stat-item { text-align: center; text-decoration: none; color: inherit; }
.profile-stat-item b { display: block; font-size: 18px; font-weight: 700; color: var(--ink-900); }
.profile-stat-item span { font-size: 12px; color: var(--ink-600); }
.profile-action-buttons { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.profile-btn {
  padding: 10px 24px; border-radius: 5px; font-size: 14px; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; text-decoration: none; border: none;
}
.profile-btn-outline { background: var(--white); border: 1px solid var(--border-strong); color: var(--ink-900); box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.profile-btn-outline:hover { background: var(--page-bg); }
.profile-btn-primary { background: var(--forest-600); color: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.profile-btn-primary:hover { background: var(--forest-700); }

.profile-section-title { font-size: 16px; font-weight: 700; padding: 0 16px 10px; }

.profile-tabs { display: flex; margin: 0; }
.profile-tab-item { flex: 1; text-align: center; padding: 14px 0; font-size: 13.5px; font-weight: 600; color: var(--ink-600); text-decoration: none; border-bottom: 2px solid transparent; }
.profile-tab-item.active { color: var(--forest-700); border-bottom-color: var(--forest-700); }
.profile-tab-item:hover:not(.active) { background: var(--page-bg); }
.pinned-play-icon { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.9); font-size: 18px; }
.pinned-more-overlay {
  position: absolute; inset: 0; background: rgba(0,0,0,.55); color: #fff; font-size: 18px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.pinned-colorful {
  aspect-ratio: 16/10; display: flex; align-items: center; justify-content: center; padding: 10px; overflow: hidden;
}
.pinned-colorful-text {
  color: #fff; font-size: 13px; font-weight: 700; text-align: center; line-height: 1.4;
  text-shadow: 0 1px 2px rgba(0,0,0,.25); overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
}

/* ---------- Nút menu nhỏ (bỏ ghim/xoá) trên mỗi thẻ "Đáng chú ý" -
   dropdown được tạo động bằng JS gắn vào document.body (không lồng trong thẻ)
   để tránh bị chính overflow:hidden của thẻ cắt cụt mất, giống lỗi nút + trước đây */
.pinned-card-menu-btn {
  position: absolute; top: 6px; right: 6px; z-index: 4;
  width: 24px; height: 24px; border-radius: 50%; background: rgba(255,255,255,.9); border: none;
  font-size: 14px; font-weight: 800; color: var(--ink-900); cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.floating-menu-dropdown {
  position: fixed; background: #fff; border-radius: 10px; box-shadow: 0 4px 16px rgba(0,0,0,.18);
  border: 1px solid var(--border); overflow: hidden; min-width: 150px; z-index: 500;
}
.floating-menu-dropdown button, .floating-menu-dropdown a {
  display: block; width: 100%; text-align: left; padding: 10px 14px; font-size: 13px; font-family: var(--font-body);
  border: none; background: none; cursor: pointer; color: var(--ink-900); text-decoration: none; box-sizing: border-box;
  transition: background-color .12s ease;
}
.floating-menu-dropdown button:hover, .floating-menu-dropdown a:hover { background: var(--page-bg); }
.floating-menu-dropdown button.danger { color: #c0392b; }
.floating-menu-dropdown hr { border: none; border-top: 1px solid var(--border); margin: 4px 0; }

/* ---------- Popup danh sách người đã tương tác (giống Facebook thật) ---------- */
.reaction-list-modal {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 300;
  align-items: flex-end; justify-content: center;
}
.reaction-list-modal.show { display: flex; }
@media (min-width: 480px) { .reaction-list-modal.show { align-items: center; } }
.reaction-list-sheet {
  background: #fff; width: 100%; max-width: 470px; max-height: 75vh; border-radius: 16px 16px 0 0;
  display: flex; flex-direction: column; overflow: hidden;
}
@media (min-width: 480px) { .reaction-list-sheet { border-radius: 16px; max-height: 60vh; } }
.reaction-list-header {
  display: flex; align-items: center; border-bottom: 1px solid var(--border); padding: 10px 12px; gap: 8px;
}
.reaction-list-tabs { display: flex; gap: 4px; overflow-x: auto; flex: 1; scrollbar-width: none; }
.reaction-list-tabs::-webkit-scrollbar { display: none; }
.reaction-tab {
  flex-shrink: 0; padding: 8px 14px; border-radius: 5px; border: none; background: var(--page-bg);
  font-family: var(--font-body); font-size: 13px; font-weight: 600; color: var(--ink-600); cursor: pointer; white-space: nowrap;
}
.reaction-tab.active { background: var(--forest-100, #e3f0e8); color: var(--forest-700); }
.reaction-list-close { border: none; background: none; font-size: 18px; color: var(--ink-600); cursor: pointer; padding: 4px 8px; flex-shrink: 0; }
.reaction-list-body { overflow-y: auto; flex: 1; }
.reaction-list-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 16px; text-decoration: none; color: inherit;
  border-bottom: 1px solid var(--border);
}
.reaction-list-name { flex: 1; font-weight: 600; font-size: 14px; color: var(--ink-900); }
.reaction-list-addfriend-btn {
  background: var(--forest-600); color: #fff; border: none; border-radius: 5px; padding: 7px 12px;
  font-size: 12.5px; font-weight: 700; cursor: pointer; font-family: var(--font-body); flex-shrink: 0;
}
.reaction-list-pending { font-size: 12px; color: var(--ink-600); font-weight: 600; flex-shrink: 0; }

/* ---------- Form OTA dùng chung cho mọi trang quản lý villa/đặt phòng
   (my_properties.php, properties.php, create_hold.php...) - trước đây mỗi
   trang tự định nghĩa riêng gây trùng lặp, giờ gộp 1 chỗ để trang nào cũng
   có sẵn, tránh tình trạng "dùng đúng tên class nhưng CSS bị vỡ" ---------- */
.ota-form-card { background:#fff; border-radius:16px; padding:24px; box-shadow:0 2px 16px rgba(0,0,0,.06); border:1px solid var(--border); }
.ota-form-collapsed { display:none; }
.ota-form-title { font-family:var(--font-display); color:var(--pine-800); margin:0 0 20px; font-size:18px; }
.ota-section-label { font-size:13px; font-weight:800; color:var(--forest-700); text-transform:uppercase; letter-spacing:.5px; margin:22px 0 12px; padding-top:14px; border-top:1px solid var(--border); }
.ota-section-label:first-of-type { margin-top:0; padding-top:0; border-top:none; }
.ota-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; margin-bottom:14px; }
.ota-grid-4 { grid-template-columns:repeat(4,1fr); }
.ota-field { margin-bottom:14px; }
.ota-field label { display:block; font-size:12.5px; font-weight:700; color:var(--ink-700); margin-bottom:5px; }
.ota-field input, .ota-field textarea, .ota-field select {
  width:100%; padding:10px 12px; border-radius:10px; border:1.5px solid var(--mist-300);
  background:#f7f8f5; font-family:var(--font-body); font-size:14px; box-sizing:border-box;
  transition:border-color .15s, background .15s;
}
.ota-field input:focus, .ota-field textarea:focus, .ota-field select:focus { outline:none; border-color:var(--forest-500); background:#fff; }
.ota-highlight { background:#fff8ec; border:1.5px solid #f0c674; border-radius:12px; padding:14px; }
.ota-hint { font-size:12px; color:var(--ink-600); margin-top:4px; }
.ota-media-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(110px,1fr)); gap:10px; margin-bottom:12px; }
.ota-media-item { position:relative; aspect-ratio:1; border-radius:10px; overflow:hidden; background:#000; }
.ota-media-item img, .ota-media-item video { width:100%; height:100%; object-fit:cover; }
.ota-media-badge { position:absolute; top:4px; left:4px; background:rgba(0,0,0,.6); color:#fff; font-size:11px; padding:2px 5px; border-radius: 5px; }
.ota-media-delete { position:absolute; top:4px; right:4px; width:22px; height:22px; border-radius:50%; background:rgba(0,0,0,.65); color:#fff; border:none; cursor:pointer; font-size:12px; }
.ota-media-cover-btn { position:absolute; top:4px; left:4px; width:24px; height:24px; border-radius:50%; background:rgba(0,0,0,.5); border:none; cursor:pointer; display:flex; align-items:center; justify-content:center; font-size:13px; }
.ota-is-cover { outline: 3px solid #f0c674; outline-offset: -3px; }
.ota-is-cover .ota-media-cover-btn { background:#f0c674; }
.ota-is-cover::after { content:'Đại diện'; position:absolute; bottom:4px; left:4px; background:#f0c674; color:#3a2e0c; font-size:10px; font-weight:700; padding:2px 6px; border-radius:5px; }
.ota-file-input { width:100%; padding:12px; border:2px dashed var(--mist-300); border-radius:10px; font-size:13px; }
.ota-property-list { display:grid; gap:14px; }
.ota-property-card { display:flex; gap:14px; background:#fff; border-radius:14px; padding:14px; box-shadow:0 1px 6px rgba(0,0,0,.05); border:1px solid var(--border); align-items:center; }
.ota-property-thumb { width:90px; height:70px; border-radius:10px; background-size:cover; background-position:center; flex-shrink:0; }
.ota-property-info { flex:1; }
.ota-property-title { font-weight:700; font-size:15px; color:var(--ink-900); }
.ota-property-meta { font-size:12.5px; color:var(--ink-600); margin:2px 0; }
.ota-property-price { font-weight:700; color:var(--forest-700); font-size:14px; margin-bottom:4px; }
.ota-property-actions { display:flex; flex-direction:column; gap:6px; }
@media (max-width: 640px) { .ota-grid, .ota-grid-4 { grid-template-columns:1fr; } }

/* ---------- Popup chi tiết dùng chung (sale_villas.php, bookings.php...) + phân trang ---------- */
.sv-detail-modal { display:none; position:fixed; inset:0; background:rgba(0,0,0,.6); z-index:400; align-items:center; justify-content:center; padding:16px; }
.sv-detail-modal.show { display:flex; }
.sv-detail-sheet { background:#fff; border-radius:16px; max-width:480px; width:100%; max-height:85vh; overflow-y:auto; padding:24px; position:relative; }
.sv-detail-close { position:absolute; top:14px; right:14px; background:var(--page-bg); border:none; width:30px; height:30px; border-radius:50%; cursor:pointer; font-size:14px; }
.pagination-bar { display:flex; gap:6px; justify-content:center; flex-wrap:wrap; margin:24px 0; }
.pagination-btn { display:inline-flex; align-items:center; justify-content:center; min-width:36px; height:36px; border-radius: 5px; background:#fff; border:1px solid var(--border); color:var(--ink-700); text-decoration:none; font-size:13px; font-weight:600; padding:0 8px; }
.pagination-btn.active { background:var(--forest-600); color:#fff; border-color:var(--forest-600); }
.pagination-btn:hover:not(.active) { background:var(--page-bg); }

/* ---------- SĐT/Zalo bấm gọi được (phone_action_links() trong helpers.php) - dùng ở mọi nơi hiện SĐT khách/Sale ---------- */
.phone-link { color:var(--forest-700); font-weight:700; text-decoration:none; }
.phone-link:hover { text-decoration:underline; }
.phone-zalo-link { text-decoration:none; font-size:15px; vertical-align:middle; }

/* ---------- Khung "Thổ địa" (Local Concierge) trên trang villa - property.php ---------- */
.concierge-card { margin:0 0 20px; background:linear-gradient(135deg,#e8f5e9 0%,#ffffff 100%); border:1px solid #c8e6c9; border-radius:12px; padding:20px; display:flex; align-items:center; gap:15px; box-shadow:0 1px 2px rgba(0,0,0,.1); }
.concierge-avatar { width:56px; height:56px; border-radius:50%; object-fit:cover; flex-shrink:0; border:2px solid #c8e6c9; }
.concierge-info { flex:1; min-width:0; }
.concierge-badge { font-weight:700; font-size:15px; color:var(--forest-800); }
.concierge-stat { font-size:13px; color:var(--ink-600); margin-top:4px; }
.concierge-bio { font-size:13px; color:var(--ink-600); margin-top:6px; font-style:italic; line-height:1.5; }
.concierge-zalo-btn { flex-shrink:0; width:40px; height:40px; border-radius:50%; background:#0068ff; display:flex; align-items:center; justify-content:center; font-size:18px; text-decoration:none; }

/* ---------- Trang hồ sơ Thổ địa riêng (tho-dia.php) ---------- */
.td-hero {
  display: flex; flex-direction: column; align-items: center; padding: 40px 20px; text-align: center;
  background: linear-gradient(135deg, #e8f5e9 0%, #ffffff 100%); border-radius: 12px; box-shadow: 0 1px 2px rgba(0,0,0,.1);
  margin-bottom: 20px;
}
.td-hero-avatar { width: 120px; height: 120px; border-radius: 50%; border: 4px solid var(--forest-600); object-fit: cover; margin-bottom: 15px; box-shadow: 0 4px 12px rgba(47,92,68,.2); }
.td-hero-badge { background: var(--forest-600); color: #fff; font-size: 14px; font-weight: 600; padding: 6px 16px; border-radius: 5px; margin-bottom: 15px; display: inline-flex; align-items: center; gap: 6px; }
.td-hero-name { font-size: 28px; font-weight: 700; color: var(--ink-900); margin: 0 0 10px; }
.td-hero-stat { font-size: 15px; color: var(--ink-600); margin-bottom: 4px; }
.td-hero-bio { font-size: 14px; color: var(--ink-600); font-style: italic; max-width: 360px; margin: 10px auto 0; line-height: 1.5; }
.td-zalo-cta {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 20px; background: #0068ff; color: #fff;
  font-weight: 600; padding: 12px 24px; border-radius: 5px; text-decoration: none; font-size: 16px;
  box-shadow: 0 4px 12px rgba(0,104,255,.3); transition: transform .2s, box-shadow .2s;
}
.td-zalo-cta:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,104,255,.4); }
.td-section-title { font-family:var(--font-display); color:var(--forest-800); font-size:16px; margin:24px 14px 12px; }
.td-villa-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:10px; padding:0 14px; }
.td-villa-card { display:block; background:#fff; border-radius:14px; overflow:hidden; box-shadow:0 1px 6px rgba(0,0,0,.08); text-decoration:none; color:inherit; }
.td-villa-img { width:100%; aspect-ratio:4/3; object-fit:cover; display:block; }
.td-villa-info { padding:8px 10px; }
.td-villa-title { font-size:12.5px; font-weight:700; color:var(--ink-900); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.td-villa-area { font-size:11px; color:var(--ink-400); margin-top:2px; }
.td-review-list { padding:0 14px; display:flex; flex-direction:column; gap:10px; }
.td-review-card { background:#fff; border-radius:12px; padding:12px 14px; box-shadow:0 1px 6px rgba(0,0,0,.06); }
.td-review-top { display:flex; align-items:center; gap:8px; margin-bottom:4px; }
.td-review-stars { font-size:11px; }
.td-review-name { font-size:12.5px; font-weight:700; color:var(--ink-900); }
.td-review-comment { font-size:12.5px; color:var(--ink-700); line-height:1.5; }
.td-review-property { font-size:11px; color:var(--ink-400); margin-top:4px; }

/* =====================================================================
   MOBILE ADMIN LAYOUT FIX (2026) — CHỈ CSS THUẦN TUÝ, không đổi bất kỳ
   HTML/PHP/JS nào. Toàn bộ trang quản trị (Admin/Host/Sale) dùng chung
   includes/admin_header.php với .admin-shell (flex ngang) + .admin-nav
   (sidebar CỨNG 220px) + .admin-main - trên màn hình hẹp, sidebar 220px
   chiếm gần hết bề ngang, chỉ còn ~90-100px cho nội dung -> vỡ bố cục ở
   MỌI trang admin cùng lúc. Sửa 1 chỗ này là khắc phục được gốc rễ cho
   toàn bộ khu vực quản trị, không cần sửa từng trang riêng lẻ.
   ===================================================================== */
@media (max-width: 900px) {
  .admin-shell { flex-direction: column; min-height: auto; }

  /* Sidebar dọc cứng -> thanh cuộn ngang mỏng ở trên cùng, vẫn giữ NGUYÊN
     toàn bộ link/badge/thứ tự - chỉ đổi CÁCH TRÌNH BÀY, không ẩn bớt mục
     nào (tránh làm mất chức năng khỏi tầm tay trên mobile). */
  .admin-nav {
    width: 100%;
    flex-shrink: 0;
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 10px 12px;
    gap: 4px;
    align-items: center;
    scrollbar-width: thin;
  }
  .admin-nav .brand { flex-shrink: 0; margin: 0 8px 0 0; font-size: 15px; }
  .admin-nav a {
    flex-shrink: 0;
    white-space: nowrap;
    margin-bottom: 0 !important;
    margin-top: 0 !important;
    padding: 8px 12px;
    font-size: 13px;
  }

  /* NHÓM MENU (accordion) trên thanh cuộn ngang mobile - ĐÂY LÀ NGUYÊN NHÂN
     GỐC RỄ của lỗi "menu cha không collapse/expand đúng": .admin-nav-group
     vốn thiết kế cho sidebar DỌC (submenu xổ THẲNG XUỐNG bên dưới, đẩy các
     mục sau dịch xuống) - nhưng ở đây .admin-nav đã bị đổi thành thanh
     NGANG (display:flex; flex-wrap:nowrap), khiến submenu "xổ xuống" không
     còn chỗ nào hợp lý để hiển thị, bị vỡ layout/ẩn mất. Sửa: nhóm trở
     thành 1 NÚT THẢ XUỐNG (dropdown) độc lập trong thanh ngang, submenu bung
     ra dạng lớp phủ (position:absolute) ngay dưới nút, không đẩy các mục
     khác - đúng hành vi "collapse/expand" mong đợi trên di động. */
  .admin-nav-group {
    position: relative; flex-shrink: 0; margin-bottom: 0;
  }
  .admin-nav-group-head {
    width: auto; white-space: nowrap; padding: 8px 12px; font-size: 13px;
    border-radius: 8px; background: rgba(255,255,255,.04);
  }
  .admin-nav-submenu {
    position: absolute; top: calc(100% + 6px); left: 0; z-index: 80;
    min-width: 220px; max-width: 80vw; background: var(--forest-800);
    border: 1px solid rgba(255,255,255,.15); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.35);
    padding: 6px; margin: 0; border-left: none;
  }
  .admin-nav-submenu a { white-space: normal; }

  .admin-main { padding: 16px; }
  .admin-main h1 { font-size: 19px; }
}

@media (max-width: 480px) {
  .admin-main { padding: 12px; }
  .ota-form-card { padding: 16px; }
}

/* ---------------------------------------------------------------------
   An toàn chung cho khu vực quản trị trên mobile - không phụ thuộc trang
   cụ thể nào, áp dụng cho MỌI bảng/ảnh có thể tràn ngang màn hình hẹp.
   --------------------------------------------------------------------- */
@media (max-width: 640px) {
  .admin-main table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
  .admin-main img, .admin-main video { max-width: 100%; height: auto; }
  .admin-main pre, .admin-main code { max-width: 100%; overflow-x: auto; }
}

/* =====================================================================
   TRANG CHI TIẾT VILLA - bố cục 2 cột trên desktop rộng (2026)
   Trên mobile (mặc định): .detail-layout/-main/-side chỉ là <div> trơn,
   KHÔNG có CSS gì tác động - property.php hiển thị y hệt như trước khi
   thêm các khối bọc này (xếp dọc 1 cột, khung giá nổi cố định ở đáy).
   CHỈ áp dụng 2 cột khi màn hình đủ rộng để không lãng phí khoảng trắng
   2 bên như trước, đồng thời khung giá chuyển thành thẻ dính lề cạnh nội
   dung (kiểu Airbnb/Booking.com) thay vì nổi che ngang khắp màn hình.
   ===================================================================== */
@media (min-width: 992px) {
  .detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
    align-items: start;
  }
  .detail-layout-side { position: sticky; top: 90px; }

  /* Khung giá: bỏ kiểu "nổi cố định đè ngang màn hình" của mobile, chuyển
     thành 1 thẻ bình thường dính lề trong cột phải - vẫn giữ NGUYÊN class
     .sticky-cta/.price-block/.btn-book nên không cần đổi gì bên trong. */
  .detail-layout-side .sticky-cta {
    position: static; left: auto; transform: none;
    width: 100%; max-width: none;
    border: 1px solid var(--border); border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,.08);
    flex-direction: column; align-items: stretch; gap: 14px;
  }
  .detail-layout-side .sticky-cta a.btn-book { text-align: center; }
  .spacer-cta { display: none; } /* không cần chừa chỗ nữa vì khung giá không còn nổi cố định. LƯU Ý: .spacer-cta giờ nằm SAU .detail-layout (không còn lồng trong .detail-layout-main nữa - xem property.php), nên chọn thẳng .spacer-cta chứ không còn ".detail-layout-main .spacer-cta" (sẽ không khớp được nữa, khiến khoảng đệm này lại vô tình xuất hiện thừa trên desktop). */
}

/* =====================================================================
   KHUNG 3 CỘT DESKTOP (2026) — áp dụng cho MỌI trang qua includes/header.php
   + includes/footer.php (.page-shell-3col bọc quanh .app-shell). Trên
   mobile mặc định 2 cột trái/phải ẨN HẲN (display:none) - .page-shell-3col
   không có CSS gì tác động, .app-shell hiển thị y hệt giao diện cũ, KHÔNG
   đổi gì trên điện thoại. Chỉ từ 992px trở lên mới hiện đủ 3 cột.
   ===================================================================== */
.global-sidebar-left, .global-sidebar-right { display: none; }


/* ====================================================================
   Nội dung BÊN TRONG 2 cột trái/phải (.gsb-menu-item, .gsb-contact-item,
   .gsb-ad-item...) - TRƯỚC ĐÂY nằm lồng trong @media (min-width:992px)
   cùng với phần ĐỊNH VỊ cột (.page-shell-3col, sticky...), khiến các class
   này HOÀN TOÀN KHÔNG CÓ style gì khi hiện lại trên di động (drawer "☰"
   gộp 2 cột vào xem - includes/header.php). Tách hẳn ra khỏi media query,
   áp dụng KHÔNG ĐIỀU KIỆN (mọi kích thước màn hình) - vì bản thân việc ẨN/
   HIỆN container cha (.global-sidebar-left/-right) đã đủ để kiểm soát
   responsive rồi, phần NỘI DUNG BÊN TRONG không cần phải phụ thuộc thêm
   vào media query nào nữa.
   ==================================================================== */

/* --- Cột trái: menu điều hướng chính (đúng thông số mẫu tham khảo) --- */
.gsb-menu-item {
  display: flex; align-items: center; gap: 15px; padding: 6px 15px; border-radius: 8px;
  font-weight: 500; font-size: 15px; color: var(--ink-900); text-decoration: none; margin-bottom: 2px;
}
.gsb-menu-item:hover { background: rgba(0,0,0,.05); }
.gsb-menu-item.active { background: var(--active-bg); color: var(--forest-700); font-weight: 700; }
.gsb-menu-icon { font-size: 22px; width: 30px; text-align: center; flex-shrink: 0; }
.gsb-menu-item-profile { font-weight: 700; }
.gsb-menu-avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.gsb-divider { height: 1px; background: var(--border); margin: 12px 4px; }

/* Nhịp khoảng cách THỐNG NHẤT cho mọi "đoạn ngắt" trong cột trái - dùng
   ĐÚNG 12px xuyên suốt (khớp với .gsb-divider ở trên) thay vì mỗi chỗ một
   con số khác nhau (14px/15px...) gây lệch nhịp khi nhìn tổng thể. */
.gsb-villa-suggest-title {
  margin: 0 0 8px; padding: 0 15px; font-size: 13px; font-weight: 700;
  color: var(--ink-500); text-transform: uppercase; letter-spacing: .3px;
}
.gsb-footer-links.gsb-sidebar-footer-links {
  margin-top: 12px; padding: 12px 15px 4px;
  display: flex; flex-direction: column; gap: 4px;
}
.gsb-footer-links.gsb-sidebar-footer-links a {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px; border-radius: 8px;
  font-size: 12.5px; font-weight: 600; color: var(--ink-600);
  text-decoration: none; transition: background .15s, color .15s;
}
.gsb-footer-links.gsb-sidebar-footer-links a:hover { background: var(--active-bg); color: var(--forest-700); }
.gsb-footer-links.gsb-sidebar-footer-links a::before { flex-shrink: 0; opacity: .7; font-size: 13px; }
.gsb-footer-links.gsb-sidebar-footer-links a:hover::before { opacity: 1; }
.gsb-footer-links.gsb-sidebar-footer-links a[href*="about"]::before { content: "ℹ️"; }
.gsb-footer-links.gsb-sidebar-footer-links a[href*="privacy"]::before { content: "🔒"; }
.gsb-footer-links.gsb-sidebar-footer-links a[href*="terms"]::before { content: "📜"; }
.gsb-footer-links.gsb-sidebar-footer-links a[href*="refund"]::before { content: "💸"; }

/* --- Khối "đáng tin cậy": logo + tên hộ kinh doanh + địa chỉ + nút Zalo OA
   --- đặt cuối cột trái. Thiết kế: nền be nhạt tương phản nhẹ với nền xám
   chung (--page-bg) để khối này "nổi" lên như 1 tấm danh thiếp/con dấu xác
   thực, không trộn lẫn vào các link điều hướng phía trên - đúng cảm giác
   "thông tin pháp lý, đáng tin" thay vì chỉ là dòng chữ nhỏ mờ nhạt cuối
   trang như trước. */
.gsb-trust-card {
  margin: 14px 15px 18px; padding: 16px 14px 14px;
  background: linear-gradient(180deg, #fbfaf7 0%, #f5f2ea 100%);
  border: 1px solid var(--border); border-radius: 12px;
}
.gsb-trust-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.gsb-trust-logo { width: 34px; height: 34px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.gsb-trust-brand-name { font-family: var(--font-display); font-weight: 800; font-size: 14px; color: var(--forest-800); letter-spacing: .1px; }
.gsb-trust-brand-sub { font-size: 10.5px; color: var(--ink-500); margin-top: 1px; }
.gsb-trust-info { display: flex; flex-direction: column; gap: 8px; padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px dashed var(--border-strong); }
.gsb-trust-info-row { display: flex; align-items: flex-start; gap: 10px; font-size: 11.5px; line-height: 1.55; color: var(--ink-600); }
.gsb-trust-info-icon { flex-shrink: 0; width: 18px; text-align: center; display: inline-flex; align-items: center; justify-content: center; }
.gsb-trust-info-row a { color: var(--forest-700); font-weight: 600; }
.gsb-trust-info-row a:hover { text-decoration: underline; }
/* Nút Zalo OA - bọc thêm khung riêng để không bị lệch cỡ so với thiết kế
   chung (widget nhúng của Zalo có kích thước cố định do họ kiểm soát) */
.gsb-trust-zalo { display: flex; justify-content: center; margin-bottom: 10px; min-height: 36px; max-width: 100%; overflow: hidden; }
.gsb-trust-zalo iframe { max-width: 100% !important; }
.gsb-trust-copyright { font-size: 10px; color: var(--ink-400); text-align: center; line-height: 1.5; }

/* --- Cột phải: widget gợi ý + villa nổi bật + hỗ trợ (đúng mẫu tham khảo) --- */
.gsb-widget { margin-bottom: 20px; }
.gsb-widget-title { font-weight: 600; font-size: 15px; margin-bottom: 15px; color: var(--ink-600); padding: 0 2px; }
.gsb-widget-text { font-size: 12.5px; color: var(--ink-600); line-height: 1.6; margin: 0 0 10px; }
.gsb-widget-cta { display: inline-block; font-size: 12.5px; font-weight: 700; color: var(--forest-700); text-decoration: none; }
.gsb-widget-cta:hover { text-decoration: underline; }
.gsb-footer-links { display: flex; gap: 14px; font-size: 11.5px; padding: 4px 6px; flex-wrap: wrap; }
.gsb-footer-links a { color: var(--ink-500); text-decoration: underline; }

/* Gợi ý cho bạn - hàng liên hệ avatar tròn + tên (đúng mẫu tham khảo) */
.gsb-contact-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 0; border-radius: 8px;
  text-decoration: none; color: var(--ink-900); transition: .15s;
}
.gsb-contact-item:hover { background: rgba(0,0,0,.05); padding-left: 5px; }
.gsb-contact-item img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.gsb-contact-item span { font-weight: 500; font-size: 14px; }
.gsb-contact-role { font-weight: 400; font-size: 12px; color: var(--ink-500); }

/* Chấm tròn trạng thái online (xanh lá)/offline (xám) đè lên góc dưới-phải
   avatar - kiểu Messenger/Facebook chuẩn, dùng CHUNG cho mọi nơi hiện danh
   sách người dùng kèm avatar (xem render_online_dot() trong helpers.php).
   Class ".avatar-status-wrap" dùng CHUNG được cho cả avatar dạng <img>
   (gsb-contact-item) LẪN avatar dạng <div class="avatar"> nền background-image
   (friend_list.php, tag picker...) - chỉ cần bọc ngoài. */
.avatar-status-wrap { position: relative; display: inline-flex; flex-shrink: 0; }
.online-status-dot {
  position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px;
  border-radius: 50%; border: 2px solid var(--white); box-sizing: border-box;
}
.online-status-dot.is-online { background: #31a24c; }
.online-status-dot.is-offline { background: #bcc0c4; }

/* ---------- Widget "Điểm tích luỹ"/"Mã giảm giá" (thay cho "Gợi ý cho
   bạn" xoay vòng villa cũ, không công bằng khi kho villa lớn) ---------- */
.gsb-loyalty-widget {
  display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 10px;
  text-decoration: none; color: var(--ink-900); transition: background .15s;
}
.gsb-loyalty-widget:hover { background: rgba(0,0,0,.04); }
.gsb-loyalty-widget-icon {
  width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 19px; flex-shrink: 0;
}
.gsb-loyalty-widget-points .gsb-loyalty-widget-icon { background: #fdf0e6; }
.gsb-loyalty-widget-sale .gsb-loyalty-widget-icon { background: #e8f0fe; }
.gsb-loyalty-widget-title { font-weight: 700; font-size: 14px; }
.gsb-loyalty-widget-sub { font-size: 12px; color: var(--ink-500); margin-top: 1px; }

/* Villa Nổi Bật / ảnh quảng cáo - ảnh THUẦN bo góc TRÊN (khớp với khung
   card .gsb-ad-item bọc ngoài, không bo hết 4 góc nữa vì phần chữ bên
   dưới giờ nằm CHUNG 1 khung viền, không phải khối rời). */
.gsb-featured-card {
  position: relative; display: block; overflow: hidden; height: 140px;
}
.gsb-featured-card img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Widget "Gợi ý cho bạn" (villa ngẫu nhiên, cột trái) */
.gsb-villa-suggest-list { display: flex; flex-direction: column; gap: 2px; }
.gsb-villa-suggest-item {
  display: flex; align-items: center; gap: 10px; padding: 7px 12px; border-radius: 8px;
  text-decoration: none; color: var(--ink-900); transition: background-color .15s;
}
.gsb-villa-suggest-item:hover { background: rgba(0,0,0,.05); }
.gsb-villa-suggest-item img { width: 42px; height: 42px; border-radius: 8px; object-fit: cover; flex-shrink: 0; background: var(--page-bg); }
.gsb-villa-suggest-info { min-width: 0; }
.gsb-villa-suggest-title { font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gsb-villa-suggest-price { font-size: 11.5px; color: var(--forest-700); font-weight: 700; margin-top: 1px; }

/* Biển "chờ quảng cáo" khi chưa có quảng cáo nào đang chạy */
.gsb-ad-empty { text-align: center; padding: 18px 8px; border: 1px dashed var(--border-strong); border-radius: 8px; }
.gsb-ad-empty-icon { font-size: 28px; margin-bottom: 8px; opacity: .6; }
.gsb-ad-empty-text { font-size: 12px; color: var(--ink-500); line-height: 1.6; margin-bottom: 10px; }

/* Widget "Quảng cáo tài trợ" - MỖI quảng cáo là 1 THẺ RIÊNG có viền + đổ
   bóng nhẹ (không chỉ đường kẻ phân cách như trước) - đúng khung ảnh mẫu:
   ảnh bo góc trên, khối chữ trắng bên dưới (mark tài trợ nhỏ màu xám,
   tiêu đề đậm đen, địa điểm xám, giá xanh lá đậm) trong CÙNG 1 khung viền.
   Toàn bộ thẻ là 1 link lớn (không có nút CTA riêng, giống hệt mẫu). ------ */
.gsb-ad-item {
  display: block; border-radius: 8px; background: var(--white);
  border: 1px solid var(--border); overflow: hidden; margin-bottom: 15px;
  transition: transform .2s, box-shadow .2s;
}
.gsb-ad-item:hover { transform: translateY(-2px); box-shadow: 0 4px 8px rgba(0,0,0,.1); }
.gsb-ad-item-link { display: block; text-decoration: none; color: inherit; }
.gsb-ad-btn {
  display: block; text-align: center; padding: 9px; margin: 0 10px 10px;
  background: var(--active-bg); color: var(--forest-800); font-weight: 700; font-size: 12.5px;
  border: none; border-radius: 5px; text-decoration: none;
}
.gsb-ad-btn:hover { background: #dcefe3; }
.gsb-sponsored-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 700; color: var(--forest-600); margin-bottom: 8px;
}
.gsb-ad-caption { font-size: 13px; color: var(--ink-800); line-height: 1.5; margin: 8px 0; }
.gsb-ad-detail { background: var(--page-bg); border-radius: 10px; padding: 10px 12px; margin: 8px 0; }
.gsb-ad-detail-title { font-weight: 700; font-size: 13.5px; margin-bottom: 3px; }
.gsb-ad-detail-meta { font-size: 12px; color: var(--ink-600); margin-bottom: 6px; }
.gsb-ad-detail-specs { display: flex; gap: 10px; font-size: 11.5px; color: var(--ink-600); margin-bottom: 6px; flex-wrap: wrap; }
.gsb-ad-detail-price { font-weight: 700; color: var(--forest-700); font-size: 13px; }
.gsb-ad-detail-post-content { font-size: 12.5px; color: var(--ink-700); line-height: 1.5; margin: 0; }

/* Khối chữ NGAY DƯỚI ảnh - đúng kiểu mẫu tham khảo (title/địa điểm/giá) */
.gsb-ad-info { padding: 10px; }
.gsb-ad-info-title { font-weight: 600; font-size: 14px; color: var(--ink-900); margin-bottom: 4px; }
.gsb-ad-info-loc { font-size: 12.5px; color: var(--ink-600); margin-bottom: 6px; display: flex; align-items: center; gap: 4px; }
.gsb-ad-info-price { font-weight: 700; font-size: 13px; color: var(--forest-700); }

@media (min-width: 992px) {
  .page-shell-3col {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr) 300px;
    justify-content: center;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
    align-items: start;
  }
  /* Trang tự khai báo $wide_shell = true (VD property.php) cần nhiều chỗ
     hơn cho nội dung (ảnh lớn + khung giá riêng bên cạnh) - nhường luôn chỗ
     của cột phải cho nội dung đó thay vì hiện 2 khung "bên phải" cạnh nhau
     gây rối mắt (footer.php cũng không render .global-sidebar-right khi
     $wide_shell bật, xem includes/footer.php). */
  .page-shell-3col.shell-wide {
    grid-template-columns: 280px minmax(0, 900px);
  }

  .global-sidebar-left, .global-sidebar-right {
    display: block;
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
  }
  .global-sidebar-left::-webkit-scrollbar, .global-sidebar-right::-webkit-scrollbar { width: 5px; }
  .global-sidebar-left::-webkit-scrollbar-thumb, .global-sidebar-right::-webkit-scrollbar-thumb { background: transparent; border-radius: 10px; }
  .global-sidebar-left:hover::-webkit-scrollbar-thumb, .global-sidebar-right:hover::-webkit-scrollbar-thumb { background: #ccc; }
  .global-sidebar-left, .global-sidebar-right { scrollbar-color: transparent transparent; }
  .global-sidebar-left:hover, .global-sidebar-right:hover { scrollbar-color: #ccc transparent; }

  /* .app-shell giờ LẤP ĐẦY đúng cột giữa của lưới 3 cột (không còn tự giới
     hạn max-width/căn giữa/đổ bóng riêng như trên mobile) */
  .app-shell, .app-shell.app-shell-wide {
    max-width: 100%; margin: 0; box-shadow: none; padding-bottom: 24px;
    min-width: 0; /* QUAN TRỌNG: mặc định CSS Grid để item con co giãn theo
    "min-content" của NỘI DUNG BÊN TRONG (VD lịch nhiều tháng min-width:320px/
    tháng ở booking.php) - khiến cả cột lưới 1fr bị ép rộng ra theo, phá vỡ
    tỉ lệ 3 cột trái/giữa/phải dù bên trong ĐÃ CÓ overflow-x:auto riêng. Đặt
    min-width:0 ở đây buộc trình duyệt tôn trọng đúng độ rộng cột lưới đã
    định (1fr), phần nào tràn thì tự cuộn ngang bên trong, không đẩy phá cột. */
  }
  body { background: var(--page-bg); }

  /* --------------------------------------------------------------------
     HEADER ĐÓNG BĂNG (fixed) chạy full ngang toàn màn hình, nằm TRÊN cả
     3 cột - giống hệt tinh thần mẫu tham khảo the_chill_dalat_redesign.html
     (.navbar position:fixed). .topbar vốn nằm bên trong .app-shell (chỉ ở
     cột giữa), nhưng position:fixed sẽ tự thoát ra khỏi ràng buộc của lưới
     3 cột cha, tự căn theo TOÀN BỘ khung nhìn (viewport) - không cần đổi vị
     trí đặt thẻ trong HTML.
     -------------------------------------------------------------------- */
  .topbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 300;
    width: 100%;
    padding: 12px 28px;
  }
  /* 3 phần cân đối: logo (trái, rộng cố định) - ô tìm kiếm (giữa, tự canh
     giữa nhờ 2 bên rộng bằng nhau) - icon-group (phải, rộng cố định bằng
     bên trái) - giống đúng tỉ lệ nav-left/nav-center/nav-right của mẫu
     tham khảo. Trước đây ô tìm kiếm nằm LỒNG bên trong icon-group nên
     không thể canh giữa thật được (luôn lệch về phía phải) - đã tách ra
     làm phần tử con riêng của .topbar (xem includes/header.php). */
  .topbar .brand-logo { flex: 0 0 260px; display: flex; align-items: baseline; gap: 8px; }
  .brand-logo-main { display: block; }
  .brand-logo-domain { display: inline; font-family: var(--font-script); font-size: 18px; color: var(--ink-500); }
  .topbar .icon-group { flex: 0 0 260px; justify-content: flex-end; gap: 10px; }
  /* .topbar-search-wrap giờ là phần tử con TRỰC TIẾP của .topbar (bọc quanh
     nút + dropdown kết quả) - phải đặt flex:1 ở ĐÂY để chiếm đúng khoảng
     giữa còn lại và canh giữa nút bên trong nó, KHÔNG đặt trực tiếp lên nút
     .topbar-search-btn nữa (nó giờ nằm lồng bên trong wrap, không còn là
     con trực tiếp của .topbar để flex ngang hàng với logo/icon-group). */
  .topbar-search-wrap { flex: 1 1 auto; max-width: 600px; margin: 0 auto; }
  /* QUAN TRỌNG: phải viết ".topbar .topbar-search-btn" (2 lớp, không phải 1
     lớp ".topbar-search-btn") để độ đặc hiệu CSS đủ THẮNG rule gốc
     ".topbar .icon-btn" (dòng ~80, quy định width:38px/border-radius:50%/
     background:transparent) - nếu chỉ viết 1 lớp, rule gốc vẫn thắng dù
     nằm phía TRÊN trong file, vì CSS ưu tiên độ đặc hiệu cao hơn trước,
     không phải "ai viết sau thắng" khi độ đặc hiệu khác nhau. Đây chính là
     lỗi khiến ô tìm kiếm mất khung, chữ tràn ra ngoài "trơ trọi" trước đó. */
  .topbar .topbar-search-btn {
    width: 100%; height: 42px; border-radius: 5px;
    background: var(--page-bg); justify-content: flex-start; gap: 10px;
    padding: 0 18px; color: var(--ink-600); font-size: 13.5px; font-weight: 500;
  }
  .topbar .topbar-search-btn:hover { background: #e4e6eb; }
  .topbar-search-icon { font-size: 15px; flex-shrink: 0; }
  .topbar-search-label { display: inline; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topbar-search-dropdown { width: 100%; left: 0; }
  /* Chừa đúng khoảng trống phía trên bằng chiều cao header đóng băng, để
     nội dung/cột trái/cột phải không bị header đè lên lúc mới vào trang. */
  .page-shell-3col { padding-top: 78px; }
  .global-sidebar-left, .global-sidebar-right { top: 78px; max-height: calc(100vh - 98px); }

  /* Nút ☰ mở menu trượt mobile không còn cần thiết khi đã có sidebar trái
     cố định luôn hiện sẵn - ẩn đi cho gọn (menu trượt vẫn tồn tại trong
     HTML, chỉ không có nút bấm nào gọi tới trên desktop). */
  .topbar > .icon-btn:first-child { display: none; }

  /* Thanh điều hướng dưới (bottom-nav) chỉ dành cho mobile - trên desktop
     đã có sidebar trái làm điều hướng chính, ẩn taskbar dưới cho gọn giống
     mẫu tham khảo (.bottom-nav chỉ hiện <768px ở file mẫu). */
  .bottom-nav { display: none; }
  .app-shell { padding-bottom: 24px; } /* không cần chừa chỗ bottom-nav nữa */

  /* Cột giữa giờ rộng 680px (thay vì ~430px như mobile) - nới cỡ vài khối
     cho thoáng đúng tỉ lệ mẫu tham khảo, KHÔNG đổi cấu trúc/hành vi gì. */
  .fb-story-card { width: 100px; height: 160px; }
  .composer, .stories, .post { margin-left: 0; margin-right: 0; }

  /* ---------------------------------------------------------------------
     TRANG KHÁM PHÁ (explore.php) trên desktop rộng - lưới 2 CỘT CỐ ĐỊNH
     (theo đúng yêu cầu - không dùng auto-fill co giãn), đồng thời làm lại
     thanh tiêu đề/tìm kiếm cho thoáng và chuyên nghiệp hơn (trước đây các
     khối vốn thiết kế cho mobile hẹp bị kéo giãn thô trong khung desktop
     rộng, nhìn rối).
     --------------------------------------------------------------------- */
  .explore-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding: 4px 4px 16px; }
  .explore-section-header-full { grid-column: 1 / -1; }
  .explore-result-count { padding: 0 4px 10px; }
}

/* Mark tin cậy cạnh tên villa/tác giả (Sale/Host đã đăng ký hợp lệ) - icon
   tick tròn (kiểu Twitter/X verified) + CHỮ "Sale/Host được xác minh" gói
   chung thành 1 huy hiệu dạng viên nhỏ, nền nhạt cùng tông màu icon (xanh lá
   cho Sale, xanh dương cho Host) - chuyên nghiệp, dễ nhận biết hơn hẳn kiểu
   chữ thường trôi nổi cạnh tên hay icon trơn không chú thích. */
.trust-badge {
  display: inline-flex; align-items: center; gap: 4px; vertical-align: middle;
  margin-left: 6px; padding: 2px 9px 2px 6px; border-radius: 20px;
  font-size: 11px; font-weight: 700; white-space: nowrap; line-height: 1.3;
}
.trust-badge-sale { color: #1e8e3e; background: rgba(30,142,62,.1); }
.trust-badge-host { color: #1a73e8; background: rgba(26,115,232,.1); }
.trust-badge-label { line-height: 1; }


/* ==========================================================================
   TRANG THÔNG TIN/PHÁP LÝ (about.php, privacy.php, terms.php,
   refund_policy.php) - trước đây mỗi trang chỉ có <h3>/<p>/<ul> với style
   inline rời rạc, nhìn như văn bản Word dán vào web, không tạo được cảm giác
   chuyên nghiệp/đáng tin cho 1 nền tảng có xử lý tiền thật (đặt cọc). Bộ
   class .legal-* bên dưới dùng CHUNG cho cả 4 trang - đổi 1 chỗ, áp dụng
   đồng bộ mọi nơi, không phải sửa rải rác từng trang.
   ========================================================================== */

/* Khối mở đầu - icon tròn nổi bật + tiêu đề + mô tả ngắn, thay cho việc lao
   thẳng vào nội dung ngay dưới thanh topbar cụt lủn như trước */
.legal-hero {
  text-align: center; padding: 32px 20px 26px;
  background: linear-gradient(180deg, #fbfaf7 0%, var(--page-bg) 100%);
  border-bottom: 1px solid var(--border);
}
.legal-hero-icon {
  width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 16px;
  background: var(--forest-700); display: flex; align-items: center; justify-content: center;
  font-size: 26px; box-shadow: 0 4px 14px rgba(31,61,46,.25);
}
.legal-hero h1 {
  font-family: var(--font-display); font-size: 22px; font-weight: 800;
  color: var(--forest-800); margin: 0 0 6px;
}
.legal-hero p {
  font-size: 13.5px; color: var(--ink-600); line-height: 1.6; max-width: 460px; margin: 0 auto;
}
.legal-hero-meta {
  display: inline-block; margin-top: 14px; padding: 4px 14px; border-radius: 20px;
  background: #fff; border: 1px solid var(--border-strong); font-size: 11.5px; color: var(--ink-500);
}

.legal-body { max-width: 640px; margin: 0 auto; padding: 24px 20px 8px; }

/* Mỗi mục là 1 "card" riêng biệt, số thứ tự trong badge tròn - dễ quét mắt
   hơn hẳn 1 khối văn bản dài liên tục, và tạo cảm giác nội dung được tổ chức
   nghiêm túc/uy tín thay vì chỉ dán text thô */
.legal-section {
  background: #fff; border: 1px solid var(--border); border-radius: 14px;
  padding: 20px 20px 18px; margin-bottom: 14px;
}
.legal-section-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.legal-section-num {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 8px;
  background: var(--forest-100); color: var(--forest-700); font-weight: 800; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}
.legal-section h3 {
  font-family: var(--font-display); font-size: 15.5px; font-weight: 700;
  color: var(--forest-800); margin: 0;
}
.legal-section p, .legal-section li { font-size: 13.5px; line-height: 1.7; color: var(--ink-900); }
.legal-section ul { margin: 6px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.legal-section p { margin: 0 0 6px; }
.legal-section p:last-child, .legal-section ul:last-child { margin-bottom: 0; }
.legal-section a { color: var(--forest-700); font-weight: 600; }
.legal-section a:hover { text-decoration: underline; }

/* Khối cảnh báo/nhấn mạnh bên trong 1 mục (VD lưu ý quan trọng) - tách biệt
   hẳn khỏi văn bản thường bằng nền + viền màu hổ phách, không dùng lẫn với
   .alert-error (đó là báo lỗi form, đây là ghi chú chính sách) */
.legal-note {
  background: #fff8ec; border: 1px solid #f0c674; border-radius: 10px;
  padding: 12px 14px; margin-top: 10px; font-size: 12.5px; color: #7a5a12; line-height: 1.6;
}

/* Khối liên hệ cuối trang - card riêng nổi bật, có nút Zalo thật (không chỉ
   link chữ xanh nhỏ) để tạo hành động rõ ràng, đúng tinh thần "thu hút bằng
   niềm tin" thay vì kết thúc trang bằng 1 dòng chữ đơn điệu */
.legal-contact-card {
  background: linear-gradient(135deg, var(--forest-700), var(--forest-800));
  border-radius: 16px; padding: 24px 22px; text-align: center; color: #fff; margin: 6px 0 18px;
}
.legal-contact-card h3 { font-family: var(--font-display); font-size: 16px; font-weight: 800; margin: 0 0 6px; color: #fff; }
.legal-contact-card p { font-size: 13px; color: rgba(255,255,255,.85); margin: 0 0 16px; line-height: 1.6; }
.legal-contact-btn {
  display: inline-flex; align-items: center; gap: 8px; background: #fff; color: var(--forest-800);
  font-weight: 700; font-size: 13.5px; padding: 11px 22px; border-radius: 30px; text-decoration: none;
}
.legal-contact-btn:hover { opacity: .92; }

/* Link chéo qua các trang pháp lý khác - dạng viên nhỏ thay vì chuỗi link
   gạch dưới nối tiếp nhau khó phân biệt điểm bắt đầu/kết thúc */
.legal-crosslinks { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 4px 0 24px; }
.legal-crosslinks a {
  font-size: 12px; font-weight: 600; color: var(--forest-700); background: var(--forest-100);
  padding: 7px 14px; border-radius: 20px; text-decoration: none;
}
.legal-crosslinks a:hover { background: var(--active-bg); }

/* ==========================================================================
   HOÀN TẤT HỒ SƠ (complete_profile.php) - trước đây toàn bộ style viết tay
   inline rời rạc (padding/border lặp lại ở từng input), giờ gom về class
   .cp-* dùng chung + thêm thanh chỉ báo bước (steps) để khách biết đang ở
   đâu trong quy trình, đỡ cảm giác "hỏi cung" đột ngột khi mới đăng nhập
   xong đã bị chặn lại yêu cầu điền thêm. ========================================================================== */
.cp-wrap { max-width: 460px; margin: 0 auto; padding: 28px 20px 40px; }
.cp-card {
  background: #fff; border: 1px solid var(--border); border-radius: 18px;
  padding: 28px 24px 26px; box-shadow: 0 2px 16px rgba(20,30,25,.06);
}
.cp-icon {
  width: 60px; height: 60px; margin: 0 auto 16px; border-radius: 18px;
  background: linear-gradient(135deg, var(--forest-600), var(--forest-800));
  display: flex; align-items: center; justify-content: center; font-size: 28px;
  box-shadow: 0 6px 16px rgba(31,61,46,.22);
}
.cp-title { font-family: var(--font-display); font-size: 19px; font-weight: 800; color: var(--forest-800); margin: 0 0 6px; text-align: center; }
.cp-desc { font-size: 13.5px; color: var(--ink-600); line-height: 1.6; text-align: center; margin: 0 0 22px; }

/* Thanh chỉ báo bước - 3 chấm nối liền, chấm đã qua/đang ở tô màu forest,
   chấm chưa tới màu nhạt - cho khách thấy rõ còn bao xa mới xong, giảm cảm
   giác "không biết còn hỏi gì nữa" */
.cp-steps { display: flex; align-items: center; justify-content: center; gap: 6px; margin-bottom: 24px; }
.cp-steps .cp-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong); transition: background .2s; }
.cp-steps .cp-line { width: 28px; height: 2px; background: var(--border-strong); }
.cp-steps .cp-dot.done, .cp-steps .cp-line.done { background: var(--forest-600); }
.cp-steps .cp-dot.active { background: var(--forest-700); box-shadow: 0 0 0 4px var(--active-bg); }

.cp-field { margin-bottom: 16px; }
.cp-field label { font-size: 12.5px; font-weight: 700; color: var(--ink-600); display: block; margin-bottom: 6px; }
.cp-field input {
  width: 100%; padding: 13px 14px; border-radius: 10px; border: 1.5px solid var(--border-strong);
  font-family: var(--font-body); font-size: 15.5px; box-sizing: border-box; background: #fbfbfa;
  transition: border-color .15s, background .15s;
}
.cp-field input:focus { outline: none; border-color: var(--forest-500); background: #fff; }
.cp-field-status { font-size: 12px; margin-top: 5px; min-height: 15px; }

.cp-otp-input {
  width: 100%; padding: 14px; border-radius: 10px; border: 1.5px solid var(--border-strong);
  font-family: var(--font-body); font-size: 26px; text-align: center; letter-spacing: 10px;
  box-sizing: border-box; background: #fbfbfa; font-weight: 700; color: var(--forest-800);
}
.cp-otp-input:focus { outline: none; border-color: var(--forest-500); background: #fff; }

.cp-btn {
  width: 100%; padding: 14px; border: none; border-radius: 12px; cursor: pointer;
  background: linear-gradient(135deg, var(--forest-600), var(--forest-800)); color: #fff;
  font-family: var(--font-display); font-weight: 700; font-size: 15px;
  box-shadow: 0 4px 12px rgba(31,61,46,.25); transition: opacity .15s, transform .1s;
}
.cp-btn:hover { opacity: .93; }
.cp-btn:active { transform: scale(.98); }

.cp-hint { font-size: 11.5px; color: var(--ink-400); text-align: center; margin-top: 16px; line-height: 1.6; }
.cp-links { text-align: center; margin-top: 18px; font-size: 13px; }
.cp-links button { background: none; border: none; cursor: pointer; font-family: var(--font-body); }
.cp-links .cp-link-primary { color: var(--forest-700); font-weight: 700; }
.cp-links .cp-link-muted { color: var(--ink-600); text-decoration: underline; }
.cp-links .cp-sep { color: var(--ink-400); }

/* ==========================================================================
   CHỈNH SỬA TRANG CÁ NHÂN (edit_profile.php) - trước đây toàn bộ input dùng
   style inline lặp lại, nút "Đổi ảnh" chỉ là chữ nổi trên ảnh bìa không rõ
   ràng. Giờ gom về .ep-* + dùng lại tinh thần card của .cp-card (đã áp dụng
   ở complete_profile.php) để đồng bộ toàn site.
   ========================================================================== */
.ep-cover-wrap { position: relative; width: 100%; aspect-ratio: 2.7/1; background-size: cover; background-position: center; background-color: var(--page-bg); }
.ep-cover-edit-btn {
  position: absolute; right: 14px; bottom: 14px; z-index: 4; display: inline-flex; align-items: center; gap: 6px;
  background: rgba(20,30,25,.62); backdrop-filter: blur(2px); color: #fff; padding: 9px 16px;
  border-radius: 24px; font-size: 12.5px; font-weight: 700; cursor: pointer; border: 1px solid rgba(255,255,255,.25);
}
.ep-avatar-block { text-align: center; margin-top: -46px; margin-bottom: 20px; position: relative; z-index: 2; }
.ep-avatar {
  width: 92px; height: 92px; margin: 0 auto 10px; border: 4px solid #fff; border-radius: 50%;
  background-size: cover; background-position: center; box-shadow: 0 4px 12px rgba(0,0,0,.15);
}
.ep-avatar-edit-label { color: var(--forest-700); font-weight: 700; font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }

.ep-body { max-width: 600px; margin: 0 auto; padding: 0 20px 30px; }
.ep-card { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 22px 20px; margin-bottom: 16px; box-shadow: 0 2px 12px rgba(20,30,25,.05); }
.ep-card-title { font-family: var(--font-display); font-size: 13px; font-weight: 800; color: var(--forest-800); text-transform: uppercase; letter-spacing: .3px; margin: 0 0 16px; display: flex; align-items: center; gap: 7px; }

.ep-field { margin-bottom: 16px; }
.ep-field:last-child { margin-bottom: 0; }
.ep-field label { font-size: 12.5px; font-weight: 700; color: var(--ink-600); display: block; margin-bottom: 6px; }
.ep-field input, .ep-field textarea {
  width: 100%; padding: 12px 14px; border-radius: 10px; border: 1.5px solid var(--border-strong);
  font-family: var(--font-body); font-size: 14.5px; box-sizing: border-box; background: #fbfbfa; transition: border-color .15s, background .15s;
}
.ep-field input:focus, .ep-field textarea:focus { outline: none; border-color: var(--forest-500); background: #fff; }
.ep-field input:disabled {
  background: var(--page-bg); color: var(--ink-600); border-color: var(--border); cursor: not-allowed;
}
.ep-field-hint { font-size: 11.5px; color: var(--ink-400); margin-top: 6px; line-height: 1.5; }

/* Trạng thái "đã xác minh" - badge nhỏ xanh cạnh nhãn thay vì chỉ có ghi chú
   chữ mờ bên dưới, giúp khách nhận ra ngay đây là dữ liệu đáng tin/khoá cứng */
.ep-verified-badge {
  display: inline-flex; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 700;
  color: var(--forest-700); background: var(--forest-100); padding: 2px 8px; border-radius: 10px; margin-left: 6px;
}
.ep-verified-badge.ep-badge-warn { color: #a06a12; background: #fff3d6; }

.ep-add-row { display: flex; gap: 8px; margin-bottom: 6px; align-items: stretch; }
.ep-add-row input { flex: 1; }
.ep-add-btn {
  padding: 0 20px; border-radius: 10px; border: none; color: #fff;
  background: linear-gradient(135deg, var(--forest-600), var(--forest-800));
  font-family: var(--font-display); font-weight: 700; font-size: 13px; white-space: nowrap; cursor: pointer;
  box-shadow: 0 3px 10px rgba(31,61,46,.22); transition: opacity .15s, transform .1s;
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
}
.ep-add-btn:hover { opacity: .92; }
.ep-add-btn:active { transform: scale(.97); }
.ep-add-btn.verify { background: linear-gradient(135deg, var(--forest-700), var(--forest-900, #14261c)); }
/* Nút "Xác minh ngay" đứng riêng lẻ (không nằm trong .ep-add-row cạnh ô
   input) - trước đây chỉ kế thừa .ep-add-btn với padding ngang, KHÔNG có
   chiều cao/padding dọc riêng nên bị bẹt/lệch khi đứng 1 mình, nhìn như lỗi
   CSS. Giờ có class riêng, cao đầy đủ như 1 nút hành động thật sự. */
.ep-reverify-btn {
  padding: 11px 22px; border-radius: 10px; border: none; color: #fff;
  background: linear-gradient(135deg, var(--forest-600), var(--forest-800));
  font-family: var(--font-display); font-weight: 700; font-size: 13.5px; cursor: pointer;
  box-shadow: 0 3px 10px rgba(31,61,46,.22); transition: opacity .15s, transform .1s;
  display: inline-flex; align-items: center; gap: 6px;
}
.ep-reverify-btn:hover { opacity: .92; }
.ep-reverify-btn:active { transform: scale(.97); }
.ep-add-msg { font-size: 12px; margin-bottom: 8px; min-height: 16px; }
.ep-add-otp-row { display: none; gap: 8px; margin-bottom: 4px; }
.ep-add-otp-row input { flex: 1; letter-spacing: 4px; text-align: center; font-size: 16px; padding: 12px 14px; border-radius: 10px; border: 1.5px solid var(--border-strong); font-family: var(--font-body); box-sizing: border-box; background: #fbfbfa; }
.ep-add-otp-row input:focus { outline: none; border-color: var(--forest-500); background: #fff; }

.ep-save-btn {
  width: 100%; padding: 14px; border: none; border-radius: 12px; cursor: pointer;
  background: linear-gradient(135deg, var(--forest-600), var(--forest-800)); color: #fff;
  font-family: var(--font-display); font-weight: 700; font-size: 15px;
  box-shadow: 0 4px 12px rgba(31,61,46,.25); transition: opacity .15s, transform .1s;
}
.ep-save-btn:hover { opacity: .93; }
.ep-save-btn:active { transform: scale(.98); }

/* ==========================================================================
   KHỐI "TIỀN CỌC ĐỀ NGHỊ" TRÊN booking.php - TÁCH RIÊNG khỏi bảng giá thường,
   nổi bật hẳn (nền hổ phách nhạt, số to) để khách thấy NGAY và RÕ RÀNG số
   tiền cần chuyển TRƯỚC khi bấm sang bước tiếp theo, thay vì ẩn trong 1 dòng
   nhỏ giữa bảng giá (hoặc trước đây còn bị ẩn HẲN với đơn đặt trực tiếp
   không qua Sale).
   ========================================================================== */
.deposit-highlight-box {
  background: linear-gradient(135deg, #fff8ec, #fff3d6); border: 1.5px solid #f0c674;
  border-radius: 14px; padding: 16px 18px; margin: 14px 0; text-align: center;
}
.deposit-highlight-label {
  font-size: 12px; font-weight: 700; color: #8a6d1e; text-transform: uppercase; letter-spacing: .3px;
}
.deposit-highlight-amount {
  font-family: var(--font-display); font-size: 26px; font-weight: 800; color: #a06a12; margin-top: 6px;
}
.deposit-highlight-note { font-size: 11.5px; color: #8a6d1e; margin-top: 8px; line-height: 1.5; }

/* ==========================================================================
   BANNER NHẮC XÁC MINH LẠI (verify-reminder-banner) - hiện ở đầu app-shell
   khi tài khoản có email/SĐT ĐÃ CÓ GIÁ TRỊ nhưng CHƯA qua OTP (khác cổng
   chặn cứng "thiếu hẳn thông tin" ở complete_profile.php) - CHỈ NHẮC, không
   chặn thao tác, nên thiết kế rõ ràng/bắt mắt để không bị bỏ qua nhưng
   không dùng màu đỏ báo lỗi gắt (đây không phải lỗi của khách).
   ========================================================================== */
.verify-reminder-banner {
  display: flex; align-items: center; gap: 12px; margin: 0 0 1px;
  padding: 12px 16px; background: linear-gradient(90deg, #fff8ec, #fff3d6);
  border-bottom: 1px solid #f0c674; text-decoration: none; cursor: pointer;
  transition: background .15s;
}
.verify-reminder-banner:hover { background: linear-gradient(90deg, #fff3d6, #ffe9b3); }
.verify-reminder-icon { font-size: 20px; flex-shrink: 0; }
.verify-reminder-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.verify-reminder-text b { font-size: 13.5px; color: #7a5a12; }
.verify-reminder-text span { font-size: 12px; color: #8a6d1e; }
.verify-reminder-arrow { font-size: 18px; color: #a06a12; flex-shrink: 0; font-weight: 700; }
@media (max-width: 480px) {
  .verify-reminder-text b { font-size: 12.5px; }
  .verify-reminder-text span { font-size: 11px; }
}

/* Ô ghi chú khách tự nhập lúc đặt phòng (booking.php) */
.guest-note-box { margin: 14px 0; }
.guest-note-box label { font-size: 13px; font-weight: 700; color: var(--ink-700); display: block; margin-bottom: 6px; }
.guest-note-box textarea {
  width: 100%; padding: 11px 13px; border-radius: 10px; border: 1.5px solid var(--border-strong);
  font-family: var(--font-body); font-size: 14px; box-sizing: border-box; resize: vertical; min-height: 54px;
  background: #fbfbfa; transition: border-color .15s, background .15s;
}
.guest-note-box textarea:focus { outline: none; border-color: var(--forest-500); background: #fff; }

/* ==========================================================================
   KÝ HỢP ĐỒNG (partner_register.php) - bảng ký tên tay bằng canvas.
   ========================================================================== */
.contract-box { background: #fbfaf7; border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.contract-box-notice {
  font-size: 12.5px; color: var(--ink-700); line-height: 1.6; background: #fff8ec;
  border: 1px solid #f0c674; border-radius: 8px; padding: 10px 12px; margin-bottom: 14px;
}
.signature-pad-wrap {
  position: relative; width: 100%; height: 180px; background: #fff;
  border: 1.5px dashed var(--border-strong); border-radius: 10px; overflow: hidden; touch-action: none;
}
.signature-pad-canvas { width: 100%; height: 100%; display: block; cursor: crosshair; }
.signature-pad-placeholder {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: var(--ink-400); font-size: 14px; pointer-events: none;
}
.signature-pad-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.signature-clear-btn {
  background: none; border: 1px solid var(--border-strong); border-radius: 20px; padding: 7px 16px;
  font-size: 12.5px; font-weight: 700; color: var(--ink-700); cursor: pointer;
}
.signature-clear-btn:hover { background: var(--page-bg); }
.signature-status { font-size: 12.5px; font-weight: 700; }

/* ==========================================================================
   VĂN BẢN HỢP ĐỒNG (partner_register.php + admin/partner_approvals.php) -
   con dấu VUÔNG đúng chuẩn Hộ Kinh Doanh (không dùng dấu tròn - hình thức đó
   chỉ dành cho doanh nghiệp/tổ chức có tư cách pháp nhân) + khối chữ ký 2
   BÊN (Sàn / Sale-Host) kiểu chữ ký điện tử chuyên nghiệp.
   ========================================================================== */
.contract-document {
  background: #fffdf8; border: 1px solid #e8e2d0; border-radius: 12px;
  padding: 24px 22px; max-height: 480px; overflow-y: auto; font-size: 13.5px; color: var(--ink-800); line-height: 1.7;
}
.contract-document h4 { font-family: var(--font-display); font-size: 16px; color: var(--forest-800); margin: 0 0 10px; text-align: center; }
.contract-document p { margin: 0 0 12px; }
.contract-document-body { margin-bottom: 20px; }

/* ---- Hàng chữ ký 2 bên - Sàn (trái) / Sale-Host (phải) ---- */
.contract-signee-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  padding-top: 18px; border-top: 2px dashed #cfe6d6;
}
.contract-signee-col { text-align: center; }
.contract-signee-title { font-size: 11px; font-weight: 800; letter-spacing: .5px; color: var(--forest-700); margin-bottom: 10px; }

/* ---- Con dấu VUÔNG (Bên Sàn) - có viền đôi kiểu dấu mộc thật, chữ đỏ,
   KHÔNG bo góc tròn (đây là điểm khác biệt quan trọng so với bản cũ). ---- */
.contract-seal-square {
  display: inline-block; border: 2.5px solid #b5342a; padding: 3px; margin-bottom: 10px;
}
.contract-seal-square::before { content: ''; display: block; border: 1px solid #b5342a; padding: 10px 14px; }
.contract-seal-square { position: relative; }
.contract-seal-square-name, .contract-seal-square-divider, .contract-seal-square-addr {
  position: relative; z-index: 1;
}
.contract-seal-square-name {
  font-family: var(--font-display); font-size: 12px; font-weight: 800; color: #b5342a;
  line-height: 1.35; padding: 10px 14px 4px; letter-spacing: .3px;
}
.contract-seal-square-divider { height: 1px; background: #b5342a; opacity: .5; margin: 0 14px; }
.contract-seal-square-addr { font-size: 9.5px; color: #b5342a; line-height: 1.5; padding: 4px 14px 10px; opacity: .9; }

/* ---- Khối "chữ ký điện tử" (badge) - dùng chung cho cả Sàn lẫn đối tác,
   đổi màu theo bên để phân biệt rõ. ---- */
.contract-digital-sig-badge {
  display: flex; align-items: flex-start; gap: 8px; text-align: left;
  background: #f0f6f2; border: 1px solid #cfe6d6; border-radius: 10px; padding: 10px 12px; margin-top: 4px;
}
.contract-digital-sig-badge-partner { background: #eef4fb; border-color: #c6dcf0; }
.contract-digital-sig-badge-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.contract-digital-sig-badge-text { min-width: 0; }
.contract-digital-sig-badge-label { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .3px; color: var(--forest-700); }
.contract-digital-sig-badge-partner .contract-digital-sig-badge-label { color: #1c5fa8; }
.contract-digital-sig-badge-org { font-size: 12.5px; font-weight: 700; color: var(--ink-900); margin-top: 2px; word-break: break-word; }
.contract-digital-sig-badge-detail { font-size: 11px; color: var(--ink-600); margin-top: 2px; }
.contract-digital-sig-badge-time { font-size: 11px; color: var(--ink-600); margin-top: 3px; }
.contract-digital-sig-badge-code { font-size: 10px; color: var(--ink-500); margin-top: 3px; font-family: monospace; letter-spacing: .3px; }

/* ---- Chữ ký tay (Bên Sale/Host) ---- */
.contract-handwritten-sig-box {
  height: 90px; display: flex; align-items: center; justify-content: center;
  background: #fff; border: 1px dashed var(--border-strong); border-radius: 8px; margin-bottom: 10px;
}
.contract-handwritten-sig-empty { color: var(--ink-400); font-size: 13px; }
.contract-signed-image { max-width: 90%; max-height: 84px; }

.contract-unsigned-note {
  margin-top: 6px; padding: 8px 10px; background: #fff3d6; border: 1px solid #f0c674; border-radius: 8px;
  font-size: 11.5px; color: #7a5a12; text-align: center;
}

@media (max-width: 560px) {
  .contract-document { padding: 18px 14px; max-height: 380px; }
  .contract-signee-row { grid-template-columns: 1fr; }
  .contract-seal-square-name { font-size: 11px; }
}
