/* ============================================
   AURORA HEIGHTS — VR360 Real Estate Landing
   ============================================ */
/* Hide mobile-only elements at desktop */
#mobile-drawer,
#mobile-burger {
  display: none;
}

:root {
  --bg: #0a0d12;
  --fg: #f5f1e8;
  --muted: rgba(245, 241, 232, 0.65);
  --dim: rgba(245, 241, 232, 0.4);
  --hairline: rgba(245, 241, 232, 0.14);
  --hairline-strong: rgba(245, 241, 232, 0.28);
  --panel: rgba(12, 16, 22, 0.62);
  --panel-solid: rgba(12, 16, 22, 0.88);
  --accent: #e8c089;
  --accent-soft: rgba(232, 192, 137, 0.18);
  --danger: #ff6b6b;
  --ok: #7ad79a;

  /* Botchat tokens (BOTCHAT_SPEC.md §7) */
  --bb-h: 60px;
  --bb-edge-left: 20px;
  --bb-edge-right: 20px;
  --icon-blue: #2bb6e6;
  --icon-blue-dark: #1a9bcb;
  --ai-neon: #16d472;
  --ai-neon-soft: rgba(22,212,114,.18);
  --ai-neon-strong: rgba(22,212,114,.55);

  --font-display: "Cormorant Garamond", "Times New Roman", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", Menlo, monospace;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 18px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  letter-spacing: 0.01em;
}

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
a { color: inherit; text-decoration: none; }

/* ============================================
   VR360 CANVAS LAYER
   ============================================ */
#vr-stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  cursor: grab;
  background: #000;
}
#vr-stage:active { cursor: grabbing; }
#vr-stage canvas { display: block; width: 100% !important; height: 100% !important; }

/* Vignette overlay to anchor UI */
#vr-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,0.55) 100%),
    linear-gradient(to bottom, rgba(0,0,0,0.45) 0%, transparent 18%, transparent 70%, rgba(0,0,0,0.55) 100%);
  z-index: 1;
}

/* ============================================
   HOTSPOTS (in-scene clickable points)
   ============================================ */
#hotspot-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  overflow: hidden;
}

.hotspot {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  cursor: pointer;
  z-index: 5;
}

.hotspot-pin {
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(232, 192, 137, 0.18);
  border: 1.5px solid var(--accent);
  display: grid;
  place-items: center;
  backdrop-filter: blur(8px);
  transition: transform 0.25s ease, background 0.25s ease;
}
.hotspot-pin::before {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px solid rgba(232, 192, 137, 0.4);
  animation: hotspot-pulse 2.4s ease-out infinite;
}
.hotspot-pin::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(232, 192, 137, 0.8);
}
.hotspot[data-type="nav"] .hotspot-pin {
  border-radius: 6px;
  background: rgba(232, 192, 137, 0.95);
}
.hotspot[data-type="nav"] .hotspot-pin::after {
  width: 0;
  height: 0;
  border-left: 5px solid var(--bg);
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  background: transparent;
  box-shadow: none;
  margin-left: 2px;
}
.hotspot[data-type="nav"] .hotspot-pin::before {
  border-radius: 6px;
}

.hotspot:hover .hotspot-pin {
  transform: scale(1.15);
  background: rgba(232, 192, 137, 0.45);
}
.hotspot[data-type="nav"]:hover .hotspot-pin {
  background: var(--accent);
}

.hotspot-label {
  position: absolute;
  top: 50%;
  left: calc(100% + 14px);
  transform: translateY(-50%);
  white-space: nowrap;
  background: var(--panel-solid);
  border: 1px solid var(--hairline-strong);
  padding: 6px 12px;
  border-radius: var(--r-sm);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.hotspot:hover .hotspot-label { opacity: 1; transform: translateY(-50%) translateX(2px); }

@keyframes hotspot-pulse {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* ============================================
   UI LAYER (smart hide on 360 interaction)
   ============================================ */
.ui {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}
.ui > * { pointer-events: auto; }

.ui.hidden .top-bar,
.ui.hidden .nav-panel,
.ui.hidden .project-card,
.ui.hidden .np-expand,
.ui.hidden .tip {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.ui.hidden .top-bar { transform: translateY(-18px); }
.ui.hidden .nav-panel { transform: translateX(-18px); }
.ui.hidden .project-card { transform: translateX(18px); }

.ui-restore {
  position: fixed;
  top: 18px;
  right: 22px;
  z-index: 70;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: var(--panel-solid);
  backdrop-filter: blur(20px);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  color: var(--accent);
  opacity: 0;
  pointer-events: none;
  transform: scale(0.9);
  transition: all 0.3s ease;
}
/* Visible only when .ui is hidden (sibling selector since .ui-restore is now outside .ui) */
.ui.hidden ~ .ui-restore {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}
.ui-restore:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* ============================================
   TOP BAR — thin gradient fade
   ============================================ */
.top-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  background: linear-gradient(180deg, rgba(10,13,18,0.72) 0%, transparent 100%);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-mark { display: none; }
.brand-logo-img {
  height: 36px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
}
.brand-text { line-height: 1.15; }
.brand-text .name {
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 0.06em;
  font-weight: 500;
}
.brand-text .sub {
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 1px;
}

/* (mega-nav removed — replaced by left nav-panel) */

.top-cta {
  display: flex;
  gap: 8px;
  align-items: center;
}
.tb-btn {
  height: 34px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--panel);
  backdrop-filter: blur(20px);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  transition: all 0.2s ease;
}
.tb-btn:hover {
  background: rgba(245,241,232,0.06);
  border-color: var(--hairline-strong);
  color: var(--fg);
}
.tb-btn .tb-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--dim);
  transition: all 0.25s;
}
.tb-btn.active .tb-dot,
.tb-btn:hover .tb-dot {
  background: var(--accent);
  box-shadow: 0 0 8px rgba(232,192,137,0.6);
}
.tb-btn-primary {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}
.tb-btn-primary:hover {
  background: #f3d29c;
  color: var(--bg);
  border-color: #f3d29c;
}
.tb-btn-block {
  width: 100%;
  justify-content: center;
  height: 38px;
}

/* Separator + ctrl group inside top-bar */
.tb-sep {
  width: 1px;
  height: 22px;
  background: var(--hairline);
  margin: 0 4px;
}
.tb-ctrlgroup {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--panel);
  backdrop-filter: blur(20px);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  padding: 3px;
}
.tb-ctrlgroup .ctrl-btn {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: transparent;
  backdrop-filter: none;
  border: 1px solid transparent;
  color: var(--muted);
}
.tb-ctrlgroup .ctrl-btn:hover {
  background: rgba(245,241,232,0.06);
  border-color: var(--hairline);
  color: var(--fg);
}
.tb-ctrlgroup .ctrl-btn.active {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}
.tb-ctrlgroup .ctrl-btn-help {
  background: var(--accent);
  color: var(--bg);
  font-size: 13px;
  font-weight: 700;
  border-color: var(--accent);
}
.tb-ctrlgroup .ctrl-btn-help:hover {
  background: #f3d29c;
  color: var(--bg);
  border-color: #f3d29c;
}

/* Legacy .btn (used inside modal) */
.btn {
  font-size: 12px;
  letter-spacing: 0.06em;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid var(--hairline-strong);
  background: var(--panel);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn-primary {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}
.btn-primary:hover { background: #f3d29c; color: var(--bg); border-color: #f3d29c; }

/* ============================================
   LEFT PANEL — Nav panel (ctrl + tabs + search + list)
   ============================================ */
.nav-panel {
  position: absolute;
  left: 14px;
  top: 72px;
  max-height: calc(100vh - 86px);
  z-index: 15;
  width: 320px;
  background: var(--panel);
  backdrop-filter: blur(28px) saturate(1.2);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.nav-panel.collapsed {
  transform: translateX(calc(-100% - 20px));
  opacity: 0;
  pointer-events: none;
}

/* Floating expand button when panel is collapsed */
.np-expand {
  position: absolute;
  left: 14px;
  top: 72px;
  z-index: 14;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--panel-solid);
  backdrop-filter: blur(20px);
  border: 1px solid var(--hairline);
  color: var(--accent);
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-8px);
  transition: all 0.3s ease;
}
.nav-panel.collapsed ~ .np-expand,
body.nav-panel-collapsed .np-expand {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}
.np-expand:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* ─── Header (scene info + collapse) ─── */
.np-header {
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--hairline);
  flex-shrink: 0;
}
.np-head-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.np-collapse {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  display: grid;
  place-items: center;
  transition: all 0.18s ease;
}
.np-collapse:hover {
  background: rgba(245,241,232,0.06);
  color: var(--accent);
  border-color: var(--hairline);
}
.np-collapse svg { transition: transform 0.25s ease; }
.nav-panel.collapsed .np-collapse svg { transform: rotate(180deg); }

.np-eyebrow {
  font-size: 9px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 8px;
}
.np-eyebrow::before {
  content: "";
  width: 14px;
  height: 1px;
  background: var(--accent);
}
.np-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.005em;
  margin-bottom: 4px;
  text-wrap: balance;
}
.np-subtitle {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

/* ─── Search ─── */
.np-search {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  height: 36px;
  margin: 10px 12px 6px;
  background: rgba(245,241,232,0.04);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  flex-shrink: 0;
}
.np-search svg {
  color: var(--dim);
  flex-shrink: 0;
}
.np-search input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--fg);
  font-family: inherit;
  font-size: 12.5px;
}
.np-search input::placeholder { color: var(--dim); }

/* ─── List ─── */
.np-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 8px 12px;
  scrollbar-width: thin;
  scrollbar-color: var(--hairline-strong) transparent;
}
.np-list::-webkit-scrollbar { width: 4px; }
.np-list::-webkit-scrollbar-thumb { background: var(--hairline-strong); border-radius: 2px; }
.np-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin: 4px 0;
  background: rgba(245,241,232,0.03);
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.22s ease;
}
.np-card:hover {
  background: rgba(245,241,232,0.06);
  border-color: var(--hairline);
}
.np-card.active {
  background: var(--accent-soft);
  border-color: var(--accent);
}
.np-card-idx {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(245,241,232,0.06);
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  flex-shrink: 0;
}
.np-card.active .np-card-idx {
  background: var(--accent);
  color: var(--bg);
}
.np-card-info { flex: 1; min-width: 0; }
.np-card-name {
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.np-card-sub {
  font-size: 10px;
  color: var(--dim);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 2px;
}
.np-card-arrow {
  color: var(--dim);
  flex-shrink: 0;
  transition: color 0.2s, transform 0.2s;
}
.np-card:hover .np-card-arrow {
  color: var(--accent);
  transform: translateX(2px);
}
.np-empty {
  padding: 24px 12px;
  text-align: center;
  font-size: 12px;
  color: var(--dim);
}

/* ─── Accordion groups inside list ─── */
.np-group {
  margin: 6px 0;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(245,241,232,0.02);
  border: 1px solid var(--hairline);
}
.np-group-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: transparent;
  border: none;
  color: var(--fg);
  cursor: pointer;
  text-align: left;
  transition: background 0.18s ease;
}
.np-group-head:hover {
  background: rgba(245,241,232,0.04);
}
.np-group.open .np-group-head {
  background: var(--accent-soft);
  color: var(--accent);
}
.np-group-icon {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: rgba(245,241,232,0.06);
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent);
  flex-shrink: 0;
  letter-spacing: 0.04em;
}
.np-group.open .np-group-icon {
  background: var(--accent);
  color: var(--bg);
}
.np-group-title {
  flex: 1;
  min-width: 0;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.np-group-count {
  font-size: 10px;
  color: var(--dim);
  font-family: var(--font-mono);
  margin-right: 6px;
}
.np-group.open .np-group-count { color: var(--accent); }
.np-group-chev {
  color: var(--dim);
  transition: transform 0.25s ease;
  flex-shrink: 0;
}
.np-group.open .np-group-chev {
  transform: rotate(90deg);
  color: var(--accent);
}

.np-group-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: rgba(0,0,0,0.18);
}
.np-group.open .np-group-body {
  max-height: 720px;
}
.np-group-body .np-card {
  margin: 4px 8px;
  background: rgba(245,241,232,0.03);
}
.np-group-body .np-card:first-child { margin-top: 8px; }
.np-group-body .np-card:last-child { margin-bottom: 8px; }

/* ============================================
   RIGHT PANEL — Project Card (top-anchored)
   ============================================ */
.project-card {
  position: absolute;
  right: 14px;
  top: 72px;
  z-index: 15;
  width: 350px;
  background: var(--panel);
  backdrop-filter: blur(28px) saturate(1.2);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  overflow: hidden;
  transition: opacity 0.35s ease, transform 0.35s ease, width 0.3s ease;
}
/* Thu gọn — đồng bộ giao diện với .np-expand */
.project-card.collapsed {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--panel-solid);
  color: var(--accent);
}
/* Hover chỉ áp dụng cho thiết bị có chuột (desktop) */
@media (hover: hover) {
  .project-card.collapsed:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
  }
}
.project-card.collapsed > *:not(.pc-head) { display: none; }
.project-card.collapsed .pc-head { padding: 0; border: none; height: 100%; display: grid; place-items: center; }
.project-card.collapsed .pc-head > *:not(.pc-head-top) { display: none; }
.project-card.collapsed .pc-head-top { margin: 0; }
.project-card.collapsed .pc-status { display: none; }
.project-card.collapsed .pc-collapse { color: var(--accent); }
.project-card.collapsed .pc-collapse svg { transform: rotate(180deg); }


.pc-head {
  padding: 14px 16px 14px;
  border-bottom: 1px solid var(--hairline);
}
.pc-head-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.pc-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ok);
}
.pc-status .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 6px var(--ok);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.pc-collapse {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: var(--muted);
  transition: all 0.2s;
}
.pc-collapse:hover { background: rgba(245,241,232,0.06); color: var(--accent); }
.pc-collapse svg { transition: transform 0.25s ease; }

.pc-head h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.01em;
  margin-bottom: 3px;
}
.pc-head .loc {
  font-size: 11.5px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

.pc-price {
  padding: 12px 16px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 1px solid var(--hairline);
}
.pc-price .label {
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dim);
}
.pc-price .amount {
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--accent);
  font-weight: 500;
}

.pc-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--hairline);
}
.pc-stat {
  padding: 11px 14px;
  border-right: 1px solid var(--hairline);
}
.pc-stat:nth-child(2n) { border-right: none; }
.pc-stat:nth-child(n+3) { border-top: 1px solid var(--hairline); }
.pc-stat .v {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--fg);
  font-weight: 500;
  display: flex;
  align-items: baseline;
  gap: 3px;
}
.pc-stat .v small {
  font-size: 10px;
  color: var(--muted);
  font-family: var(--font-sans);
}
.pc-stat .k {
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 2px;
}

.pc-actions {
  padding: 12px 14px;
  display: grid;
  gap: 8px;
}


/* ============================================
   PROJECT CARD — Availability badge + countdown
   ============================================ */
.pc-availability {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  border-bottom: 1px solid var(--hairline);
  background: rgba(22,212,114,0.06);
}
.pc-avail-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ok);
}
.pc-avail-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 8px var(--ok);
  animation: pulse 1.8s ease-in-out infinite;
  flex-shrink: 0;
}
.pc-countdown {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
.pc-cd-label {
  font-size: 8.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
  line-height: 1;
  margin-bottom: 2px;
}
.pc-cd-time {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.08em;
  line-height: 1;
}
.pc-cd-time.expired { color: var(--muted); }

/* ============================================
   PROJECT CARD — Contact row (hotline + Zalo)
   ============================================ */
.pc-contact-row {
  display: flex;
  gap: 7px;
}
.pc-contact-btn {
  flex: 1;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 8px;
  border: 1.5px solid var(--hairline-strong);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.01em;
}
.pc-hotline {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}
.pc-hotline:hover {
  background: var(--accent);
  color: var(--bg);
}
.pc-zalo {
  color: #0068ff;
  border-color: rgba(0,104,255,0.4);
  background: rgba(0,104,255,0.08);
}
.pc-zalo:hover {
  background: #0068ff;
  color: #fff;
  border-color: #0068ff;
}


/* ============================================
   FLOORPLAN PANEL — Progress bars
   ============================================ */
.fp-progress-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}
.fp-progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.fp-progress-type {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  width: 80px;
  flex-shrink: 0;
  white-space: nowrap;
}
.fp-progress-bar-wrap {
  flex: 1;
  height: 6px;
  background: rgba(245,241,232,0.08);
  border-radius: 3px;
  overflow: hidden;
}
.fp-progress-bar {
  height: 100%;
  border-radius: 3px;
  background: var(--accent);
  transition: width 0.6s cubic-bezier(.4,0,.2,1);
}
.fp-progress-bar.low  { background: var(--ok); }
.fp-progress-bar.med  { background: var(--accent); }
.fp-progress-bar.hi   { background: var(--danger); }
.fp-progress-count {
  font-size: 10.5px;
  font-family: var(--font-mono);
  color: var(--muted);
  flex-shrink: 0;
  min-width: 56px;
  text-align: right;
}

/* ============================================
   FLOORPLAN PANEL — Filter bar
   ============================================ */
.fp-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
  padding: 12px 14px;
  margin-bottom: 12px;
  background: rgba(245,241,232,0.03);
  border: 1px solid var(--hairline);
  border-radius: 10px;
}
.fp-filter-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.fp-filter-label {
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
}
.fp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.fp-tag {
  height: 28px;
  padding: 0 11px;
  border-radius: 14px;
  border: 1px solid var(--hairline-strong);
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}
.fp-tag:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.fp-tag.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}
.fp-select {
  height: 30px;
  padding: 0 10px;
  background: rgba(245,241,232,0.04);
  border: 1px solid var(--hairline-strong);
  border-radius: 8px;
  color: var(--fg);
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
  min-width: 130px;
}
.fp-select:focus { border-color: var(--accent); }
.fp-select option { background: #12161e; }
.fp-filter-reset {
  height: 30px;
  padding: 0 13px;
  border-radius: 8px;
  border: 1px solid var(--hairline);
  background: transparent;
  color: var(--dim);
  font-size: 11px;
  font-family: inherit;
  cursor: pointer;
  align-self: flex-end;
  transition: all 0.18s ease;
  white-space: nowrap;
}
.fp-filter-reset:hover {
  border-color: var(--danger);
  color: var(--danger);
}

/* ============================================
   FLOORPLAN PANEL — Full table
   ============================================ */
.fp-table-wrap {
  overflow-x: auto;
  max-height: 340px;
  overflow-y: auto;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  scrollbar-width: thin;
  scrollbar-color: var(--hairline-strong) transparent;
}
.fp-table-wrap::-webkit-scrollbar { width: 4px; height: 4px; }
.fp-table-wrap::-webkit-scrollbar-thumb { background: var(--hairline-strong); border-radius: 2px; }

.fp-full-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  min-width: 680px;
}
.fp-full-table thead {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #10141c;
}
.fp-full-table thead th {
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
  font-weight: 600;
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--hairline);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: color 0.18s;
}
.fp-full-table thead th:hover { color: var(--accent); }
.fp-full-table thead th.sort-asc .sort-icon::after  { content: " ▲"; }
.fp-full-table thead th.sort-desc .sort-icon::after { content: " ▼"; }
.sort-icon { opacity: 0.4; font-size: 9px; }

.fp-full-table tbody td {
  padding: 12px 12px;
  border-bottom: 1px solid var(--hairline);
  vertical-align: middle;
}
.fp-full-table tbody tr:last-child td { border-bottom: none; }
.fp-full-table tbody tr:hover { background: rgba(232,192,137,0.04); }
.fp-full-table tbody tr.row-sold {
  opacity: 0.45;
  pointer-events: none;
}
.fp-full-table tbody tr.row-sold td { color: var(--dim); }

.fp-code { font-family: var(--font-mono); font-size: 11px; color: var(--accent); }
.fp-price { font-weight: 600; color: var(--accent); }
.fp-ppm2  { font-size: 11px; color: var(--dim); font-family: var(--font-mono); }
.fp-avail { font-family: var(--font-mono); font-size: 12px; }

/* Status badges */
.fp-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.fp-badge.available { background: rgba(122,215,154,0.15); color: var(--ok); border: 1px solid rgba(122,215,154,0.3); }
.fp-badge.holding   { background: rgba(232,192,137,0.15); color: var(--accent); border: 1px solid rgba(232,192,137,0.3); }
.fp-badge.sold      { background: rgba(255,107,107,0.12); color: var(--danger); border: 1px solid rgba(255,107,107,0.3); }
.fp-badge::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

/* "Quan tâm" button */
.fp-interest-btn {
  height: 28px;
  padding: 0 12px;
  border-radius: 7px;
  border: 1px solid var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}
.fp-interest-btn:hover {
  background: var(--accent);
  color: var(--bg);
}

/* Empty state */
.fp-empty-row td {
  text-align: center;
  padding: 32px;
  color: var(--dim);
  font-size: 12px;
}

/* Modal responsive */
@media (max-width: 820px) {
  .fp-filter-bar { gap: 8px; }
  .fp-table-wrap { max-height: 240px; }
}
/* ============================================
   BOTTOM CENTER — Scene indicator + dock
   ============================================ */
.scene-indicator {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 18;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  max-width: calc(100vw - 220px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.si-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  background: var(--panel-solid);
  backdrop-filter: blur(20px);
  border: 1px solid var(--hairline);
  border-radius: 100px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}
.si-pill .si-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(232,192,137,0.6);
}
.si-pill strong { color: var(--fg); font-weight: 600; }

.scene-dock {
  background: var(--panel);
  backdrop-filter: blur(24px);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  padding: 6px;
  display: flex;
  gap: 6px;
  max-width: 100%;
  overflow-x: auto;
}
.scene-dock::-webkit-scrollbar { display: none; }

.scene-thumb {
  position: relative;
  flex-shrink: 0;
  width: 96px;
  height: 58px;
  border-radius: 9px;
  overflow: hidden;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all 0.25s ease;
}
.scene-thumb canvas {
  display: block;
  width: 100%;
  height: 100%;
}
.scene-thumb .st-info {
  position: absolute;
  inset: 0;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: linear-gradient(to top, rgba(0,0,0,0.85), transparent 60%);
}
.scene-thumb .st-type {
  font-size: 7px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1px;
}
.scene-thumb .st-title {
  font-size: 10px;
  font-weight: 500;
  line-height: 1.2;
}
.scene-thumb:hover {
  border-color: var(--hairline-strong);
  transform: translateY(-2px);
}
.scene-thumb.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(232, 192, 137, 0.22);
}

/* ============================================
   COMPASS / MINIMAP
   ============================================ */
.compass {
  position: absolute;
  bottom: 22px;
  right: 22px;
  z-index: 18;
  width: 60px;
  height: 60px;
  transition: opacity 0.35s ease, transform 0.35s ease;
  border-radius: 50%;
  background: var(--panel);
  backdrop-filter: blur(20px);
  border: 1px solid var(--hairline);
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--muted);
  text-transform: uppercase;
}
.compass-inner {
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  border: 1px dashed var(--hairline-strong);
}
.compass-n, .compass-s, .compass-e, .compass-w {
  position: absolute;
  font-weight: 600;
}
.compass-n { top: 6px; left: 50%; transform: translateX(-50%); color: var(--accent); }
.compass-s { bottom: 6px; left: 50%; transform: translateX(-50%); }
.compass-e { right: 8px; top: 50%; transform: translateY(-50%); }
.compass-w { left: 8px; top: 50%; transform: translateY(-50%); }
.compass-needle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2px;
  height: 22px;
  transform-origin: 50% 100%;
  transform: translate(-50%, -100%);
}
.compass-needle::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 14px solid var(--accent);
}

/* ============================================
   CONTROL BAR (zoom, fullscreen, autorotate)
   ============================================ */
/* .controls block kept for backward-compat (orphan, no element uses it) */
.controls { display: none; }
.ctrl-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--panel);
  backdrop-filter: blur(20px);
  border: 1px solid var(--hairline);
  display: grid;
  place-items: center;
  transition: all 0.2s ease;
  color: var(--fg);
}
.ctrl-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.ctrl-btn.active {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

/* ============================================
   MODAL — full project details
   ============================================ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(10px);
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 32px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}
.modal {
    width: 100%;
    max-width: 1300px;
    max-height: calc(-64px + 100vh);
    background: rgb(14, 18, 24);
    border: 1px solid var(--hairline);
    border-radius: var(--r-lg);
    overflow: hidden;
    display: grid;
    grid-template-columns: 1.9fr 0.7fr;
    /* 1 hàng cao đúng bằng modal — để 2 cột cuộn nội bộ thay vì tràn */
    grid-template-rows: 100%;
    transform: translateY(20px);
    transition: transform 0.3s;
}
.modal-backdrop.open .modal { transform: translateY(0); }

.modal-left {
  padding: 24px 24px 24px;
  border-right: 1px solid var(--hairline);
  min-height: 0;
  overflow-y: auto;
}
.modal-left .ml-eyebrow {
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.modal-left h2 {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 500;
  line-height: 1.1;
  margin-bottom: 16px;
}
.modal-left .ml-desc {
  color: var(--muted);
  margin-bottom: 24px;
  font-size: 14px;
  line-height: 1.6;
}

.unit-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
  font-size: 13px;
}
.unit-table thead th {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
  text-align: left;
  font-weight: 500;
  padding: 10px 12px;
  border-bottom: 1px solid var(--hairline);
}
.unit-table tbody td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--hairline);
}
.unit-table tbody tr:hover { background: rgba(232, 192, 137, 0.04); }
.unit-table .price { color: var(--accent); font-weight: 500; }
.unit-table .avail { color: var(--ok); font-family: var(--font-mono); font-size: 12px; }

.modal-right {
  padding: 36px 36px 32px;
  background: #0c0f14;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(245,241,232,0.16) transparent;
}
.modal-right::-webkit-scrollbar { width: 6px; }
.modal-right::-webkit-scrollbar-track { background: transparent; }
.modal-right::-webkit-scrollbar-thumb {
  background: rgba(245,241,232,0.16);
  border-radius: 4px;
}
.modal-right::-webkit-scrollbar-thumb:hover {
  background: rgba(245,241,232,0.28);
}
.modal-right h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  margin-bottom: 18px;
}
.form-grid {
  display: grid;
  gap: 14px;
}
.form-grid label {
  display: block;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 6px;
}
.form-grid input, .form-grid select, .form-grid textarea {
  width: 100%;
  padding: 11px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--hairline);
  border-radius: var(--r-sm);
  color: var(--fg);
  font-family: inherit;
  font-size: 13px;
  transition: border-color 0.2s;
}
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.form-grid textarea { resize: vertical; min-height: 70px; }

.timeline {
  margin-top: auto;
  padding-top: 24px;
  border-top: 1px solid var(--hairline);
}
.tl-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  font-size: 12px;
}
.tl-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid var(--dim);
}
.tl-row.done .tl-dot { background: var(--accent); border-color: var(--accent); }
.tl-row .tl-phase { flex: 1; }
.tl-row .tl-date { color: var(--muted); font-family: var(--font-mono); font-size: 11px; }

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--hairline);
  display: grid;
  place-items: center;
  background: rgba(0,0,0,0.4);
}
.modal-close:hover { color: var(--accent); border-color: var(--accent); }

/* ============================================
   AMENITIES OVERLAY (toggle from nav)
   ============================================ */
.amenities-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(8,10,14,0.85);
  backdrop-filter: blur(16px);
  padding: 80px 48px 48px;
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.amenities-overlay.open { opacity: 1; pointer-events: auto; }
.amen-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.amen-tile {
  aspect-ratio: 1 / 1;
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 18px;
  text-align: center;
  background: rgba(255,255,255,0.02);
  transition: all 0.25s ease;
}
.amen-tile:hover {
  border-color: var(--accent);
  background: rgba(232,192,137,0.06);
  transform: translateY(-2px);
}
.amen-tile .icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  display: grid;
  place-items: center;
  color: var(--accent);
}
.amen-tile .label {
  font-size: 13px;
  color: var(--fg);
}

/* ============================================
   LOADER
   ============================================ */
.loader {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--bg);
  display: grid;
  place-items: center;
  transition: opacity 0.6s ease;
}
.loader.hidden { opacity: 0; pointer-events: none; }
.loader-inner {
  text-align: center;
}
.loader-mark { display: none; }
.loader-logo {
  height: 80px;
  width: auto;
  object-fit: contain;
  margin: 0 auto 22px;
  display: block;
  animation: loader-pulse 2s ease-in-out infinite;
}
@keyframes loader-pulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}
@keyframes rotate {
  to { transform: rotate(360deg); }
}
.loader-text {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}
.loader-bar {
  width: 200px;
  height: 1px;
  background: var(--hairline);
  margin: 18px auto 0;
  position: relative;
  overflow: hidden;
}
.loader-bar::after {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background: var(--accent);
  transform: translateX(-100%);
  animation: loader-slide 1.6s ease-in-out infinite;
}
@keyframes loader-slide {
  50% { transform: translateX(0); }
  100% { transform: translateX(100%); }
}
.loader-sub {
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ============================================
   HOTSPOT POPUP
   ============================================ */
.hotspot-popup {
  position: fixed;
  z-index: 25;
  max-width: 280px;
  background: var(--panel-solid);
  border: 1px solid var(--accent);
  border-radius: var(--r-md);
  padding: 16px 18px;
  transform: translate(-50%, -100%) translateY(-20px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.hotspot-popup.open { opacity: 1; pointer-events: auto; }
.hotspot-popup h4 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--accent);
}
.hotspot-popup p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.55;
}
.hotspot-popup .close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  font-size: 14px;
  color: var(--muted);
}
.hotspot-popup .close:hover { color: var(--accent); }

/* ============================================
   TWEAKS PANEL hint
   ============================================ */
.tip {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 12;
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--dim);
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: none;
  animation: tip-fade 6s ease-in-out forwards;
}
.tip::before, .tip::after {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--dim);
}
@keyframes tip-fade {
  0%, 50% { opacity: 1; }
  100% { opacity: 0; }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1100px) {
  .nav-panel { width: 290px; left: 12px; }
  .np-title { font-size: 18px; }
  .project-card { width: 270px; right: 12px; }
  .top-bar { padding: 12px 16px; }
}
@media (max-width: 820px) {
  .brand-text .sub { display: none; }
  .nav-panel {
    top: 60px;
    left: 8px;
    right: 8px;
    width: auto;
    max-height: 50vh;
    bottom: auto;
  }
  .project-card { display: none; }
  .np-title { font-size: 17px; }
  .ui-restore { top: 12px; right: 14px; width: 34px; height: 34px; }
  /* Mobile: 1 cột, 2 hàng tự co — modal cuộn toàn bộ thay vì từng cột */
  .modal {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    max-height: 90vh;
    overflow-y: auto;
  }
  .modal-left, .modal-right { overflow-y: visible; min-height: auto; }
  .modal-right { border-top: 1px solid var(--hairline); }
  .amen-grid { grid-template-columns: repeat(2, 1fr); }
  #tour-tip { width: calc(100vw - 32px); max-width: 320px; }
}

/* ============================================
   SITE MAP OVERLAY (2D top-down)
   ============================================ */
.gallery-overlay {
  position: fixed;
  inset: 0;
  z-index: 95;
  background: rgba(6,8,12,0.86);
  backdrop-filter: blur(14px);
  display: grid;
  place-items: center;
  padding: 40px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}
.gallery-overlay.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.3s ease, visibility 0s linear 0s;
}

.gal-frame {
  width: 100%;
  max-width: 1200px;
  max-height: calc(100vh - 80px);
  background: rgba(14,18,24,0.92);
  border: 1px solid var(--hairline);
  border-radius: 18px;
  padding: 26px 30px 30px;
  overflow-y: auto;
  position: relative;
  scrollbar-width: thin;
  scrollbar-color: rgba(245,241,232,0.16) transparent;
}
.gal-frame::-webkit-scrollbar { width: 6px; }
.gal-frame::-webkit-scrollbar-track { background: transparent; }
.gal-frame::-webkit-scrollbar-thumb {
  background: rgba(245,241,232,0.16);
  border-radius: 4px;
}
.gal-frame::-webkit-scrollbar-thumb:hover {
  background: rgba(245,241,232,0.28);
}
.gal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--hairline);
  background: rgba(0,0,0,0.4);
  color: var(--fg);
  font-size: 18px;
  display: grid;
  place-items: center;
  z-index: 2;
}
.gal-close:hover { color: var(--accent); border-color: var(--accent); }

.gal-head {
  margin-bottom: 18px;
  max-width: 640px;
}
.gal-head h2 {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 500;
  margin-bottom: 6px;
  line-height: 1.1;
}
/* ============================================
   GALLERY OVERLAY
   ============================================ */
.gal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.gal-item {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--hairline);
  transition: all 0.25s ease;
}
.gal-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.gal-item:hover { border-color: var(--accent); transform: translateY(-3px); }
.gal-item:hover img { transform: scale(1.05); }
.gal-cap {
  position: absolute;
  inset: auto 0 0 0;
  padding: 28px 14px 12px;
  background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
@media (max-width: 820px) {
  .gal-grid { grid-template-columns: repeat(2, 1fr); }
  .gal-frame { padding: 18px 16px 20px; }
  .gal-head h2 { font-size: 22px; }
  .gallery-overlay { padding: 20px; }
}

/* ============================================
   LIGHTBOX
   ============================================ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: rgba(0,0,0,0.92);
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.lightbox.open { opacity: 1; pointer-events: auto; }
.lb-figure {
  max-width: 90vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.lb-figure img {
  max-width: 100%;
  max-height: 82vh;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.lb-figure figcaption {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.02em;
}
.lb-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-size: 22px;
  display: grid;
  place-items: center;
  transition: all 0.2s;
}
.lb-close:hover { background: rgba(255,255,255,0.18); }
.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-size: 30px;
  display: grid;
  place-items: center;
  transition: all 0.2s;
}
.lb-nav:hover { background: rgba(255,255,255,0.18); }
.lb-prev { left: 24px; }
.lb-next { right: 24px; }

/* ============================================
   BOTCHAT — float trigger button (BOTCHAT_SPEC §5.1)
   ============================================ */
.bb-float {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 60;
  width: var(--bb-h);
  height: var(--bb-h);
  border-radius: 50%;
  border: 2px solid var(--ai-neon);
  background: #fff;
  padding: 0;
  overflow: visible;
  box-shadow: 0 6px 22px rgba(0,0,0,0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}
.bb-float:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.35);
}
.bb-float img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.bb-mic-indicator {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--ai-neon);
  border: 2.5px solid #fff;
  display: grid;
  place-items: center;
  color: #fff;
}
body.ai-voice-active .bb-mic-indicator {
  animation: bbMicPulse 1.2s ease-in-out infinite;
  box-shadow: 0 0 0 0 var(--ai-neon-soft), 0 0 12px var(--ai-neon);
}
@keyframes bbMicPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}
body.ai-panel-open .bb-float { opacity: 0.95; }

/* ============================================
   BOTCHAT — Panel (BOTCHAT_SPEC §5.2)
   ============================================ */
#ai-panel {
  position: fixed;
  right: var(--bb-edge-right, 20px);
  bottom: calc(var(--bb-h) + 28px);
  z-index: 65;
  width: 360px;
  max-width: calc(100vw - 32px);
  max-height: 70vh;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 14px 36px rgba(0,0,0,0.22);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px) scale(0.96);
  transition: opacity 0.22s ease, transform 0.22s ease, width 0.3s ease, height 0.3s ease, border-radius 0.3s ease, right 0.3s ease, bottom 0.3s ease;
}
#ai-panel.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.ai-pn-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #eef0f2;
  background: #fff;
  flex-shrink: 0;
}
.ai-pn-orb {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.ai-pn-orb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ai-pn-h { flex: 1; min-width: 0; }
.ai-pn-title {
  font-size: 14px;
  font-weight: 800;
  color: #1a1a1a;
  line-height: 1.2;
  font-family: var(--font-sans);
}
.ai-pn-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  font-size: 11.5px;
  color: #16a35a;
}
.ai-pn-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ai-neon);
  animation: aiPnStatusPulse 1.6s ease-in-out infinite;
}
.ai-pn-x {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f4f6f8;
  color: #6b7280;
  font-size: 14px;
  display: grid;
  place-items: center;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}
.ai-pn-x:hover { background: #e8f6fc; color: var(--icon-blue); }

.ai-pn-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  background: #f7f9fb;
}
.ai-pn-body::-webkit-scrollbar { width: 4px; }
.ai-pn-body::-webkit-scrollbar-thumb { background: #d0d5db; border-radius: 2px; }

.ai-pn-chat {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ai-pn-bubble {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.5;
  max-width: 85%;
  word-wrap: break-word;
  animation: aiBubbleIn 0.25s ease;
}
.ai-pn-bubble.user {
  background: var(--icon-blue);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.ai-pn-bubble.bot {
  background: #fff;
  color: #1a2330;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.ai-pn-composer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px 14px;
  border-top: 1px solid #eef0f2;
  background: #fafbfc;
  flex-shrink: 0;
  position: relative;
}
.ai-pn-input {
  flex: 1;
  height: 36px;
  padding: 0 14px;
  border: 1.5px solid #e4e8ec;
  border-radius: 18px;
  font-size: 13px;
  font-family: var(--font-sans);
  color: #1a2330;
  background: #fff;
  outline: none;
  transition: border-color 0.2s;
}
.ai-pn-input:focus { border-color: var(--icon-blue); }
.ai-pn-mic, .ai-pn-send {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s;
}
.ai-pn-mic {
  background: #fff;
  border: 1.5px solid var(--ai-neon);
  color: var(--ai-neon);
}
.ai-pn-mic:hover { background: var(--ai-neon-soft); }
.ai-pn-send {
  background: var(--icon-blue);
  color: #fff;
}
.ai-pn-send:hover { background: var(--icon-blue-dark); transform: translateY(-1px); }
.ai-pn-send:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.ai-pn-waveform {
  display: none;
  align-items: center;
  gap: 3px;
  height: 100%;
  flex: 1;
  padding: 0 6px;
}
.ai-pn-waveform span {
  display: inline-block;
  width: 3px;
  height: 100%;
  border-radius: 2px;
  background: var(--ai-neon);
  box-shadow: 0 0 6px var(--ai-neon), 0 0 12px var(--ai-neon-strong);
  transform-origin: center;
  animation: aiWaveBar 1s ease-in-out infinite;
}
.ai-pn-waveform span:nth-child(1)  { animation-delay: 0.00s; height: 18%; }
.ai-pn-waveform span:nth-child(2)  { animation-delay: 0.04s; height: 28%; }
.ai-pn-waveform span:nth-child(3)  { animation-delay: 0.08s; height: 38%; }
.ai-pn-waveform span:nth-child(4)  { animation-delay: 0.12s; height: 48%; }
.ai-pn-waveform span:nth-child(5)  { animation-delay: 0.16s; height: 58%; }
.ai-pn-waveform span:nth-child(6)  { animation-delay: 0.20s; height: 68%; }
.ai-pn-waveform span:nth-child(7)  { animation-delay: 0.24s; height: 76%; }
.ai-pn-waveform span:nth-child(8)  { animation-delay: 0.28s; height: 82%; }
.ai-pn-waveform span:nth-child(9)  { animation-delay: 0.32s; height: 86%; }
.ai-pn-waveform span:nth-child(10) { animation-delay: 0.36s; height: 90%; }
.ai-pn-waveform span:nth-child(11) { animation-delay: 0.40s; height: 92%; }
.ai-pn-waveform span:nth-child(12) { animation-delay: 0.44s; height: 94%; }
.ai-pn-waveform span:nth-child(13) { animation-delay: 0.48s; height: 94%; }
.ai-pn-waveform span:nth-child(14) { animation-delay: 0.52s; height: 92%; }
.ai-pn-waveform span:nth-child(15) { animation-delay: 0.56s; height: 90%; }
.ai-pn-waveform span:nth-child(16) { animation-delay: 0.60s; height: 86%; }
.ai-pn-waveform span:nth-child(17) { animation-delay: 0.64s; height: 82%; }
.ai-pn-waveform span:nth-child(18) { animation-delay: 0.68s; height: 76%; }
.ai-pn-waveform span:nth-child(19) { animation-delay: 0.72s; height: 68%; }
.ai-pn-waveform span:nth-child(20) { animation-delay: 0.76s; height: 58%; }
.ai-pn-waveform span:nth-child(21) { animation-delay: 0.80s; height: 48%; }
.ai-pn-waveform span:nth-child(22) { animation-delay: 0.84s; height: 38%; }
.ai-pn-waveform span:nth-child(23) { animation-delay: 0.88s; height: 28%; }
.ai-pn-waveform span:nth-child(24) { animation-delay: 0.92s; height: 18%; }

/* ─── Voice / capsule mode ─── */
#ai-panel.listening,
#ai-panel.thinking,
#ai-panel.speaking {
  width: auto;
  min-width: 270px;
  max-width: 320px;
  height: var(--bb-h);
  max-height: var(--bb-h);
  border-radius: calc(var(--bb-h) / 2);
  bottom: 22px;
  right: calc(var(--bb-edge-right, 20px) + var(--bb-h) + 12px);
  padding: 0;
}
#ai-panel.listening .ai-pn-head,
#ai-panel.thinking .ai-pn-head,
#ai-panel.speaking .ai-pn-head,
#ai-panel.listening .ai-pn-body,
#ai-panel.thinking .ai-pn-body,
#ai-panel.speaking .ai-pn-body,
#ai-panel.listening .ai-pn-input,
#ai-panel.thinking .ai-pn-input,
#ai-panel.speaking .ai-pn-input,
#ai-panel.listening .ai-pn-send,
#ai-panel.thinking .ai-pn-send,
#ai-panel.speaking .ai-pn-send { display: none; }

#ai-panel.listening .ai-pn-composer,
#ai-panel.thinking .ai-pn-composer,
#ai-panel.speaking .ai-pn-composer {
  border-top: none;
  background: #fff;
  height: 100%;
  padding: 0 14px;
  border-radius: calc(var(--bb-h) / 2);
}
#ai-panel.listening .ai-pn-mic,
#ai-panel.thinking .ai-pn-mic,
#ai-panel.speaking .ai-pn-mic {
  width: 44px;
  height: 44px;
  background: var(--ai-neon-soft);
  color: var(--ai-neon);
  animation: aiMicPulseSmall 1.4s ease-in-out infinite;
}
#ai-panel.listening .ai-pn-waveform,
#ai-panel.thinking .ai-pn-waveform,
#ai-panel.speaking .ai-pn-waveform { display: flex; }

/* state colors */
#ai-panel.thinking .ai-pn-mic { color: #f0a020; background: rgba(240,160,32,0.16); }
#ai-panel.speaking .ai-pn-mic { color: var(--icon-blue); background: rgba(43,182,230,0.16); }

@media (max-width: 768px) {
  #ai-panel { width: calc(100vw - 32px); right: 16px; }
  #ai-panel.listening,
  #ai-panel.thinking,
  #ai-panel.speaking {
    min-width: 200px;
    right: calc(16px + var(--bb-h) + 10px);
  }
  #ai-panel.listening .ai-pn-mic,
  #ai-panel.thinking .ai-pn-mic,
  #ai-panel.speaking .ai-pn-mic { width: 40px; height: 40px; }
  .bb-float { right: 16px; bottom: 16px; width: 52px; height: 52px; }
  /* Khi sub-dock hiện ở mobile, nâng nút botchat lên trên dock để không che */
  body.sub-dock-visible .bb-float {
    bottom: calc(16px + 80px + 10px); /* ~ dock height (label + buttons + padding) */
  }
  body.sub-dock-visible #ai-panel.listening,
  body.sub-dock-visible #ai-panel.thinking,
  body.sub-dock-visible #ai-panel.speaking {
    bottom: calc(16px + 80px + 10px);
  }
}

/* ─── Keyframes ─── */
@keyframes aiBubbleIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes aiPnStatusPulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(22,212,114,0.22); }
  50% { box-shadow: 0 0 0 5px rgba(22,212,114,0.10); }
}
@keyframes aiMicPulseSmall {
  0%, 100% { box-shadow: 0 0 0 3px var(--ai-neon-soft), 0 0 14px var(--ai-neon); }
  50% { box-shadow: 0 0 0 7px rgba(22,212,114,0.10), 0 0 22px var(--ai-neon); }
}
@keyframes aiWaveBar {
  0%, 100% { transform: scaleY(0.3); }
  50% { transform: scaleY(1); }
}

/* ============================================
   HELP TOUR (HELPTOUR_SPEC §7)
   ============================================ */
#tour-overlay {
  position: fixed;
  inset: 0;
  z-index: 4500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  cursor: pointer;
}
#tour-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

#tour-spot {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  border-radius: 14px;
  box-shadow:
    0 0 0 9999px rgba(0,0,0,0.72),
    0 0 0 3px var(--accent),
    0 0 24px rgba(232,192,137,0.6);
  transition:
    left 0.35s cubic-bezier(0.4,0,0.2,1),
    top 0.35s cubic-bezier(0.4,0,0.2,1),
    width 0.35s cubic-bezier(0.4,0,0.2,1),
    height 0.35s cubic-bezier(0.4,0,0.2,1),
    border-radius 0.25s ease;
  pointer-events: none;
}
#tour-spot.round { border-radius: 50%; }

#tour-tip {
  position: absolute;
  background: #fff;
  border-radius: 12px;
  padding: 14px 18px 14px;
  width: 280px;
  box-shadow: 0 10px 32px rgba(0,0,0,0.35);
  pointer-events: auto;
  transition:
    left 0.35s cubic-bezier(0.4,0,0.2,1),
    top 0.35s cubic-bezier(0.4,0,0.2,1);
  color: #1a1a1a;
}
.tt-step {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--icon-blue);
  text-transform: uppercase;
  margin-bottom: 4px;
}
.tt-label {
  font-size: 14px;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.4;
  margin-bottom: 8px;
}
.tt-hint {
  font-size: 11.5px;
  color: #888;
  font-style: italic;
}
#tour-skip {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #f1f3f5;
  border: none;
  color: #666;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.14s, color 0.14s;
}
#tour-skip:hover {
  background: #e74c3c;
  color: #fff;
}

.tt-arrow {
  position: absolute;
  width: 14px;
  height: 14px;
  background: #fff;
  transform: rotate(45deg);
}
#tour-tip.arrow-up    .tt-arrow { top: -6px;    left: var(--arrow-x, 24px); box-shadow: -2px -2px 4px rgba(0,0,0,0.04); }
#tour-tip.arrow-down  .tt-arrow { bottom: -6px; left: var(--arrow-x, 24px); box-shadow:  2px  2px 4px rgba(0,0,0,0.04); }
#tour-tip.arrow-left  .tt-arrow { left: -6px;   top:  var(--arrow-y, 20px); box-shadow: -2px  2px 4px rgba(0,0,0,0.04); }
#tour-tip.arrow-right .tt-arrow { right: -6px;  top:  var(--arrow-y, 20px); box-shadow:  2px -2px 4px rgba(0,0,0,0.04); }

#tour-overlay:not(.open) #tour-tip,
#tour-overlay:not(.open) #tour-spot {
  pointer-events: none !important;
  visibility: hidden;
}

/* ============================================
   LANGUAGE SWITCHER (inside .tb-ctrlgroup)
   ============================================ */
.ctrl-lang-wrap {
  position: relative;
  display: inline-flex;
}
.tb-ctrlgroup #ctrl-lang {
  width: auto;
  min-width: 30px;
  padding: 0 8px;
  gap: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ctrl-lang-code {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: inherit;
}
.ctrl-lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  background: var(--panel, rgba(20,18,15,0.92));
  backdrop-filter: blur(20px);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  padding: 6px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.35);
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 200;
}
.ctrl-lang-menu.open { display: flex; }
.ctrl-lang-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--fg);
  cursor: pointer;
  font-size: 12px;
  text-align: left;
  width: 100%;
  transition: all 0.15s ease;
}
.ctrl-lang-item:hover {
  background: rgba(245,241,232,0.06);
  border-color: var(--hairline);
}
.ctrl-lang-item.active {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}
.ctrl-lang-item.active .cli-code { opacity: 0.85; }
.cli-flag { font-size: 16px; line-height: 1; }
.cli-label { flex: 1; }
.cli-code {
  font-size: 10px;
  letter-spacing: 0.08em;
  font-weight: 600;
  opacity: 0.6;
}
@media (max-width: 720px) {
  .ctrl-lang-menu { right: -40px; }
}

/* ============================================
   FORM TƯ VẤN MỞ RỘNG
   ============================================ */

/* 2-column row */
.form-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 480px) {
  .form-row-2col { grid-template-columns: 1fr; }
}

/* Required / optional labels */
.req { color: var(--danger); font-size: 11px; }
.opt { color: var(--dim); font-size: 10px; font-weight: 400; letter-spacing: 0; text-transform: none; }

/* Choice button group (single-select pills) */
.cf-btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}
.cf-choice-btn {
  height: 30px;
  padding: 0 13px;
  border-radius: 15px;
  border: 1px solid var(--hairline-strong);
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.16s ease;
  white-space: nowrap;
}
.cf-choice-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.cf-choice-btn.selected {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}

/* Mã căn tags */
.cf-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
  min-height: 32px;
  padding: 4px 6px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: rgba(255,255,255,0.03);
}
.cf-unit-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: 13px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--accent);
  font-weight: 600;
}
.cf-unit-tag button {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(232,192,137,0.3);
  color: var(--accent);
  font-size: 12px;
  line-height: 1;
  display: grid;
  place-items: center;
  padding: 0;
  transition: background 0.15s;
}
.cf-unit-tag button:hover {
  background: var(--accent);
  color: var(--bg);
}

/* Consent row */
.cf-consent-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.cf-consent-row input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}
.cf-consent-label {
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 400;
}

/* Validation error */
.cf-error {
  padding: 8px 12px;
  background: rgba(255,107,107,0.12);
  border: 1px solid rgba(255,107,107,0.3);
  border-radius: 7px;
  color: var(--danger);
  font-size: 12px;
  line-height: 1.5;
}

/* Submit button full-width */
.cf-submit-btn {
  width: 100%;
  justify-content: center;
  height: 42px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.cf-submit-btn.loading {
  opacity: 0.7;
  pointer-events: none;
}
.cf-submit-btn.loading::after {
  content: " …";
}

/* ── Success state ── */
.form-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
  padding: 28px 16px;
  flex: 1;
}
.form-success-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(122,215,154,0.15);
  border: 1.5px solid var(--ok);
  color: var(--ok);
  display: grid;
  place-items: center;
  margin-bottom: 4px;
}
.form-success-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  color: var(--fg);
}
.form-success-sub {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
  max-width: 260px;
}
.form-success-actions {
  display: flex;
  gap: 8px;
  margin-top: 6px;
  flex-wrap: wrap;
  justify-content: center;
}
.form-suc-btn {
  height: 36px;
  padding: 0 16px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 600;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  transition: all 0.18s ease;
  text-decoration: none;
}
.form-suc-primary {
  background: #0068ff;
  color: #fff;
  border: none;
}
.form-suc-primary:hover { background: #005ae0; }
.form-suc-secondary {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--hairline-strong);
}
.form-suc-secondary:hover { color: var(--accent); border-color: var(--accent); }
/* ============================================
   ADVANCED OVERLAY — shared frame (Bước 4/5/6)
   ============================================ */
.adv-overlay {
  position: fixed;
  inset: 0;
  z-index: 95;
  background: rgba(6,8,12,0.88);
  backdrop-filter: blur(16px);
  display: grid;
  place-items: center;
  padding: 40px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}
.adv-overlay.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.3s ease, visibility 0s linear 0s;
}
.adv-frame {
  width: 100%;
  max-width: 1060px;
  max-height: calc(100vh - 80px);
  background: rgba(14,18,24,0.95);
  border: 1px solid var(--hairline);
  border-radius: 18px;
  padding: 28px 32px 32px;
  overflow-y: auto;
  position: relative;
  scrollbar-width: thin;
  scrollbar-color: var(--hairline-strong) transparent;
}
.adv-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--hairline);
  background: rgba(0,0,0,0.4);
  color: var(--fg);
  font-size: 18px;
  display: grid;
  place-items: center;
  z-index: 2;
  cursor: pointer;
}
.adv-close:hover { color: var(--accent); border-color: var(--accent); }
.adv-head {
  margin-bottom: 20px;
}
.adv-eyebrow {
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.adv-head h2 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  line-height: 1.1;
}

/* ============================================
   AMENITIES DETAIL (Bước 4)
   ============================================ */
.adv-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.adv-tab {
  height: 34px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid var(--hairline-strong);
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.18s ease;
}
.adv-tab:hover { border-color: var(--accent); color: var(--accent); }
.adv-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}
.adv-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.adv-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  background: rgba(245,241,232,0.03);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  transition: all 0.22s ease;
}
.adv-item:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-2px);
}
.adv-item-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  display: grid;
  place-items: center;
  color: var(--accent);
  flex-shrink: 0;
}
.adv-item-name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--fg);
}
.adv-item-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}
@media (max-width: 820px) {
  .adv-grid { grid-template-columns: repeat(2, 1fr); }
  .adv-frame { padding: 18px 16px 20px; }
  .adv-overlay { padding: 20px; }
}
@media (max-width: 480px) {
  .adv-grid { grid-template-columns: 1fr; }
}

/* ============================================
   LEGAL / TRUST PANEL (Bước 5)
   ============================================ */
.legal-frame { max-width: 900px; }
.legal-content { display: flex; flex-direction: column; gap: 28px; }
.legal-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.legal-stat {
  background: rgba(245,241,232,0.03);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 18px 16px;
  text-align: center;
}
.legal-stat-v {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 500;
  color: var(--accent);
  line-height: 1;
}
.legal-stat-u {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--muted);
  margin-left: 3px;
}
.legal-stat-k {
  font-size: 11px;
  color: var(--dim);
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.legal-section-title {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.legal-section-title::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--accent);
}
.legal-checklist {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.legal-check-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--hairline);
  background: rgba(245,241,232,0.02);
}
.legal-check-row.done { border-color: rgba(122,215,154,0.3); background: rgba(122,215,154,0.05); }
.legal-check-row.pending { border-color: rgba(232,192,137,0.3); background: rgba(232,192,137,0.05); }
.legal-check-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.legal-check-row.done .legal-check-icon { color: var(--ok); }
.legal-check-row.pending .legal-check-icon { color: var(--accent); }
.legal-check-name { font-size: 13px; font-weight: 600; margin-bottom: 2px; color: var(--fg); }
.legal-check-detail { font-size: 11px; color: var(--muted); }

.legal-testi {
  background: rgba(245,241,232,0.03);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 20px;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  gap: 16px;
}
.lt-avatar {
  grid-row: 1 / 2;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg);
  font-size: 13px;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.lt-body { grid-column: 2; }
.lt-quote {
  font-size: 14px;
  color: var(--fg);
  line-height: 1.6;
  font-style: italic;
  margin-bottom: 10px;
}
.lt-meta { font-size: 11.5px; color: var(--muted); }
.lt-nav {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  padding-top: 8px;
  border-top: 1px solid var(--hairline);
}
.lt-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--hairline-strong);
  background: transparent;
  color: var(--fg);
  font-size: 18px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.18s;
}
.lt-btn:hover { border-color: var(--accent); color: var(--accent); }
.lt-dots { display: flex; gap: 6px; align-items: center; }
.lt-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--hairline-strong); transition: all 0.18s; }
.lt-dot.active { background: var(--accent); width: 18px; border-radius: 3px; }

@media (max-width: 820px) {
  .legal-stats { grid-template-columns: repeat(2, 1fr); }
  .legal-checklist { grid-template-columns: 1fr; }
}

/* ============================================
   LOCATION PANEL (Bước 6)
   ============================================ */
.location-frame { max-width: 1100px; }
.location-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}
.loc-cat-btn {
  height: 32px;
  padding: 0 14px;
  border-radius: 16px;
  border: 1px solid var(--hairline-strong);
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.16s ease;
}
.loc-cat-btn:hover { border-color: var(--accent); color: var(--accent); }
.loc-cat-btn.active { background: var(--accent); border-color: var(--accent); color: var(--bg); }

.location-split {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 16px;
  height: 420px;
}
.location-map {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--hairline);
  background: rgba(245,241,232,0.04);
}
.location-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--hairline-strong) transparent;
  padding-right: 2px;
}
.location-list::-webkit-scrollbar { width: 4px; }
.location-list::-webkit-scrollbar-thumb { background: var(--hairline-strong); border-radius: 2px; }

.loc-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--hairline);
  background: rgba(245,241,232,0.03);
  transition: all 0.18s ease;
  cursor: default;
}
.loc-item:hover { border-color: var(--accent); background: var(--accent-soft); }
.loc-item-icon {
  font-size: 20px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: rgba(245,241,232,0.06);
  border-radius: 8px;
  flex-shrink: 0;
}
.loc-item-name { font-size: 13px; font-weight: 500; color: var(--fg); margin-bottom: 2px; }
.loc-item-meta { font-size: 11px; color: var(--muted); font-family: var(--font-mono); }

@media (max-width: 820px) {
  .location-split { grid-template-columns: 1fr; height: auto; }
  .location-map { height: 260px; }
  .location-list { max-height: 260px; }
}

/* ============================================
   TIMELINE PANEL
   ============================================ */
.timeline-frame { max-width: 780px; }

/* Overview progress bar */
.tlo-bar-wrap {
  height: 6px;
  background: var(--hairline-strong);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 10px;
}
.tlo-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--ok) 0%, var(--accent) 100%);
  border-radius: 3px;
  transition: width 0.8s cubic-bezier(.4,0,.2,1);
}
.tlo-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.tlo-pct { font-family: var(--font-mono); font-weight: 700; color: var(--accent); font-size: 13px; }
.tlo-count { font-family: var(--font-mono); }
.tlo-active-badge {
  margin-left: auto;
  color: var(--ok);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  animation: pulse 2s ease-in-out infinite;
}

/* Track */
.tl-track { display: flex; flex-direction: column; }
.tl-item {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 0 16px;
  min-height: 72px;
}

/* Spine (node + line) */
.tl-spine {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.tl-node {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  z-index: 1;
}
.tl-item.done     .tl-node { background: var(--ok);    color: #fff; border: 2px solid var(--ok); }
.tl-item.active   .tl-node { background: var(--accent); border: 2px solid var(--accent); box-shadow: 0 0 14px rgba(232,192,137,0.5); }
.tl-item.upcoming .tl-node { background: var(--bg);    border: 2px solid var(--hairline-strong); }

.tl-node-pulse {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
  animation: pulse 1.5s ease-in-out infinite;
}
.tl-node-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--hairline-strong);
}

.tl-line {
  flex: 1;
  width: 2px;
  background: var(--hairline-strong);
  margin: 2px 0;
}
.tl-item.done .tl-line { background: var(--ok); opacity: 0.5; }
.tl-item.active .tl-line { background: linear-gradient(to bottom, var(--accent), var(--hairline-strong)); }

/* Card */
.tl-card {
  padding: 0 0 24px;
}
.tl-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
  padding-top: 5px;
}
.tl-card-date {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--dim);
  letter-spacing: 0.06em;
}
.tl-badge {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 10px;
}
.tl-badge.done     { background: rgba(122,215,154,0.15); color: var(--ok);    border: 1px solid rgba(122,215,154,0.3); }
.tl-badge.active   { background: var(--accent-soft);    color: var(--accent); border: 1px solid rgba(232,192,137,0.4); }
.tl-badge.upcoming { background: rgba(245,241,232,0.04); color: var(--dim);  border: 1px solid var(--hairline); }

.tl-card-phase {
  font-size: 16px;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 5px;
  line-height: 1.2;
}
.tl-item.upcoming .tl-card-phase { color: var(--muted); }
.tl-card-desc {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.6;
  max-width: 560px;
}

@media (max-width: 600px) {
  .tl-card-phase { font-size: 14px; }
  .tl-card-desc  { font-size: 12px; }
}

/* ============================================
   RESOURCES PANEL
   ============================================ */
.resources-frame { max-width: 920px; }
.res-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px; padding: 0 24px 28px;
}
.res-card {
  display: flex; align-items: center; gap: 14px;
  padding: 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 12px;
  color: inherit; text-decoration: none;
  transition: all .2s;
}
.res-card:hover:not(.res-disabled) {
  border-color: var(--accent, #f4c97d);
  background: rgba(244,201,125,0.06);
  transform: translateY(-2px);
}
.res-disabled { opacity: 0.45; cursor: not-allowed; pointer-events: none; }
.res-icon {
  flex-shrink: 0;
  width: 44px; height: 44px; border-radius: 10px;
  background: rgba(244,201,125,0.12);
  color: var(--accent, #f4c97d);
  display: flex; align-items: center; justify-content: center;
}
.res-body { flex: 1; min-width: 0; }
.res-title { font-size: 14px; color: #fff; font-weight: 600; margin-bottom: 3px; }
.res-sub { font-size: 12px; color: var(--text-muted, #b8c3d6); }
.res-type {
  font-size: 10px; font-weight: 700; letter-spacing: 0.6px;
  background: rgba(255,255,255,0.08);
  color: #fff;
  padding: 3px 7px; border-radius: 4px;
}

/* ============================================================
   PROJECT CARD — Dynamic content (#3 / #7)
   3 chế độ: overview / detail / subdivision
   ============================================================ */
.project-card {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 100px);
}
.pc-dynamic {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}
.pc-dynamic::-webkit-scrollbar { width: 5px; }
.pc-dynamic::-webkit-scrollbar-thumb {
  background: rgba(245,241,232,0.14); border-radius: 4px;
}
.pc-section { padding: 14px 16px 16px; }

.pc-desc {
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0 0 14px;
}
.pc-block-title {
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
  margin: 14px 0 8px;
}
.pc-section > .pc-block-title:first-child { margin-top: 0; }

/* ── Highlights (overview) ── */
.pc-hl-list { display: flex; flex-direction: column; }
.pc-hl-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--hairline);
}
.pc-hl-row:last-child { border-bottom: none; }
.pc-hl-icon {
  flex-shrink: 0;
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: 7px;
  background: var(--accent-soft);
  color: var(--accent);
}
.pc-hl-label {
  flex: 1;
  font-size: 11.5px;
  color: var(--fg);
  line-height: 1.35;
}
.pc-hl-value {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--accent);
  text-align: right;
  flex-shrink: 0;
  max-width: 46%;
}

/* ── Quick links (overview) ── */
.pc-quick-links { display: flex; flex-direction: column; gap: 7px; }
.pc-quick-link {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  background: rgba(245,241,232,0.04);
  color: var(--fg);
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  transition: border-color 0.16s, background 0.16s, color 0.16s;
}
.pc-quick-link:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}
.pc-ql-icon { flex-shrink: 0; display: grid; place-items: center; color: var(--accent); }
.pc-ql-label { flex: 1; text-align: left; }
.pc-ql-arrow { flex-shrink: 0; opacity: 0.5; }
.pc-quick-link:hover .pc-ql-arrow { opacity: 1; }

/* ── Detail mode ── */
.pc-detail-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.pc-detail-icon {
  flex-shrink: 0;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent);
}
.pc-detail-eyebrow {
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 2px;
}
.pc-detail-title, .pc-sub-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 500;
  color: var(--fg);
}
.pc-sub-title { margin-bottom: 12px; }

.pc-tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.pc-tag {
  font-size: 10px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
}
.pc-tag-soft {
  background: rgba(245,241,232,0.06);
  color: var(--muted);
}

/* ── Gallery (detail) ── */
.pc-gallery { margin-bottom: 14px; }
.pc-gallery-main {
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #0f172a;
}
.pc-gallery-main img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pc-gallery-thumbs {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}
.pc-thumb {
  flex: 1;
  border: 1px solid var(--hairline);
  border-radius: 7px;
  overflow: hidden;
  padding: 0;
  cursor: pointer;
  aspect-ratio: 16 / 10;
  background: #0f172a;
  transition: border-color 0.15s;
}
.pc-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pc-thumb.active { border-color: var(--accent); }

/* ── Spec list (detail / subdivision) ── */
.pc-spec-list { display: flex; flex-direction: column; }
.pc-spec-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--hairline);
}
.pc-spec-row:last-child { border-bottom: none; }
.pc-spec-label { font-size: 11.5px; color: var(--muted); }
.pc-spec-value {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--fg);
  text-align: right;
}

/* ── Subdivision mode ── */
.pc-sub-media {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  background-size: cover;
  background-position: center;
  background-color: #0f172a;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
}
.pc-video-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: #fff;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}
.pc-point-list { display: flex; flex-direction: column; gap: 8px; }
.pc-point-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.pc-point-num {
  flex-shrink: 0;
  width: 20px; height: 20px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
}
.pc-point-text {
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--fg);
}
.pc-sub-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}

/* ============================================================
   MASTERPLAN OVERLAY (#4 / #6)
   ============================================================ */
.mp-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #060912;
  display: none;
  flex-direction: column;
}
.mp-overlay.open { display: flex; }

.mp-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(8,12,20,0.92);
  border-bottom: 1px solid var(--hairline);
  z-index: 3;
}
.mp-cats {
  display: flex;
  gap: 6px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}
.mp-cats::-webkit-scrollbar { display: none; }
.mp-cat {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: rgba(245,241,232,0.04);
  color: var(--muted);
  font-family: inherit;
  font-size: 12px;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.16s;
}
.mp-cat:hover { color: var(--accent); border-color: var(--accent); }
.mp-cat.active {
  background: var(--accent);
  color: #0a0d12;
  border-color: var(--accent);
  font-weight: 600;
}
.mp-close {
  flex-shrink: 0;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--hairline);
  background: rgba(245,241,232,0.04);
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.16s;
}
.mp-close:hover { color: #fff; border-color: var(--accent); }

/* ── Stage / bản đồ ── */
.mp-stage {
  position: relative;
  flex: 1;
  overflow: hidden;
  background: #060912;
}
.mp-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.mp-markers { position: absolute; inset: 0; }
.mp-marker {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px 5px 6px;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 999px;
  background: rgba(8,12,20,0.82);
  color: #fff;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: transform 0.15s, border-color 0.15s;
}
.mp-marker:hover { transform: translate(-50%, -50%) scale(1.08); border-color: var(--accent); }
.mp-marker-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  flex-shrink: 0;
}
.mp-marker-phankhu .mp-marker-dot { background: #a78bfa; box-shadow: 0 0 8px #a78bfa; }
.mp-marker-hatang  .mp-marker-dot { background: #60a5fa; box-shadow: 0 0 8px #60a5fa; }
.mp-marker-tienich .mp-marker-dot { background: #34d399; box-shadow: 0 0 8px #34d399; }
.mp-marker-phuchop .mp-marker-dot { background: #f4c97d; box-shadow: 0 0 8px #f4c97d; }

/* ── Tooltip ── */
.mp-tooltip {
  position: absolute;
  transform: translate(-50%, calc(-100% - 18px));
  min-width: 200px;
  max-width: 260px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(12,16,24,0.97);
  border: 1px solid var(--hairline);
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s;
  z-index: 4;
}
.mp-tooltip.visible { opacity: 1; pointer-events: auto; }
.mp-tip-label { font-size: 14px; font-weight: 600; color: #fff; margin-bottom: 3px; }
.mp-tip-desc { font-size: 11.5px; color: var(--muted); line-height: 1.5; margin-bottom: 10px; }
.mp-tip-go {
  width: 100%;
  padding: 8px;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: #0a0d12;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

/* ── Intro panel ── */
.mp-intro {
  position: absolute;
  top: 76px;
  right: 16px;
  width: 280px;
  max-width: 42vw;
  padding: 16px;
  border-radius: 14px;
  background: rgba(12,16,24,0.92);
  border: 1px solid var(--hairline);
  backdrop-filter: blur(16px);
  z-index: 2;
}
.mp-intro-eyebrow {
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 8px;
}
.mp-intro-desc { font-size: 12px; line-height: 1.6; color: var(--muted); margin: 0 0 14px; }
.mp-intro-stats { display: flex; gap: 8px; }
.mp-intro-stat {
  flex: 1;
  padding: 9px;
  border-radius: 9px;
  background: rgba(245,241,232,0.04);
  text-align: center;
}
.mp-intro-val {
  font-family: var(--font-display);
  font-size: 17px;
  color: var(--accent);
  font-weight: 500;
}
.mp-intro-val small { font-size: 9px; color: var(--muted); font-family: var(--font-sans); }
.mp-intro-key {
  font-size: 8px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 2px;
}

/* ── Filter button — nằm trong panel mp-intro ── */
.mp-filter-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 14px;
  padding: 11px 18px;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: #0a0d12;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.mp-filter-btn:hover { background: #f3d29c; }

/* ── Filter panel (ảnh 4) ── */
.mpf-backdrop {
  position: fixed;
  inset: 0;
  z-index: 210;
  background: rgba(0,0,0,0.55);
  display: none;
  align-items: stretch;
  justify-content: flex-end;
}
.mpf-backdrop.open { display: flex; }
.mpf-panel {
  width: 370px;
  max-width: 92vw;
  height: 100%;
  background: #0b0f17;
  border-left: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  animation: mpfSlide 0.28s cubic-bezier(.4,0,.2,1);
}
@keyframes mpfSlide { from { transform: translateX(100%); } to { transform: translateX(0); } }
.mpf-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--hairline);
}
.mpf-head h3 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 500;
  color: #fff;
}
.mpf-close {
  width: 30px; height: 30px;
  border: none;
  border-radius: 8px;
  background: rgba(245,241,232,0.05);
  color: var(--muted);
  font-size: 20px;
  cursor: pointer;
}
.mpf-close:hover { color: #fff; }
.mpf-body { flex: 1; overflow-y: auto; padding: 16px 18px; }
.mpf-group { margin-bottom: 22px; }
.mpf-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.mpf-group-title {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}
.mpf-all {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--muted);
  cursor: pointer;
}
.mpf-opts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.mpf-opt {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 9px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  font-size: 11.5px;
  color: var(--fg);
  cursor: pointer;
  transition: border-color 0.14s;
}
.mpf-opt:hover { border-color: var(--accent); }
.mpf-opt input { accent-color: var(--accent); flex-shrink: 0; }
.mpf-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.mpf-footer {
  display: flex;
  gap: 10px;
  padding: 14px 18px;
  border-top: 1px solid var(--hairline);
}
.mpf-reset, .mpf-apply {
  flex: 1;
  padding: 11px;
  border-radius: 9px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.mpf-reset {
  border: 1px solid var(--hairline);
  background: transparent;
  color: var(--muted);
}
.mpf-reset:hover { color: #fff; border-color: var(--accent); }
.mpf-apply {
  border: none;
  background: var(--accent);
  color: #0a0d12;
}
.mpf-apply:hover { background: #f3d29c; }

@media (max-width: 768px) {
  /* Mobile: ẩn nội dung giới thiệu nhưng giữ panel để chứa nút Lọc */
  .mp-intro {
    width: auto;
    max-width: none;
    padding: 0;
    background: none;
    border: none;
    backdrop-filter: none;
    left: 14px;
    right: 14px;
    top: auto;
    bottom: 14px;
  }
  .mp-intro-eyebrow,
  .mp-intro-desc,
  .mp-intro-stats { display: none; }
  .mp-filter-btn { margin-top: 0; }
  .mp-marker { font-size: 10px; padding: 4px 8px 4px 5px; }
  .mpf-opts { grid-template-columns: 1fr; }
}

/* ============================================================
   BẤT ĐỘNG SẢN — DANH SÁCH (#8)
   ============================================================ */
.props-modal {
  position: relative;
  width: 100%;
  max-width: 1300px;
  height: calc(100vh - 64px);
  max-height: 760px;
  background: #0b0f17;
  border: 1px solid var(--hairline);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.props-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--hairline);
}
.props-eyebrow {
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 4px;
}
.props-head h2 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  color: #fff;
}
.props-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 320px;
  max-width: 42vw;
  padding: 9px 13px;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  background: rgba(245,241,232,0.04);
  color: var(--muted);
}
.props-search input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--fg);
  font-family: inherit;
  font-size: 13px;
}
.props-head-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}
/* Nút Lọc + nút đóng panel + backdrop — chỉ dùng trên mobile */
.props-filter-toggle { display: none; }
.props-filter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.props-filter-close { display: none; }
.props-filter-backdrop { display: none; }
.props-body {
  flex: 1;
  display: flex;
  min-height: 0;
}
.props-grid-wrap {
  flex: 1;
  overflow-y: auto;
  padding: 18px 24px 24px;
  scrollbar-width: thin;
  scrollbar-color: rgba(245,241,232,0.16) transparent;
}
.props-grid-wrap::-webkit-scrollbar { width: 6px; }
.props-grid-wrap::-webkit-scrollbar-track { background: transparent; }
.props-grid-wrap::-webkit-scrollbar-thumb {
  background: rgba(245,241,232,0.16);
  border-radius: 4px;
}
.props-grid-wrap::-webkit-scrollbar-thumb:hover {
  background: rgba(245,241,232,0.28);
}
.props-count {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 14px;
}
.props-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.props-empty {
  grid-column: 1/-1;
  padding: 48px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.prop-card {
  border: 1px solid var(--hairline);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(245,241,232,0.03);
  cursor: pointer;
  transition: border-color 0.16s, transform 0.16s;
}
.prop-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.prop-card-img {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #0f172a;
}
.prop-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.prop-badge {
  position: absolute;
  top: 9px; left: 9px;
  font-size: 10px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  color: #0a0d12;
}
.prop-badge-ok   { background: #34d399; }
.prop-badge-warn { background: #f4c97d; }
.prop-badge-sold { background: #94a3b8; }
.prop-card-body { padding: 12px 13px 14px; }
.prop-card-code {
  font-size: 10px;
  letter-spacing: 0.05em;
  color: var(--dim);
  margin-bottom: 3px;
}
.prop-card-name {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 6px;
}
.prop-card-price {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--accent);
  margin-bottom: 9px;
}
.prop-card-meta { display: flex; gap: 6px; margin-bottom: 8px; }
.prop-meta-chip {
  font-size: 10px;
  color: var(--muted);
  padding: 3px 7px;
  border-radius: 6px;
  background: rgba(245,241,232,0.05);
}
.prop-meta-chip b { color: var(--fg); }
.prop-card-sub { font-size: 11px; color: var(--muted); }

.props-filter {
  width: 240px;
  flex-shrink: 0;
  border-left: 1px solid var(--hairline);
  padding: 18px;
  overflow-y: auto;
}
.props-filter-title {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}
.pf-group { margin-bottom: 18px; }
.pf-group-title {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 9px;
}
.pf-opts { display: flex; flex-direction: column; gap: 7px; }
.pf-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--fg);
  cursor: pointer;
}
.pf-opt input { accent-color: var(--accent); }
.pf-range { width: 100%; accent-color: var(--accent); }
.pf-price-label { font-size: 12px; color: var(--accent); margin-top: 5px; font-weight: 600; }
.props-filter-reset {
  width: 100%;
  padding: 9px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
}
.props-filter-reset:hover { color: #fff; border-color: var(--accent); }

/* ============================================================
   BẤT ĐỘNG SẢN — CHI TIẾT (#9 / #10)
   ============================================================ */
.pd-modal {
  position: relative;
  width: 100%;
  max-width: 1300px;
  height: calc(100vh - 64px);
  max-height: 780px;
  background: #0b0f17;
  border: 1px solid var(--hairline);
  border-radius: 16px;
  overflow: hidden;
}
.pd-back {
  position: absolute;
  top: 16px; left: 18px;
  z-index: 2;
  padding: 7px 13px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: rgba(8,12,20,0.8);
  color: var(--muted);
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
}
.pd-back:hover { color: #fff; border-color: var(--accent); }
.pd-body {
  height: 100%;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(245,241,232,0.16) transparent;
}
.pd-body::-webkit-scrollbar { width: 6px; }
.pd-body::-webkit-scrollbar-track { background: transparent; }
.pd-body::-webkit-scrollbar-thumb {
  background: rgba(245,241,232,0.16);
  border-radius: 4px;
}
.pd-body::-webkit-scrollbar-thumb:hover {
  background: rgba(245,241,232,0.28);
}
.pd-grid {
  display: grid;
  grid-template-columns: 1fr 350px;
}
.pd-left { padding: 56px 28px 28px; }
.pd-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 5px;
}
.pd-code { font-size: 11px; letter-spacing: 0.06em; color: var(--dim); }
.pd-status {
  font-size: 10px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  color: #0a0d12;
}
.pd-status-ok   { background: #34d399; }
.pd-status-warn { background: #f4c97d; }
.pd-status-sold { background: #94a3b8; }
.pd-name {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 500;
  color: #fff;
  margin-bottom: 16px;
}
.pd-gallery { margin-bottom: 18px; }
.pd-gallery-main {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  overflow: hidden;
  background: #0f172a;
}
.pd-gallery-main img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pd-thumbs { display: flex; gap: 8px; margin-top: 8px; }
.pd-thumb {
  width: 72px;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  overflow: hidden;
  padding: 0;
  cursor: pointer;
  background: #0f172a;
}
.pd-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pd-thumb.active { border-color: var(--accent); }
.pd-quickfacts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 18px;
}
.pd-qf { background: #0b0f17; padding: 12px 10px; text-align: center; }
.pd-qf-v {
  font-family: var(--font-display);
  font-size: 17px;
  color: var(--fg);
  font-weight: 500;
}
.pd-qf-k {
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 3px;
}
.pd-block-title {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 9px;
}
.pd-highlights { margin-bottom: 20px; }
.pd-highlights ul, .pd-policy {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.pd-highlights li, .pd-policy li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 12.5px;
  color: var(--fg);
  line-height: 1.45;
}
.pd-highlights svg, .pd-policy svg {
  flex-shrink: 0;
  color: var(--accent);
  margin-top: 1px;
}
.pd-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 16px;
  overflow-x: auto;
  scrollbar-width: none;
}
.pd-tabs::-webkit-scrollbar { display: none; }
.pd-tab {
  padding: 10px 14px;
  border: none;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--muted);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.pd-tab:hover { color: var(--fg); }
.pd-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}
.pd-tab-body { padding-bottom: 8px; }
.pd-desc { font-size: 13px; line-height: 1.7; color: var(--muted); }
.pd-fp-note { font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.pd-fp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.pd-fp-thumb {
  border: 1px solid var(--hairline);
  border-radius: 9px;
  overflow: hidden;
  padding: 0;
  cursor: pointer;
  background: #0f172a;
  transition: border-color 0.15s;
}
.pd-fp-thumb:hover { border-color: var(--accent); }
.pd-fp-thumb img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.pd-fp-thumb span {
  display: block;
  padding: 6px;
  font-size: 11px;
  color: var(--muted);
  text-align: center;
}
.pd-prog { display: flex; flex-direction: column; }
.pd-prog-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--hairline);
}
.pd-prog-row:last-child { border-bottom: none; }
.pd-prog-dot {
  width: 11px; height: 11px;
  border-radius: 50%;
  border: 2px solid var(--muted);
  flex-shrink: 0;
}
.pd-prog-row.done .pd-prog-dot { background: var(--accent); border-color: var(--accent); }
.pd-prog-phase { flex: 1; font-size: 12.5px; color: var(--fg); }
.pd-prog-date { font-size: 11.5px; color: var(--muted); }
.pd-docs { display: flex; flex-direction: column; gap: 8px; }
.pd-doc-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 13px;
  border: 1px solid var(--hairline);
  border-radius: 9px;
  cursor: pointer;
  transition: border-color 0.15s;
}
.pd-doc-row:hover { border-color: var(--accent); }
.pd-doc-ico { color: var(--accent); display: grid; place-items: center; }
.pd-doc-name { flex: 1; font-size: 12.5px; color: var(--fg); }
.pd-doc-type {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 3px 7px;
  border-radius: 5px;
  background: rgba(245,241,232,0.06);
  color: var(--muted);
}
.pd-side {
  border-left: 1px solid var(--hairline);
  padding: 56px 20px 24px;
  background: rgba(245,241,232,0.02);
}
.pd-side-card {
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 14px;
}
.pd-side-card:last-child { margin-bottom: 0; }
.pd-side-label {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 8px;
}
.pd-side-price {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--accent);
  font-weight: 600;
  line-height: 1.2;
}
.pd-side-ppm { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.pd-side-rows { margin: 14px 0; }
.pd-side-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--hairline);
  font-size: 12px;
}
.pd-side-row:last-child { border-bottom: none; }
.pd-side-row span { color: var(--muted); }
.pd-side-row b { color: var(--fg); font-weight: 600; text-align: right; }
.pd-side-cta {
  width: 100%;
  padding: 11px;
  border: none;
  border-radius: 9px;
  background: var(--accent);
  color: #0a0d12;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.pd-side-cta:hover { background: #f3d29c; }
.pd-side-cta-soft {
  background: transparent;
  border: 1px solid var(--hairline);
  color: var(--fg);
  margin-top: 6px;
}
.pd-side-cta-soft:hover { border-color: var(--accent); color: var(--accent); background: transparent; }
.pd-side-note { font-size: 11.5px; color: var(--muted); margin-bottom: 11px; }
.pd-sale-name { font-size: 14px; font-weight: 600; color: var(--fg); }
.pd-sale-title { font-size: 11.5px; color: var(--muted); margin-bottom: 10px; }
.pd-contact {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border: 1px solid var(--hairline);
  border-radius: 9px;
  margin-bottom: 8px;
  color: var(--fg);
  font-size: 12.5px;
  text-decoration: none;
  transition: border-color 0.15s;
}
.pd-contact:hover { border-color: var(--accent); }
.pd-contact svg { color: var(--accent); flex-shrink: 0; }
.pd-side-loc { font-size: 12.5px; color: var(--fg); margin-bottom: 10px; }
.pd-side-map {
  aspect-ratio: 16 / 9;
  border-radius: 9px;
  background:
    linear-gradient(135deg, rgba(52,211,153,0.12), rgba(96,165,250,0.12)),
    #0f172a;
  margin-bottom: 10px;
}

/* ============================================================
   MẶT BẰNG VIEWER (#10 — ảnh 11)
   ============================================================ */
.fpv-overlay {
  position: fixed;
  inset: 0;
  z-index: 260;
  background: rgba(6,9,18,0.97);
  display: none;
  flex-direction: column;
}
.fpv-overlay.open { display: flex; }
.fpv-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--hairline);
}
.fpv-title { font-size: 14px; font-weight: 600; color: #fff; }
.fpv-close {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--hairline);
  background: rgba(245,241,232,0.04);
  color: var(--muted);
  font-size: 22px;
  cursor: pointer;
}
.fpv-close:hover { color: #fff; border-color: var(--accent); }
.fpv-stage {
  flex: 1;
  display: flex;
  min-height: 0;
}
.fpv-thumbs {
  width: 130px;
  flex-shrink: 0;
  border-right: 1px solid var(--hairline);
  padding: 14px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.fpv-thumb {
  border: 1px solid var(--hairline);
  border-radius: 9px;
  overflow: hidden;
  padding: 0;
  cursor: pointer;
  background: #0f172a;
  transition: border-color 0.15s;
}
.fpv-thumb:hover { border-color: var(--accent); }
.fpv-thumb.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.fpv-thumb img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.fpv-thumb span {
  display: block;
  padding: 5px;
  font-size: 10px;
  color: var(--muted);
  text-align: center;
}
.fpv-main {
  flex: 1;
  min-width: 0;
  min-height: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: hidden;
  touch-action: none; /* để JS xử lý pinch/drag */
}
.fpv-main img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  transform-origin: center center;
  transition: transform 0.15s ease-out;
  cursor: zoom-in;
  will-change: transform;
  user-select: none;
  -webkit-user-drag: none;
}
.fpv-main img.zoomed { cursor: grab; }
.fpv-main img.dragging { cursor: grabbing; transition: none; }
/* Gợi ý + nút điều khiển zoom */
.fpv-hint {
  position: absolute;
  left: 50%; bottom: 14px;
  transform: translateX(-50%);
  font-size: 11px;
  color: var(--muted);
  background: rgba(8,12,20,0.8);
  padding: 5px 12px;
  border-radius: 999px;
  pointer-events: none;
  white-space: nowrap;
}
.fpv-zoom-ctrls {
  position: absolute;
  right: 14px; bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.fpv-zoom-btn {
  width: 36px; height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--hairline);
  border-radius: 9px;
  background: rgba(8,12,20,0.85);
  color: var(--fg);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.fpv-zoom-btn:hover { border-color: var(--accent); color: var(--accent); }

@media (max-width: 768px) {
  #props-backdrop, #prop-detail-backdrop { padding: 0; }
  .props-modal, .pd-modal {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    border-radius: 0;
    border: none;
  }

  /* ── Header gọn: tiêu đề + hàng search/lọc ── */
  .props-head {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 16px 16px 14px;
  }
  .props-head h2 { font-size: 18px; }
  .props-head-tools { gap: 8px; }
  .props-search { flex: 1; width: auto; max-width: none; }

  /* Nút Lọc hiện trên mobile */
  .props-filter-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    padding: 9px 14px;
    border: 1px solid var(--hairline);
    border-radius: 10px;
    background: rgba(245,241,232,0.04);
    color: var(--fg);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
  }
  .props-filter-toggle:active { background: var(--accent-soft); }

  /* Lưới sản phẩm chiếm trọn — bộ lọc không còn chiếm chỗ */
  .props-body { flex-direction: column; }
  .props-grid-wrap { padding: 14px 16px 24px; }
  .props-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .props-count { margin-bottom: 10px; }

  /* ── Bộ lọc = bottom-sheet trượt từ dưới lên ── */
  .props-filter {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    width: auto;
    max-height: 82vh;
    border: none;
    border-top: 1px solid var(--hairline);
    border-radius: 18px 18px 0 0;
    background: #11161f;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.5);
    padding: 16px 18px 20px;
    z-index: 10;
    transform: translateY(100%);
    transition: transform 0.32s cubic-bezier(.4,0,.2,1);
  }
  .props-filter.open { transform: translateY(0); }
  /* Tay nắm kéo trên đầu sheet */
  .props-filter::before {
    content: "";
    position: absolute;
    top: 7px; left: 50%;
    transform: translateX(-50%);
    width: 36px; height: 4px;
    border-radius: 3px;
    background: rgba(245,241,232,0.2);
  }
  .props-filter-head { margin-top: 6px; }
  .props-filter-close {
    display: grid;
    place-items: center;
    width: 30px; height: 30px;
    border: none;
    border-radius: 8px;
    background: rgba(245,241,232,0.06);
    color: var(--muted);
    font-size: 20px;
    cursor: pointer;
  }
  .props-filter-reset { margin-top: 6px; }

  /* Nền mờ phía sau bottom-sheet */
  .props-filter-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 9;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease;
  }
  .props-filter-backdrop.open {
    opacity: 1;
    pointer-events: auto;
  }
  /* ── Chi tiết BĐS ── */
  .pd-grid { grid-template-columns: 1fr; }
  .pd-left { padding: 52px 16px 20px; }
  .pd-name { font-size: 21px; margin-bottom: 14px; }
  .pd-gallery-main { aspect-ratio: 4 / 3; }
  /* Thumbnail cuộn ngang gọn */
  .pd-thumbs {
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
  }
  .pd-thumbs::-webkit-scrollbar { display: none; }
  .pd-thumb { width: 64px; flex-shrink: 0; }
  .pd-quickfacts { grid-template-columns: 1fr 1fr; }

  /* Nút quay lại / đóng — gọn hơn, không che nội dung */
  .pd-back { top: 12px; left: 14px; padding: 6px 11px; font-size: 11.5px; }

  /* Cột phải xuống dưới — full width */
  .pd-side {
    border-left: none;
    border-top: 1px solid var(--hairline);
    padding: 20px 16px 24px;
  }
  .pd-side-price { font-size: 20px; }

  .pd-fp-grid { grid-template-columns: 1fr 1fr; }
  .fpv-thumbs { width: 92px; }
}

/* Màn hình rất nhỏ — 1 cột cho lưới sản phẩm & thông số */
@media (max-width: 420px) {
  .props-grid { grid-template-columns: 1fr; }
  .pd-quickfacts { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   PHÂN KHU — np-list 2 cấp, sub-tabbar, nút nội dung project-card
   ============================================================ */

/* ── np-list: phân khu xổ ra nhóm con ── */
.np-pk { border-radius: 10px; }
.np-pk + .np-pk { margin-top: 4px; }
.np-pk-head { cursor: pointer; }
.np-pk.pk-active > .np-pk-head {
  background: var(--accent-soft);
  border-left: 2px solid var(--accent);
}
.np-pk-chev {
  transition: transform 0.25s cubic-bezier(.4,0,.2,1);
  color: var(--muted);
}
.np-pk.expanded > .np-pk-head .np-pk-chev { transform: rotate(180deg); }
.np-pk-children {
  display: none;
  padding: 4px 0 4px 10px;
  margin-left: 6px;
  border-left: 1px dashed var(--hairline);
}
.np-pk.expanded > .np-pk-children { display: block; }
.np-subgroup .np-group-head { padding-left: 6px; }
.np-card-child { padding-left: 6px; }
.np-card-child .np-card-idx { opacity: 0.6; }

/* ── sub-tabbar — tab desktop chọn phân khu trong 5 overlay ── */
.sub-tabbar {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  padding: 10px 0 12px;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 14px;
}
.sub-tab {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: rgba(245,241,232,0.04);
  color: var(--muted);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s;
}
.sub-tab:hover { border-color: var(--accent); color: var(--accent); }
.sub-tab.active {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

/* ── sub-tabbar mobile = dropdown ── */
.sub-tabbar-mobile {
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
}
.sub-dd-label {
  font-size: 11px;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.sub-dd-select {
  flex: 1;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--hairline);
  background: var(--panel-solid);
  color: var(--fg);
  font-family: inherit;
  font-size: 13px;
}

/* ── Nút nội dung trong project-card ── */
.pc-content-btns { margin-top: 6px; }
.pc-cbtn-note {
  font-size: 11px;
  color: var(--dim);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.pc-cbtn-note strong { color: var(--accent); }
.pc-cbtn-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.pc-cbtn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 10px;
  border-radius: 9px;
  border: 1px solid var(--hairline);
  background: rgba(245,241,232,0.04);
  color: var(--muted);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s;
}
.pc-cbtn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}
.pc-cbtn-ico { display: flex; }

/* ── Modal cảnh báo thoát chưa lưu (dùng chung dashboard) ── */
.np-empty { padding: 24px 12px; text-align: center; color: var(--dim); font-size: 13px; }

@media (max-width: 768px) {
  .pc-cbtn-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   SUB-DOCK — 4 nút ngang ở bottom (tiện ích nội/ngoại khu,
   mặt bằng tầng, VR căn) — chỉ hiện khi có phân khu active.
   ============================================================ */
#sub-dock {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%) translateY(20px);
  z-index: 28;
  background: var(--panel, rgba(15, 23, 42, 0.92));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--hairline, rgba(255, 255, 255, 0.12));
  border-radius: 16px;
  padding: 10px 12px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
  max-width: calc(100vw - 24px);
}
#sub-dock.visible { opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0); }
.sub-dock-label {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 600;
  color: var(--muted, rgba(255,255,255,.6));
  padding: 0 4px 8px;
  letter-spacing: .02em;
}
.sub-dock-label span { color: #fff; }
.sub-dock-row { display: flex; gap: 8px; }
.sub-dock-btn {
  display: inline-flex; flex-direction: column; align-items: center; gap: 4px;
  min-width: 96px; padding: 10px 14px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 12px;
  color: rgba(255,255,255,.78);
  font-family: inherit; font-size: 12px; font-weight: 600;
  cursor: pointer; position: relative;
  transition: background .15s, border-color .15s, color .15s, transform .12s;
}
.sub-dock-btn:hover:not([disabled]) {
  background: rgba(59,130,246,.14);
  border-color: rgba(59,130,246,.5);
  color: #fff;
}
.sub-dock-btn.active {
  background: rgba(59,130,246,.22);
  border-color: #3b82f6;
  color: #fff;
}
.sub-dock-btn[disabled] { opacity: .4; cursor: not-allowed; }
.sub-dock-btn-label { line-height: 1.1; }
.sub-dock-btn-count {
  position: absolute; top: 4px; right: 6px;
  background: rgba(59,130,246,.3); color: #fff;
  font-size: 10px; font-weight: 700;
  padding: 1px 6px; border-radius: 8px; line-height: 1.4;
}

/* ── Popup hiện danh sách items khi click 1 nút dock ── */
#sub-dock-popup {
  position: fixed;
  left: 50%; bottom: 110px;
  transform: translateX(-50%) translateY(12px);
  z-index: 29;
  width: min(440px, calc(100vw - 24px));
  max-height: min(60vh, 520px);
  background: var(--panel, rgba(15, 23, 42, 0.96));
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--hairline, rgba(255,255,255,.12));
  border-radius: 16px;
  box-shadow: 0 22px 60px rgba(0,0,0,.55);
  display: flex; flex-direction: column;
  opacity: 0; pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  overflow: hidden;
}
#sub-dock-popup.open { opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0); }
.sdp-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 14px 16px 10px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.sdp-eyebrow { font-size: 11px; color: rgba(255,255,255,.5); letter-spacing: .04em; text-transform: uppercase; }
.sdp-title { font-size: 15px; font-weight: 600; color: #fff; margin-top: 2px; }
.sdp-count {
  display: inline-block; margin-left: 6px;
  background: rgba(59,130,246,.25); color: #fff;
  font-size: 11px; padding: 1px 7px; border-radius: 8px;
}
.sdp-close {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  color: #fff; width: 28px; height: 28px; border-radius: 8px;
  font-size: 18px; line-height: 1; cursor: pointer;
}
.sdp-close:hover { background: rgba(255,255,255,.12); }
.sdp-list { padding: 6px; overflow-y: auto; }
.sdp-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 10px 12px; margin-bottom: 2px;
  background: transparent; border: 1px solid transparent; border-radius: 10px;
  color: rgba(255,255,255,.85); text-align: left;
  font-family: inherit; cursor: pointer;
  transition: background .12s, border-color .12s;
}
.sdp-item:hover { background: rgba(59,130,246,.12); border-color: rgba(59,130,246,.35); }
.sdp-idx { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: rgba(255,255,255,.45); width: 22px; }
.sdp-info { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sdp-name { font-size: 13px; font-weight: 600; color: #fff; }
.sdp-sub { font-size: 11px; color: rgba(255,255,255,.5); }

@media (max-width: 768px) {
  #sub-dock { bottom: 12px; padding: 8px; }
  .sub-dock-btn { min-width: 72px; padding: 8px 10px; font-size: 11px; }
  .sub-dock-btn-label { font-size: 10.5px; }
  .sub-dock-label { font-size: 10.5px; padding-bottom: 6px; }
  #sub-dock-popup { bottom: 96px; width: calc(100vw - 16px); }
}
