/**
 * assets/mp-agent-workstation.css - Giao diện Bảng Điều Khiển Quy Hoạch 1/500 Tinh Gọn L.A.C.I
 * Cấu trúc 3 Vùng (Three-Zone Architecture): Left Controls - Center Viewport - Right Live HUD
 * Tích hợp toàn diện 100% với hệ thống Python Multi-Agent Engine v2.1
 */

:root {
  --mp-bg: #07100e;
  --mp-surface: #0b1513;
  --mp-surface-2: #101c19;
  --mp-surface-3: #162420;
  --mp-border: rgba(241, 238, 230, 0.12);
  --mp-border-strong: rgba(241, 238, 230, 0.22);
  --mp-gold: #c4a36d;
  --mp-gold-glow: rgba(196, 163, 109, 0.25);
  --mp-emerald: #10b981;
  --mp-cyan: #06b6d4;
  --mp-cream: #f1eee6;
  --mp-muted: rgba(241, 238, 230, 0.6);
  --mp-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Thanh cuộn chuột mảnh sang trọng & bo tròn cho toàn bộ Workstation */
.mp-workstation * {
  scrollbar-width: thin !important;
  scrollbar-color: rgba(196, 163, 109, 0.35) transparent !important;
}

.mp-workstation *::-webkit-scrollbar {
  width: 5px !important;
  height: 5px !important;
}

.mp-workstation *::-webkit-scrollbar-track {
  background: transparent !important;
}

.mp-workstation *::-webkit-scrollbar-thumb {
  background: rgba(196, 163, 109, 0.32) !important;
  border-radius: 9999px !important;
}

.mp-workstation *::-webkit-scrollbar-thumb:hover {
  background: rgba(196, 163, 109, 0.65) !important;
}

/* Khung tổng thể Workstation */
.mp-workstation {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 72px);
  min-height: 720px;
  background: var(--mp-bg);
  color: var(--mp-cream);
  font-family: var(--mp-font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow: hidden;
  position: relative;
}

/* 1. Header Điều Hành (Top Bar) */
.mp-ws-header {
  height: 52px;
  padding: 0 16px;
  background: var(--mp-surface);
  border-bottom: 1px solid var(--mp-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
  z-index: 10;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}

.mp-ws-header__left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-shrink: 0;
}

.mp-ws-brand-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mp-gold);
  background: rgba(196, 163, 109, 0.12);
  border: 1px solid var(--mp-gold);
  padding: 3px 8px;
  border-radius: 4px;
  flex-shrink: 0;
  white-space: nowrap;
}

.mp-ws-project-title {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--mp-border);
  color: var(--mp-cream);
  font-family: var(--mp-font);
  font-size: 13px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  width: 360px;
  max-width: 360px;
  min-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 1;
  transition: border-color 0.2s;
}

.mp-ws-project-title:focus {
  outline: none;
  border-color: var(--mp-gold);
  box-shadow: 0 0 0 2px var(--mp-gold-glow);
}

.mp-ws-area-badge {
  font-size: 11px;
  font-weight: 600;
  color: #34d399;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 3px 9px;
  border-radius: 12px;
  flex-shrink: 0;
  white-space: nowrap;
}

.mp-ws-header__right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.mp-ws-btn-tool {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--mp-border);
  color: var(--mp-cream);
  font-size: 11.5px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.mp-ws-btn-tool:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--mp-gold);
  color: #fff;
}

.mp-ws-status-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.mp-ws-status-pill.online {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.4);
}

.mp-ws-status-pill.ready,
.mp-ws-status-pill.local {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
}

.mp-ws-status-pill.offline {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.4);
}

.mp-ws-status-pill.error {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

/* 2. Thân Workstation: 3 Vùng (Three Zones: Input/Tools -> Viewport -> Calculations/FS) */
.mp-ws-body {
  flex: 1;
  display: grid;
  grid-template-columns: 410px 1fr 370px;
  grid-template-rows: 100%;
  height: calc(100% - 52px);
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
}

/* =========================================
   ZONE 1: BỘ ĐIỀU KHIỂN BÊN TRÁI (LEFT PANEL)
   ========================================= */
.mp-ws-left-panel {
  background: var(--mp-surface);
  border-right: 1px solid var(--mp-border);
  display: flex;
  flex-direction: column;
  height: 100% !important;
  max-height: 100% !important;
  min-height: 0 !important;
  overflow-y: scroll !important;
  overflow-x: hidden !important;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: auto !important;
  padding: 14px 12px;
  gap: 14px;
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: rgba(196, 163, 109, 0.45) rgba(7, 16, 14, 0.5);
}

/* Ultra-thin minimal scrollbars for clean dashboard */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(196, 163, 109, 0.28) transparent;
}

::-webkit-scrollbar,
.mp-ws-left-panel::-webkit-scrollbar,
.mp-ws-right-hud::-webkit-scrollbar,
.mp-ws-table-balance-wrap::-webkit-scrollbar,
.mp-popover-grid::-webkit-scrollbar {
  width: 3px;
  height: 3px;
}

::-webkit-scrollbar-track,
.mp-ws-left-panel::-webkit-scrollbar-track,
.mp-ws-right-hud::-webkit-scrollbar-track,
.mp-ws-table-balance-wrap::-webkit-scrollbar-track,
.mp-popover-grid::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb,
.mp-ws-left-panel::-webkit-scrollbar-thumb,
.mp-ws-right-hud::-webkit-scrollbar-thumb,
.mp-ws-table-balance-wrap::-webkit-scrollbar-thumb,
.mp-popover-grid::-webkit-scrollbar-thumb {
  background: rgba(196, 163, 109, 0.25);
  border-radius: 3px;
  transition: background 0.2s ease;
}

::-webkit-scrollbar-thumb:hover,
.mp-ws-left-panel::-webkit-scrollbar-thumb:hover,
.mp-ws-right-hud::-webkit-scrollbar-thumb:hover,
.mp-ws-table-balance-wrap::-webkit-scrollbar-thumb:hover,
.mp-popover-grid::-webkit-scrollbar-thumb:hover {
  background: rgba(196, 163, 109, 0.6);
}

::-webkit-scrollbar-corner {
  background: transparent;
}

.mp-ws-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--mp-gold);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

/* Hộp chọn ranh giới & dữ liệu đầu vào */
.mp-ws-card {
  background: var(--mp-surface-2);
  border: 1px solid var(--mp-border);
  border-radius: 8px;
  padding: 12px;
}

.mp-ws-select-preset {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--mp-border);
  color: var(--mp-cream);
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-family: var(--mp-font);
  cursor: pointer;
  margin-bottom: 8px;
}

.mp-ws-select-preset:focus {
  outline: none;
  border-color: var(--mp-gold);
}

.mp-ws-file-upload-btn {
  width: 100%;
  background: rgba(196, 163, 109, 0.08);
  border: 1px dashed rgba(196, 163, 109, 0.4);
  color: var(--mp-gold);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s;
}

.mp-ws-file-upload-btn:hover {
  background: rgba(196, 163, 109, 0.16);
  border-color: var(--mp-gold);
}

/* 3 Kịch bản chiến lược */
.mp-ws-scenarios {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mp-ws-scenario-opt {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--mp-border);
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.mp-ws-scenario-opt:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(241, 238, 230, 0.3);
}

.mp-ws-scenario-opt.active {
  background: rgba(196, 163, 109, 0.1);
  border-color: var(--mp-gold);
  box-shadow: 0 0 12px rgba(196, 163, 109, 0.15);
}

.mp-ws-scenario-opt__header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--mp-cream);
  margin-bottom: 3px;
}

.mp-ws-scenario-opt.active .mp-ws-scenario-opt__header {
  color: var(--mp-gold);
}

.mp-ws-scenario-opt__desc {
  font-size: 10.5px;
  color: var(--mp-muted);
  line-height: 1.4;
}

/* NÚT CTA CHÍNH: CHẠY QUY HOẠCH AI */
.mp-ws-btn-execute {
  background: linear-gradient(135deg, #0a4d3c 0%, #10b981 100%);
  border: 1px solid #34d399;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 13px 16px;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
}

.mp-ws-btn-execute:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
  background: linear-gradient(135deg, #0d5f4a 0%, #059669 100%);
}

.mp-ws-btn-execute:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Pipeline 8 Agent trực quan */
.mp-ws-pipeline-status {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-top: 4px;
}

.mp-ws-pipe-step {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  padding: 4px 2px;
  text-align: center;
  font-size: 8.5px;
  font-weight: 600;
  color: var(--mp-muted);
  transition: all 0.2s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  user-select: none;
}

.mp-ws-pipe-step:hover {
  background: rgba(217, 119, 6, 0.18);
  border-color: var(--mp-gold);
  color: var(--mp-cream);
  transform: translateY(-1px);
}

.mp-ws-pipe-step.running {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
  color: #38bdf8;
  animation: pulse 1s infinite alternate;
}

.mp-ws-pipe-step.done {
  background: rgba(16, 185, 129, 0.15);
  border-color: #34d399;
  color: #34d399;
}

@keyframes pulse {
  0% { opacity: 0.6; }
  100% { opacity: 1; }
}

/* Khối tải xuất hồ sơ 1-click */
.mp-ws-download-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.mp-ws-btn-download {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--mp-border);
  color: var(--mp-cream);
  font-size: 11px;
  font-weight: 500;
  padding: 7px 8px;
  border-radius: 6px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: all 0.2s;
}

.mp-ws-btn-download:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--mp-gold);
  color: var(--mp-gold);
}

/* =========================================
   ZONE 2: KHUNG NHÌN BẢN VẼ TRUNG TÂM (VIEWPORT)
   ========================================= */
.mp-ws-viewport {
  background: #050a09;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

/* Top bar của Viewport */
.mp-ws-vp-header {
  height: 42px;
  background: var(--mp-surface);
  border-bottom: 1px solid var(--mp-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  z-index: 5;
  overflow-x: auto;
  scrollbar-width: none;
}

.mp-ws-vp-header::-webkit-scrollbar {
  display: none;
}

.mp-ws-vp-tabs {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
  white-space: nowrap;
}

.mp-ws-vp-tab {
  background: transparent;
  border: none;
  color: var(--mp-muted);
  font-family: var(--mp-font);
  font-size: 11.5px;
  font-weight: 500;
  padding: 5px 8px;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.mp-ws-vp-tab:hover {
  color: var(--mp-cream);
  background: rgba(255, 255, 255, 0.05);
}

.mp-ws-vp-tab.active {
  color: #fff;
  background: rgba(196, 163, 109, 0.18);
  border: 1px solid rgba(196, 163, 109, 0.4);
  font-weight: 600;
}

/* Theme Capsule Selector Đồ Án Thi Tuyển (Alt+T) */
.mp-ws-theme-capsule {
  display: inline-flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(196, 163, 109, 0.35);
  border-radius: 20px;
  padding: 2px 4px;
  gap: 3px;
  flex-shrink: 0;
  backdrop-filter: blur(8px);
}
.mp-theme-btn {
  background: transparent;
  border: none;
  color: var(--mp-muted);
  font-family: var(--mp-font);
  font-size: 10.5px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}
.mp-theme-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}
.mp-theme-btn.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.35), rgba(5, 150, 105, 0.25));
  border: 1px solid rgba(52, 211, 153, 0.6);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
  font-weight: 700;
}
.mp-theme-btn[data-theme="foster_slate"].active {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.35), rgba(2, 132, 199, 0.25));
  border-color: rgba(56, 189, 248, 0.7);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.35);
}
.mp-theme-btn[data-theme="nikken_blueprint"].active {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.35), rgba(30, 58, 138, 0.3));
  border-color: rgba(147, 197, 253, 0.7);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.35);
}
.mp-theme-btn[data-theme="watg_mediterranean"].active {
  background: linear-gradient(135deg, rgba(234, 88, 12, 0.35), rgba(194, 65, 12, 0.25));
  border-color: rgba(251, 146, 60, 0.7);
  box-shadow: 0 0 10px rgba(234, 88, 12, 0.35);
}

/* Dải chỉ số Live KPI Spine */
.mp-ws-kpi-spine {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  flex-shrink: 0;
  white-space: nowrap;
}

.mp-ws-kpi-item {
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.mp-ws-kpi-item b {
  color: var(--mp-gold);
  margin-left: 3px;
}

/* Canvas Viewport */
.mp-ws-canvas-container {
  flex: 1;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

#mpWsSvgWrap {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: grab;
}

#mpWsSvgWrap:active {
  cursor: grabbing;
}

#mpWsSvgWrap svg {
  max-width: 98%;
  max-height: 91%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  transition: transform 0.05s ease-out;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.75);
}

.mp-ws-canvas-container.is-cinema-16-9 #mpWsSvgWrap svg,
#mpWsSvgWrap.is-cinema-16-9 svg {
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
}

#mpWs3dWrap {
  width: 100%;
  height: 100%;
  display: none;
  position: absolute;
  inset: 0;
  overflow: hidden;
}

#mpWs3dWrap canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
  outline: none;
  cursor: grab;
}

#mpWs3dWrap canvas:active {
  cursor: grabbing;
}

.mp-ws-3d-hud {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(7, 16, 14, 0.88);
  border: 1px solid rgba(196, 163, 109, 0.4);
  backdrop-filter: blur(12px);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 11px;
  color: var(--mp-cream, #f1eee6);
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: none;
  z-index: 10;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
  max-width: calc(100% - 40px);
  box-sizing: border-box;
  overflow: hidden;
}

.mp-ws-3d-hud-badge {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid #10b981;
  color: #34d399;
  font-weight: 700;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 10px;
  letter-spacing: 0.05em;
}

.mp-ws-3d-tools-dock {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(11, 21, 19, 0.94);
  border: 1px solid rgba(196, 163, 109, 0.45);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 5px 14px;
  border-radius: 30px;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100% - 32px);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  z-index: 35;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.65);
  pointer-events: auto;
  transition: bottom 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.mp-ws-3d-tools-dock::-webkit-scrollbar {
  display: none;
}

.mp-ws-canvas-container:has(.mp-ws-proforma-dock:not(.is-collapsed)) .mp-ws-3d-tools-dock {
  bottom: 120px;
}

.mp-3d-btn-group {
  display: flex;
  align-items: center;
  gap: 5px;
}

.mp-3d-btn-divider {
  width: 1px;
  height: 20px;
  background: rgba(196, 163, 109, 0.25);
  margin: 0 4px;
}

.mp-3d-dock-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--mp-muted, #94a3b8);
  padding: 5px 12px;
  border-radius: 16px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  user-select: none;
}

.mp-3d-dock-btn:hover {
  background: rgba(196, 163, 109, 0.18);
  border-color: rgba(196, 163, 109, 0.45);
  color: var(--mp-cream, #f1eee6);
}

.mp-3d-dock-btn.active {
  background: rgba(16, 185, 129, 0.22);
  border-color: #10b981;
  color: #34d399;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}

/* ==========================================================================
   L.A.C.I v5.1 CITY TOUR 3D ZEN MODE (CLEAN CANVAS & MINIMALIST SA BÀN)
   ========================================================================== */
.mp-ws-zen-mode .mp-ws-3d-hud,
.mp-ws-zen-mode .mp-ws-walkthrough-hud,
.mp-ws-zen-mode .mp-gis-inspect-card,
.mp-ws-zen-mode .mp-ws-microclimate-dock-card,
.mp-ws-zen-mode .mp-4d-slider-container,
.mp-ws-zen-mode .mp-4d-scurve-hud-card,
.mp-ws-zen-mode .mp-ws-banner,
.mp-ws-zen-mode .mp-ws-panel-header,
.mp-ws-zen-mode .mp-ws-left-col,
.mp-ws-zen-mode .mp-ws-right-col {
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateY(-8px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.mp-ws-zen-mode .mp-ws-3d-tools-dock {
  opacity: 0.18;
  transform: translateX(-50%) translateY(10px);
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.mp-ws-zen-mode .mp-ws-3d-tools-dock:hover {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.mp-ws-zen-mode #mpWs3dWrap {
  background: #f1f5f9;
}


/* Walkthrough HUD (First Person Mode) */
.mp-ws-walkthrough-hud {
  position: absolute;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(11, 21, 19, 0.94);
  border: 1px solid rgba(16, 185, 129, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 8px 18px;
  border-radius: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11.5px;
  color: #f1eee6;
  z-index: 25;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7);
  animation: mpFadeInDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.mp-walkthrough-btn-exit {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid #ef4444;
  color: #fca5a5;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.mp-walkthrough-btn-exit:hover {
  background: #ef4444;
  color: #fff;
}

.mp-walkthrough-btn-switch {
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid #10b981;
  color: #6ee7b7;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.mp-walkthrough-btn-switch:hover {
  background: #10b981;
  color: #07100e;
}

/* QCVN 01:2021 Live Spatial Compliance Badge */
.mp-ws-qcvn-badge {
  position: absolute;
  bottom: 85px;
  left: 20px;
  background: rgba(7, 16, 14, 0.92);
  border: 1px solid rgba(196, 163, 109, 0.45);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 11px;
  color: #f1eee6;
  z-index: 24;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  pointer-events: auto;
  min-width: 250px;
  animation: mpFadeInUp 0.3s ease;
}

.mp-qcvn-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(241, 238, 230, 0.12);
}

.mp-qcvn-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  display: inline-block;
}

.mp-qcvn-title {
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #c4a36d;
}

.mp-qcvn-body {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.mp-qcvn-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10.5px;
}

.mp-qcvn-item .q-k {
  color: rgba(241, 238, 230, 0.72);
}

.mp-qcvn-item .q-v {
  font-weight: 600;
}

.mp-qcvn-item .q-v.green {
  color: #34d399;
}

/* FlyTour HUD (Cinematic Spline Tour) */
.mp-ws-flytour-hud {
  position: absolute;
  bottom: 110px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(11, 21, 19, 0.95);
  border: 1px solid rgba(196, 163, 109, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 8px 20px;
  border-radius: 30px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: #f1eee6;
  z-index: 25;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(196, 163, 109, 0.25);
  animation: mpFadeInUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.mp-flytour-badge {
  background: rgba(196, 163, 109, 0.2);
  border: 1px solid #c4a36d;
  color: #fbbf24;
  font-weight: 700;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 10px;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.mp-flytour-node-name {
  font-weight: 600;
  color: #38bdf8;
  min-width: 320px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.mp-flytour-ctrl-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #f1eee6;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mp-flytour-ctrl-btn:hover {
  background: rgba(196, 163, 109, 0.3);
  border-color: #c4a36d;
  color: #fff;
}

.mp-flytour-ctrl-btn.exit {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #fca5a5;
}

.mp-flytour-ctrl-btn.exit:hover {
  background: #ef4444;
  color: #fff;
}

@keyframes mpFadeInDown {
  from { opacity: 0; transform: translate(-50%, -10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes mpFadeInUp {
  from { opacity: 0; transform: translate(-50%, 10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

#mpWsDossierWrap {
  width: 100%;
  height: 100%;
  display: none;
  position: absolute;
  inset: 0;
  background: #091219;
  overflow-y: auto;
  z-index: 10;
  box-sizing: border-box;
}

.mp-dossier-workspace {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  background: radial-gradient(ellipse at 50% 0%, #0d1e2b 0%, #07100e 100%);
}

.mp-dossier-toolbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 23, 34, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(196, 163, 109, 0.35);
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.mp-dossier-toolbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mp-dossier-badge {
  background: rgba(196, 163, 109, 0.2);
  color: #fbbf24;
  border: 1px solid #c4a36d;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 6px;
  letter-spacing: 0.5px;
}

.mp-dossier-title-main {
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
}

.mp-dossier-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.mp-dossier-btn {
  background: rgba(255, 255, 255, 0.07);
  color: #f1f5f9;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.mp-dossier-btn:hover {
  background: rgba(196, 163, 109, 0.2);
  border-color: #c4a36d;
  color: #fbbf24;
}

.mp-dossier-btn-primary {
  background: linear-gradient(135deg, #c4a36d, #d97706);
  color: #07100e;
  border: none;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(217, 119, 6, 0.3);
}

.mp-dossier-btn-primary:hover {
  background: linear-gradient(135deg, #dfb97f, #f59e0b);
  color: #000;
}

.mp-dossier-content-area {
  padding: 32px 20px 80px 20px;
  display: flex;
  justify-content: center;
}

/* Khung Giấy A4 Chuẩn Thuyết Minh Pháp Định */
.mp-dossier-paper {
  background: #ffffff;
  color: #1e293b;
  width: 100%;
  max-width: 920px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 1px 3px rgba(0, 0, 0, 0.3);
  border-radius: 4px;
  padding: 48px 56px;
  font-family: 'Times New Roman', 'Segoe UI', serif;
  font-size: 14px;
  line-height: 1.65;
  box-sizing: border-box;
  transition: background 0.2s ease, color 0.2s ease;
}

.mp-dossier-paper.mode-dark {
  background: #0b1722;
  color: #e2e8f0;
  border: 1px solid rgba(196, 163, 109, 0.3);
}

.mp-dossier-paper.mode-dark table {
  color: #e2e8f0 !important;
  border-color: #334155 !important;
}

.mp-dossier-paper.mode-dark th {
  background: #1e293b !important;
  color: #38bdf8 !important;
  border-color: #334155 !important;
}

.mp-dossier-paper.mode-dark td {
  border-color: #334155 !important;
  color: #cbd5e1 !important;
}

.mp-dossier-paper.mode-dark p,
.mp-dossier-paper.mode-dark ul,
.mp-dossier-paper.mode-dark li {
  color: #cbd5e1 !important;
}

.mp-dossier-paper.mode-dark h1,
.mp-dossier-paper.mode-dark h2,
.mp-dossier-paper.mode-dark b {
  color: #f8fafc !important;
}

.mp-dossier-paper.mode-dark .mp-dossier-cover-box {
  border-color: #c4a36d !important;
  background: rgba(196, 163, 109, 0.06) !important;
}

.mp-dossier-paper.mode-dark [style*="background:#f8fafc"] {
  background: rgba(15, 23, 42, 0.8) !important;
  border-color: #334155 !important;
}

.mp-dossier-paper.mode-dark [style*="background:#f0fdf4"] {
  background: rgba(6, 78, 59, 0.25) !important;
  border-color: rgba(52, 211, 153, 0.4) !important;
}

.mp-dossier-paper.mode-dark [style*="color:#166534"],
.mp-dossier-paper.mode-dark [style*="color:#15803d"] {
  color: #34d399 !important;
}

@media print {
  body * {
    visibility: hidden;
  }
  #mpWsDossierWrap,
  #mpWsDossierWrap .mp-dossier-content-area,
  #mpWsDossierWrap .mp-dossier-paper,
  #mpWsDossierWrap .mp-dossier-paper * {
    visibility: visible;
  }
  #mpWsDossierWrap {
    position: absolute;
    left: 0;
    top: 0;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
    overflow: visible !important;
  }
  .mp-dossier-toolbar,
  .mp-ws-top-bar,
  .mp-ws-left-dock,
  .mp-ws-right-tool-dock,
  .mp-ws-canvas-floating-dock,
  .mp-ws-engineering-bar {
    display: none !important;
  }
  .mp-dossier-paper {
    box-shadow: none !important;
    padding: 0 !important;
    max-width: 100% !important;
    color: #000 !important;
    background: #fff !important;
  }
}

/* Thanh công cụ nổi trên Canvas */
.mp-ws-canvas-floating-dock {
  position: absolute;
  bottom: 16px;
  right: 18px;
  left: auto;
  transform: none;
  background: rgba(11, 21, 19, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid var(--mp-border);
  padding: 6px 12px;
  border-radius: 30px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  z-index: 10;
}

.mp-ws-btn-dock {
  background: transparent;
  border: none;
  color: var(--mp-muted);
  font-size: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.mp-ws-btn-dock:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--mp-cream);
}

/* =========================================
   ZONE 3: HUD SỔ CÁI BÊN PHẢI (RIGHT HUD)
   ========================================= */
.mp-ws-right-hud {
  background: var(--mp-surface);
  border-left: 1px solid var(--mp-border);
  display: flex;
  flex-direction: column;
  height: 100% !important;
  max-height: 100% !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  padding: 16px 16px 80px 16px;
  gap: 16px;
  box-sizing: border-box;
}

/* Card số liệu */
.mp-ws-hud-card {
  background: var(--mp-surface-2);
  border: 1px solid var(--mp-border);
  border-radius: 8px;
  padding: 12px;
}

.mp-ws-hud-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.mp-ws-hud-card__title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--mp-gold);
  display: flex;
  align-items: center;
  gap: 6px;
}

.mp-ws-hud-card__badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.mp-ws-hud-card__badge.optimal {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

.mp-ws-hud-card__badge.warning {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}

/* Bảng cân bằng đất đai (15 Phân khu QCVN 01) */
.mp-ws-table-balance-wrap {
  max-height: 480px;
  overflow-y: auto;
  scrollbar-width: thin;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.15);
}

.mp-ws-table-balance-wrap::-webkit-scrollbar {
  width: 3px;
  height: 3px;
}

.mp-ws-table-balance-wrap::-webkit-scrollbar-thumb {
  background: rgba(196, 163, 109, 0.25);
  border-radius: 3px;
}

.mp-ws-table-balance {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 10.5px;
}

.mp-ws-table-balance th,
.mp-ws-table-balance td {
  box-sizing: border-box;
}

.mp-ws-table-balance th:nth-child(1),
.mp-ws-table-balance td:nth-child(1) {
  width: 58%;
  max-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mp-ws-table-balance th:nth-child(2),
.mp-ws-table-balance td:nth-child(2) {
  width: 24%;
  text-align: right;
  white-space: nowrap;
}

.mp-ws-table-balance th:nth-child(3),
.mp-ws-table-balance td:nth-child(3) {
  width: 18%;
  text-align: right;
  white-space: nowrap;
}

.mp-ws-table-balance th {
  position: sticky;
  top: 0;
  background: #0f241d;
  color: var(--mp-gold);
  font-weight: 600;
  padding: 4px 6px;
  border-bottom: 1px solid var(--mp-border-strong);
  z-index: 2;
}

.mp-ws-table-balance td {
  padding: 2.5px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.mp-ws-table-balance tr:hover td {
  background: rgba(255, 255, 255, 0.04);
}

.mp-ws-table-balance .row-total td {
  position: sticky;
  bottom: 0;
  background: #0d1e18;
  font-weight: 700;
  color: var(--mp-gold);
  border-top: 1px solid var(--mp-border-strong);
  border-bottom: none;
  z-index: 2;
}

/* Lưới KPI 2x2 */
.mp-ws-kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.mp-ws-kpi-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  padding: 8px 10px;
}

.mp-ws-kpi-box .label {
  font-size: 10px;
  color: var(--mp-muted);
  margin-bottom: 2px;
}

.mp-ws-kpi-box .value {
  font-size: 14px;
  font-weight: 700;
  color: var(--mp-cream);
}

.mp-ws-kpi-box .sub {
  font-size: 9.5px;
  color: #34d399;
}

/* Donut Chart SVG & Chú Thích Cơ Cấu Ngang */
.mp-ws-donut-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 8px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.mp-ws-donut-legend {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 9.5px;
  color: #cbd5e1;
}

.donut-leg-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.donut-leg-item span {
  width: 7px;
  height: 7px;
  border-radius: 2px;
  display: inline-block;
  flex-shrink: 0;
}

/* Ẩn khung tên bản vẽ nếu có trong SVG, chỉ giữ lại hoa gió (North Arrow) */
#title-block,
.title-block-bg,
.title-text {
  display: none !important;
}

/* Modal Cấu hình API */
.mp-ws-settings-drawer {
  position: absolute;
  top: 52px;
  left: 0;
  right: 0;
  background: rgba(7, 16, 14, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--mp-gold);
  padding: 12px 24px;
  z-index: 100;
  display: none;
  align-items: center;
  gap: 12px;
  font-size: 11.5px;
}

/* Responsive */
@media (max-width: 1280px) {
  .mp-workstation {
    height: auto;
    min-height: auto;
  }
  .mp-ws-body {
    grid-template-columns: 290px 1fr 310px;
  }
}

@media (max-width: 1024px) {
  .mp-ws-body {
    grid-template-columns: 280px 1fr;
  }
  .mp-ws-right-hud {
    display: none;
  }
}

@media (max-width: 768px) {
  .mp-ws-body {
    grid-template-columns: 1fr;
  }
  .mp-ws-left-panel {
    border-right: none;
    border-bottom: 1px solid var(--mp-border);
  }
  .mp-ws-viewport {
    min-height: 480px;
  }
}

/* ==========================================================================
   BẢN ĐỒ VỆ TINH GIS SATELLITE MODAL & BUTTONS
   ========================================================================== */
.mp-ws-btn-tool.sat {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
  color: #34d399;
  font-weight: 600;
}

.mp-ws-btn-tool.sat:hover {
  background: rgba(16, 185, 129, 0.28);
  border-color: #34d399;
  color: #fff;
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.35);
}

.mp-ws-btn-sat {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
  font-family: var(--mp-font);
  font-size: 11px;
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s;
  width: 100%;
}

.mp-ws-btn-sat:hover {
  background: rgba(16, 185, 129, 0.22);
  border-color: #34d399;
  color: #fff;
}

.mp-ws-sat-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mp-font);
}

.mp-ws-sat-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 16, 14, 0.88);
  backdrop-filter: blur(8px);
}

.mp-ws-sat-dialog {
  position: relative;
  width: 94vw;
  max-width: 1440px;
  height: 90vh;
  background: #0b1513;
  border: 1px solid var(--mp-gold);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0,0,0,0.85), 0 0 40px var(--mp-gold-glow);
  z-index: 1;
}

.mp-ws-sat-header {
  height: 52px;
  padding: 0 20px;
  background: #07100e;
  border-bottom: 1px solid var(--mp-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.mp-ws-sat-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mp-ws-sat-badge {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: #34d399;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(52, 211, 153, 0.4);
  padding: 3px 8px;
  border-radius: 4px;
}

.mp-ws-sat-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--mp-cream);
  margin: 0;
}

.mp-ws-sat-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mp-ws-sat-btn-apply {
  background: #0a4d3c;
  border: 1px solid #34d399;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 16px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.25);
  transition: all 0.2s;
}

.mp-ws-sat-btn-apply:hover {
  background: #0d634e;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
  transform: translateY(-1px);
}

.mp-ws-sat-btn-close {
  background: transparent;
  border: 1px solid var(--mp-border);
  color: var(--mp-muted);
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.2s;
}

.mp-ws-sat-btn-close:hover {
  border-color: #ef4444;
  color: #ef4444;
}

.mp-ws-sat-toolbar {
  padding: 8px 16px;
  background: #0d1a16;
  border-bottom: 1px solid var(--mp-border);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.mp-ws-sat-search-box {
  display: flex;
  align-items: center;
  gap: 4px;
}

.mp-ws-sat-search-box input {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--mp-border);
  color: #fff;
  font-size: 11.5px;
  font-family: var(--mp-font);
  padding: 5px 10px;
  border-radius: 5px;
  width: 220px;
}

.mp-ws-sat-search-box input:focus {
  outline: none;
  border-color: var(--mp-gold);
}

.mp-ws-sat-search-box button {
  background: rgba(196, 163, 109, 0.2);
  border: 1px solid var(--mp-gold);
  color: var(--mp-cream);
  font-size: 11px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 5px;
  cursor: pointer;
}

.mp-ws-sat-search-box button:hover {
  background: var(--mp-gold);
  color: #07100e;
}

.mp-ws-sat-quick-sites {
  display: flex;
  align-items: center;
  gap: 4px;
}

.mp-ws-sat-quick-sites .label {
  font-size: 10.5px;
  color: var(--mp-muted);
}

.mp-ws-sat-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--mp-border);
  color: var(--mp-cream);
  font-size: 10.5px;
  padding: 4px 8px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.mp-ws-sat-chip:hover {
  background: rgba(196, 163, 109, 0.2);
  border-color: var(--mp-gold);
  color: #fff;
}

.mp-ws-sat-draw-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.mp-ws-sat-action-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--mp-border);
  color: var(--mp-cream);
  font-size: 11px;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
}

.mp-ws-sat-action-btn:hover {
  border-color: var(--mp-gold);
  color: #fff;
}

.mp-ws-sat-action-btn.active {
  background: rgba(16, 185, 129, 0.2);
  border-color: #10b981;
  color: #34d399;
}

.mp-ws-sat-stats-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--mp-border);
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 11px;
}

.mp-ws-sat-stats-pill .sat-stat {
  color: var(--mp-muted);
}

.mp-ws-sat-stats-pill .sat-stat b {
  color: #fff;
  margin-left: 2px;
}

.mp-ws-sat-body {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.mp-ws-sat-canvas {
  width: 100%;
  height: 100%;
  cursor: crosshair;
}

.mp-ws-sat-instruction {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  background: rgba(7, 16, 14, 0.92);
  backdrop-filter: blur(6px);
  border: 1px solid var(--mp-border);
  color: var(--mp-cream);
  font-size: 11px;
  padding: 8px 14px;
  border-radius: 8px;
  z-index: 1000;
  pointer-events: none;
  box-shadow: 0 4px 16px rgba(0,0,0,0.6);
}

/* Leaflet Dark Theme Overrides */
.mp-ws-sat-modal .leaflet-control-zoom {
  border: 1px solid var(--mp-border) !important;
  border-radius: 6px !important;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5) !important;
}

.mp-ws-sat-modal .leaflet-control-zoom a {
  background: rgba(7, 16, 14, 0.9) !important;
  color: var(--mp-cream) !important;
  border-bottom: 1px solid var(--mp-border) !important;
}

.mp-ws-sat-modal .leaflet-control-zoom a:hover {
  background: var(--mp-gold) !important;
  color: #07100e !important;
}

.mp-ws-sat-modal .leaflet-control-attribution {
  background: rgba(7, 16, 14, 0.8) !important;
  color: rgba(255, 255, 255, 0.5) !important;
  font-size: 9px !important;
}

.mp-ws-sat-modal .leaflet-control-attribution a {
  color: var(--mp-gold) !important;
}

/* --- CLOUD GIS 1/2000 ĐA TẦNG & FLOATING LAYER DOCK --- */
.mp-ws-sat-hint-banner {
  width: 100%;
  background: rgba(196, 163, 109, 0.08);
  border: 1px dashed rgba(196, 163, 109, 0.3);
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 11px;
  color: var(--mp-cream);
  display: flex;
  align-items: center;
}

.mp-gis-layer-dock {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 290px;
  max-height: calc(100% - 28px);
  background: rgba(7, 16, 14, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(196, 163, 109, 0.35);
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.75), 0 0 20px rgba(196, 163, 109, 0.15);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.mp-gis-dock-header {
  height: 38px;
  padding: 0 12px;
  background: rgba(11, 25, 22, 0.85);
  border-bottom: 1px solid rgba(196, 163, 109, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.mp-gis-dock-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--mp-gold);
}

.mp-gis-dot-live {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 8px #34d399;
  display: inline-block;
  animation: mpPulseLive 2s infinite;
}

@keyframes mpPulseLive {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; box-shadow: 0 0 12px #34d399; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.mp-gis-dock-toggle {
  background: transparent;
  border: none;
  color: var(--mp-muted);
  font-size: 14px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.2s;
}

.mp-gis-dock-toggle:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.mp-gis-dock-body {
  padding: 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mp-gis-group-label {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--mp-muted);
  text-transform: uppercase;
  margin-bottom: 2px;
}

.mp-gis-basemap-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-bottom: 4px;
}

.mp-gis-base-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--mp-border);
  color: var(--mp-cream);
  font-size: 9.5px;
  font-weight: 600;
  padding: 6px 2px;
  border-radius: 6px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mp-gis-base-btn:hover {
  border-color: var(--mp-gold);
  background: rgba(196, 163, 109, 0.12);
  color: #fff;
}

.mp-gis-base-btn.active {
  background: rgba(196, 163, 109, 0.28);
  border-color: var(--mp-gold);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 0 10px rgba(196, 163, 109, 0.25);
}

.mp-gis-base-btn[data-base="national"].active {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
  color: #fef08a;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
}

.mp-gis-layer-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.mp-gis-layer-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}

.mp-gis-layer-item:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(196, 163, 109, 0.3);
}

.mp-gis-layer-item input[type="checkbox"] {
  accent-color: var(--mp-gold);
  cursor: pointer;
  width: 14px;
  height: 14px;
  margin: 0;
}

.layer-color-box {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
  box-shadow: 0 0 6px rgba(0,0,0,0.5);
}

.layer-name {
  font-size: 11px;
  font-weight: 500;
  color: var(--mp-cream);
  flex: 1;
}

.layer-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--mp-muted);
}

.mp-gis-opacity-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 8px 10px;
  margin-top: 6px;
}

.opacity-hdr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10.5px;
  color: var(--mp-cream);
  margin-bottom: 6px;
}

.opacity-hdr b {
  color: var(--mp-gold);
  font-family: monospace;
}

.mp-gis-slider {
  width: 100%;
  accent-color: var(--mp-gold);
  cursor: pointer;
  margin: 0;
}

.opacity-hint {
  font-size: 9.5px;
  color: var(--mp-muted);
  margin-top: 4px;
  font-style: italic;
  line-height: 1.3;
}

/* Thẻ Tra Cứu Thông Tin Quy Hoạch 1/2000 (Inspector Card) */
.mp-gis-inspect-card {
  position: absolute;
  bottom: 24px;
  left: 16px;
  width: 350px;
  background: rgba(7, 16, 14, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid #38bdf8;
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85), 0 0 25px rgba(56, 189, 248, 0.25);
  z-index: 1000;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: mpSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes mpSlideUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.inspect-hdr {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid rgba(56, 189, 248, 0.25);
  padding-bottom: 8px;
}

.inspect-title-box {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.inspect-code {
  font-size: 10px;
  font-weight: 800;
  color: #38bdf8;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.inspect-name {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.inspect-close {
  background: transparent;
  border: 1px solid var(--mp-border);
  color: var(--mp-muted);
  width: 24px;
  height: 24px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: all 0.2s;
}

.inspect-close:hover {
  border-color: #ef4444;
  color: #ef4444;
}

.inspect-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
  background: rgba(0, 0, 0, 0.3);
  padding: 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.inspect-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.inspect-stat .k {
  font-size: 9.5px;
  color: var(--mp-muted);
}

.inspect-stat .v {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--mp-cream);
}

.inspect-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 2px;
}

.btn-use-as-site {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  border: 1px solid #34d399;
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
  transition: all 0.2s;
}

.btn-use-as-site:hover {
  background: linear-gradient(135deg, #047857 0%, #059669 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.5);
}

.btn-refine-nodes {
  background: rgba(196, 163, 109, 0.15);
  border: 1px solid var(--mp-gold);
  color: var(--mp-gold);
  font-size: 11px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-refine-nodes:hover {
  background: var(--mp-gold);
  color: #07100e;
}

/* Banner Đo Cự Ly (Measure Banner) */
.mp-gis-measure-banner {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(7, 16, 14, 0.94);
  backdrop-filter: blur(12px);
  border: 1px solid var(--mp-gold);
  border-radius: 24px;
  padding: 6px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  color: var(--mp-cream);
  z-index: 1000;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7);
}

.btn-clear-measure {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-clear-measure:hover {
  background: #ef4444;
  color: #fff;
}

/* Custom Marker Tooltips and Pills */
.mp-gis-norm-pill {
  background: rgba(7, 16, 14, 0.92);
  border: 1px solid rgba(56, 189, 248, 0.8);
  border-radius: 14px;
  padding: 2px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.6);
  pointer-events: none;
}

.mp-gis-norm-pill span {
  font-size: 8px;
  font-weight: 800;
  color: #38bdf8;
  line-height: 1;
}

.mp-gis-norm-pill b {
  font-size: 9.5px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.1;
  white-space: nowrap;
}

.mp-gis-measure-tooltip {
  background: rgba(7, 16, 14, 0.95) !important;
  border: 1px solid var(--mp-gold) !important;
  color: var(--mp-gold) !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  border-radius: 4px !important;
  padding: 2px 6px !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.6) !important;
}

/* ==========================================================================
   LẬP DỰ ÁN ĐẦU TƯ (FEASIBILITY AGENT - LIVE PRO FORMA)
   ========================================================================== */
/* Zone 1 Controls */
.mp-ws-feas-label {
  display: block;
  font-size: 10.5px;
  color: var(--mp-muted);
  margin-bottom: 4px;
}

.mp-ws-feas-select {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--mp-border);
  color: #fff;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-family: var(--mp-font);
  outline: none;
}

.mp-ws-feas-select:focus {
  border-color: var(--mp-gold);
}

.mp-ws-slider-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.mp-ws-slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10.5px;
  color: var(--mp-muted);
}

.mp-ws-slider-val {
  font-weight: 700;
  color: #34d399;
}

.mp-ws-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  outline: none;
}

.mp-ws-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--mp-gold);
  cursor: pointer;
  box-shadow: 0 0 6px var(--mp-gold-glow);
  transition: transform 0.15s;
}

.mp-ws-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.mp-ws-btn-feas-view {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(196, 163, 109, 0.2) 100%);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #a7f3d0;
  font-family: var(--mp-font);
  font-size: 11px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s;
  width: 100%;
  margin-top: 4px;
}

.mp-ws-btn-feas-view:hover {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25) 0%, rgba(196, 163, 109, 0.35) 100%);
  border-color: #34d399;
  color: #fff;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.25);
}

/* Zone 3 HUD Link */
.mp-ws-hud-btn-link {
  background: transparent;
  border: 1px solid rgba(196, 163, 109, 0.4);
  color: var(--mp-gold);
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.mp-ws-hud-btn-link:hover {
  background: var(--mp-gold);
  color: #07100e;
}

/* Zone 2 Viewport Live Feasibility Dashboard */
.mp-ws-feas-wrap {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  padding: 20px;
  background: #07100e;
  box-sizing: border-box;
}

.mp-ws-feas-scorecard {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}

.mp-ws-feas-kpi-card {
  background: #0b1513;
  border: 1px solid var(--mp-border);
  border-radius: 8px;
  padding: 14px 16px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s;
}

.mp-ws-feas-kpi-card:hover {
  border-color: rgba(196, 163, 109, 0.4);
}

.mp-ws-feas-kpi-card .badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mp-muted);
  margin-bottom: 6px;
}

.mp-ws-feas-kpi-card .val {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.mp-ws-feas-kpi-card.gdv .val { color: var(--mp-gold); }
.mp-ws-feas-kpi-card.capex .val { color: #f59e0b; }
.mp-ws-feas-kpi-card.profit .val { color: #10b981; }
.mp-ws-feas-kpi-card.irr .val { color: #38bdf8; }

.mp-ws-feas-kpi-card .desc {
  font-size: 11px;
  color: var(--mp-muted);
}

.mp-ws-feas-narrative {
  background: rgba(196, 163, 109, 0.08);
  border-left: 3px solid var(--mp-gold);
  border-radius: 0 8px 8px 0;
  padding: 12px 18px;
  font-size: 12px;
  line-height: 1.65;
  color: var(--mp-cream);
  margin-bottom: 18px;
}

.mp-ws-feas-narrative b {
  color: #fff;
}

.mp-ws-feas-tables-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 16px;
}

.mp-ws-feas-panel {
  background: #0b1513;
  border: 1px solid var(--mp-border);
  border-radius: 8px;
  padding: 16px;
  overflow: hidden;
}

.mp-ws-feas-panel__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--mp-cream);
  margin-bottom: 12px;
}

.mp-ws-feas-panel__header .tag {
  font-size: 9.5px;
  font-weight: 700;
  color: #34d399;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.3);
  padding: 2px 7px;
  border-radius: 4px;
}

.mp-ws-feas-table-scroll {
  overflow-x: auto;
}

.mp-ws-feas-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.mp-ws-feas-table th {
  background: rgba(255, 255, 255, 0.03);
  color: var(--mp-muted);
  font-weight: 600;
  padding: 7px 10px;
  border-bottom: 1px solid var(--mp-border);
  white-space: nowrap;
}

.mp-ws-feas-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--mp-cream);
  white-space: nowrap;
}

.mp-ws-feas-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.mp-ws-feas-table tr.total-row td {
  font-weight: 700;
  border-top: 1px solid var(--mp-border-strong);
  border-bottom: none;
  background: rgba(196, 163, 109, 0.08);
  color: #fff;
}

.cf-pos { color: #34d399; font-weight: 600; }
.cf-neg { color: #f87171; font-weight: 600; }

@media (max-width: 1200px) {
  .mp-ws-feas-scorecard {
    grid-template-columns: repeat(2, 1fr);
  }
  .mp-ws-feas-tables-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   AGENT BADGES, BƯỚC 1 (MAP) & BƯỚC 2 (CƠ CẤU ĐẤT) STYLES
   ========================================================================== */
.mp-ws-agent-tag {
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #34d399;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.35);
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.mp-ws-aspect-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-top: 4px;
}

.mp-ws-aspect-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--mp-border);
  color: var(--mp-muted);
  font-family: var(--mp-font);
  font-size: 10px;
  font-weight: 600;
  padding: 5px 2px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}

.mp-ws-aspect-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.mp-ws-aspect-btn.active {
  background: rgba(196, 163, 109, 0.18);
  border-color: var(--mp-gold);
  color: var(--mp-gold);
  font-weight: 700;
}

.mp-ws-action-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--mp-border);
  color: var(--mp-cream);
  font-family: var(--mp-font);
  font-size: 11px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: all 0.15s;
}

.mp-ws-action-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--mp-gold);
  color: #fff;
}

.mp-ws-action-btn.active {
  background: rgba(16, 185, 129, 0.15);
  border-color: #34d399;
  color: #34d399;
}

.mp-ws-step2-quick-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-bottom: 8px;
}

.mp-ws-step2-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--mp-border);
  color: var(--mp-cream);
  font-family: var(--mp-font);
  font-size: 10px;
  font-weight: 600;
  padding: 5px 6px;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.15s;
}

.mp-ws-step2-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--mp-gold);
  color: #fff;
}

.mp-ws-step2-btn.primary {
  background: rgba(196, 163, 109, 0.15);
  border-color: var(--mp-gold);
  color: var(--mp-gold);
}

.mp-ws-partition-total-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  border: 1px solid transparent;
}

.mp-ws-partition-total-badge.ok {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.4);
}

.mp-ws-partition-total-badge.warn {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.4);
}

.mp-ws-partition-total-badge.err {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.4);
}

/* ==========================================================================
   DRAGGABLE SATELLITE VERTEX HANDLES & HINT BANNER
   ========================================================================== */
.mp-ws-vertex-marker {
  background: transparent !important;
  border: none !important;
}

.mp-ws-vertex-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #064e3b;
  border: 2px solid #34d399;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.8), 0 3px 8px rgba(0, 0, 0, 0.7);
  cursor: grab;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s, background 0.15s;
  position: relative;
}

.mp-ws-vertex-dot:hover {
  transform: scale(1.35);
  border-color: #f59e0b;
  background: #0f2d24;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.9);
  cursor: grab;
}

.mp-ws-vertex-marker:active .mp-ws-vertex-dot,
.leaflet-dragging .mp-ws-vertex-dot {
  cursor: grabbing !important;
  transform: scale(1.45);
  background: #0a4d3c;
  border-color: #fbbf24;
  box-shadow: 0 0 18px rgba(251, 191, 36, 1);
}

.mp-ws-vertex-num {
  font-family: var(--mp-font);
  font-size: 9.5px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  pointer-events: none;
  user-select: none;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

.mp-ws-sat-hint-banner {
  font-size: 11px;
  color: #d1fae5;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.35);
  border-radius: 6px;
  padding: 5px 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
}

/* Hệ Thống 10 Hình Thái Quy Hoạch Chuẩn VN */
.mp-ws-archetype-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
  margin-top: 4px;
}

.mp-ws-archetype-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--mp-border);
  color: var(--mp-cream);
  font-family: var(--mp-font);
  font-size: 10px;
  padding: 6px 6px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.5px;
  text-align: left;
  overflow: hidden;
}

.mp-ws-archetype-btn span {
  font-size: 13px;
  line-height: 1;
}

.mp-ws-archetype-btn b {
  font-size: 10.5px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  max-width: 100%;
}

.mp-ws-archetype-btn small {
  font-size: 8.5px;
  color: var(--mp-muted);
  line-height: 1.15;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  max-width: 100%;
}

.mp-ws-archetype-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(196, 163, 109, 0.5);
}

.mp-ws-archetype-btn.active {
  background: rgba(196, 163, 109, 0.16);
  border-color: var(--mp-gold);
  box-shadow: 0 0 12px rgba(196, 163, 109, 0.25);
}

.mp-ws-archetype-btn.active b {
  color: var(--mp-gold);
}

.mp-ws-archetype-btn.active small {
  color: #fde68a;
}

/* Badge số thứ tự phân khu 15 mục QCVN */
.mp-ws-cat-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: #07100e;
  border: 1.5px solid var(--mp-gold);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  font-family: monospace;
  flex-shrink: 0;
}

.mp-ws-table-balance td {
  vertical-align: middle;
}

/* ==========================================================================
   FLOATING LIVE PRO FORMA DOCK (GIRAFFE STYLE REAL-TIME FINANCIALS)
   ========================================================================== */
@keyframes mpWsPulseDot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7); }
  70% { transform: scale(1.15); box-shadow: 0 0 0 6px rgba(52, 211, 153, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

@keyframes mpWsFadeInScale {
  from { opacity: 0; transform: translate(-50%, -46%) scale(0.96); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.mp-ws-proforma-dock {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(7, 16, 14, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(196, 163, 109, 0.42);
  border-radius: 12px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.05);
  z-index: 20;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: calc(100% - 260px);
}

.mp-ws-proforma-dock:hover {
  border-color: rgba(196, 163, 109, 0.6);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.8), 0 0 16px rgba(196, 163, 109, 0.15);
}

.mp-proforma-dock__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.02);
  border-radius: 11px 11px 0 0;
  gap: 12px;
}

.mp-proforma-dock__brand {
  display: flex;
  align-items: center;
  gap: 7px;
}

.mp-proforma-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  animation: mpWsPulseDot 2s infinite ease-in-out;
}

.mp-proforma-title {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: var(--mp-gold);
  text-transform: uppercase;
}

.mp-proforma-sub-badge {
  font-size: 9px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(196, 163, 109, 0.15);
  color: #fde68a;
  border: 1px solid rgba(196, 163, 109, 0.3);
}

.mp-proforma-dock__actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mp-proforma-btn-fs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, rgba(196, 163, 109, 0.22), rgba(16, 185, 129, 0.18));
  border: 1px solid rgba(196, 163, 109, 0.45);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mp-proforma-btn-fs:hover {
  background: var(--mp-gold);
  color: #07100e;
  border-color: var(--mp-gold);
  box-shadow: 0 0 10px rgba(196, 163, 109, 0.4);
}

.mp-proforma-btn-toggle {
  background: transparent;
  border: none;
  color: var(--mp-muted);
  font-size: 13px;
  cursor: pointer;
  padding: 2px 5px;
  border-radius: 4px;
  line-height: 1;
  transition: color 0.15s;
}

.mp-proforma-btn-toggle:hover {
  color: #fff;
}

.mp-proforma-dock__body {
  display: flex;
  align-items: center;
  padding: 8px 14px 10px 14px;
  gap: 14px;
}

.mp-proforma-stat {
  display: flex;
  flex-direction: column;
  min-width: 80px;
}

.mp-proforma-label {
  font-size: 8.5px;
  font-weight: 700;
  color: var(--mp-muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.mp-proforma-value {
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  font-family: monospace;
  line-height: 1.25;
  margin-top: 1px;
}

.mp-proforma-value.profit {
  color: #34d399;
}

.mp-proforma-value.irr {
  color: #38bdf8;
}

.mp-proforma-value.gold {
  color: #f59e0b;
}

.mp-proforma-sub {
  font-size: 8.5px;
  color: var(--mp-muted);
  margin-top: 1px;
  white-space: nowrap;
}

.mp-proforma-divider {
  width: 1px;
  height: 28px;
  background: rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.mp-ws-proforma-dock.is-collapsed .mp-proforma-dock__body {
  display: none;
}

.mp-ws-proforma-dock.is-collapsed .mp-proforma-dock__header {
  border-bottom: none;
  border-radius: 11px;
}

/* ==========================================================================
   INTERACTIVE CLICK-TO-REZONE POPOVER MODAL
   ========================================================================== */
.mp-ws-parcel-popover {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 100;
  background: rgba(11, 21, 19, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid var(--mp-gold);
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85), 0 0 28px rgba(196, 163, 109, 0.25);
  width: 90%;
  max-width: 560px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: mpWsFadeInScale 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.mp-popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.02);
  gap: 12px;
}

.mp-popover-title-box {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mp-popover-badge-pill {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--mp-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: monospace;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  background: #07100e;
  flex-shrink: 0;
}

.mp-popover-title {
  font-size: 13.5px;
  font-weight: 800;
  color: #fff;
  margin: 0;
  line-height: 1.3;
}

.mp-popover-meta {
  font-size: 10.5px;
  color: var(--mp-muted);
  margin-top: 2px;
}

.mp-popover-close {
  background: transparent;
  border: none;
  color: var(--mp-muted);
  font-size: 16px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.15s;
}

.mp-popover-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.mp-popover-instructions {
  padding: 9px 16px;
  background: rgba(196, 163, 109, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 11px;
  color: #f1eee6;
  line-height: 1.45;
}

.mp-popover-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  padding: 12px 16px;
  overflow-y: auto;
  max-height: 340px;
}

.mp-popover-cat-item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 9px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  font-size: 11px;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

.mp-popover-cat-item:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--mp-gold);
  transform: translateY(-1px);
}

.mp-popover-cat-item.active {
  background: rgba(196, 163, 109, 0.18);
  border-color: var(--mp-gold);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 0 10px rgba(196, 163, 109, 0.2);
}

.mp-popover-cat-item .cat-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.mp-popover-cat-item .cat-num {
  font-family: monospace;
  font-size: 9.5px;
  font-weight: 700;
  color: var(--mp-gold);
}

.mp-popover-cat-item .cat-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 10.5px;
}

.mp-popover-cat-item .cat-check {
  font-size: 9px;
  color: #34d399;
  font-weight: 700;
  white-space: nowrap;
}

.mp-popover-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(7, 16, 14, 0.7);
  gap: 10px;
}

.mp-popover-btn-reset {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #f87171;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.mp-popover-btn-reset:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
  color: #fff;
}

.mp-popover-note {
  font-size: 10px;
  color: var(--mp-muted);
}

/* Vector Parcel Hover & Selection Effects */
.mp-vector-parcel {
  transition: opacity 0.2s ease, filter 0.2s ease;
}

.mp-vector-parcel:hover polygon:first-child {
  filter: brightness(1.22) drop-shadow(0 0 10px rgba(245, 158, 11, 0.5));
  stroke: #fbbf24 !important;
  stroke-width: 2.8px !important;
}

.mp-badge-group {
  transition: transform 0.18s ease;
}

.mp-badge-group:hover circle:first-child {
  stroke: #fbbf24 !important;
  stroke-width: 3px !important;
  filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.7));
}

.mp-badge-clean text {
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95);
  letter-spacing: 0.2px;
}

.mp-legend-item {
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.mp-legend-item:hover rect {
  stroke: #fbbf24 !important;
  stroke-width: 1.2px !important;
}

.mp-legend-item:hover text {
  fill: #fef08a !important;
}

#statutoryLegendTable {
  user-select: none;
}

.mp-vector-parcel.is-customized polygon:first-child {
  stroke-dasharray: none;
}

/* ==========================================================================
   FORMAL STATUTORY PLAN MODE (BẢN VẼ ĐỒ ÁN QUY HOẠCH CHÍNH THỐNG - TT 16/2025)
   ========================================================================== */
.mp-canvas-drafting-sheet {
  fill: #07100e;
}

/* Macro vs Micro Zoom-dependent Level of Detail (LOD) */
.mp-lod-macro {
  opacity: 1;
  transition: opacity 0.22s ease-in-out;
}

.mp-lod-micro {
  display: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease-in-out;
}

/* Khi người dùng zoom sâu (scale >= 1.45), bung nhãn chi tiết Micro */
.lod-micro-active .mp-lod-micro,
svg.lod-micro-active .mp-lod-micro {
  display: inline;
  opacity: 1;
}

.mp-micro-lot-pill text,
.mp-cell-centroid-tag text {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
}

.mp-vector-parcel polygon {
  transition: fill 0.15s ease, stroke 0.15s ease;
}

.mp-vector-parcel:hover > polygon:first-child {
  stroke: #c4a36d !important;
  stroke-width: 1.3px !important;
  filter: drop-shadow(0 0 6px rgba(196, 163, 109, 0.5));
}

/* Responsive Pro Forma Dock */
@media (max-width: 900px) {
  .mp-ws-proforma-dock {
    max-width: none;
    left: 10px;
    right: 10px;
    bottom: 58px;
  }
  .mp-proforma-dock__body {
    gap: 10px;
    padding: 6px 10px 8px 10px;
  }
  .mp-proforma-stat {
    min-width: 65px;
  }
  .mp-proforma-value {
    font-size: 12px;
  }
  .mp-popover-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   LIVE PRO FORMA ADVANCED SUITE (GIRAFFE & TESTFIT BENCHMARKS)
   ========================================================================== */

/* 1. Stress-Test Quick Buttons & Sparkline in Dock */
.mp-proforma-stress-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

.mp-stress-label {
  font-size: 9.5px;
  color: var(--mp-muted);
  margin-right: 2px;
  white-space: nowrap;
}

.mp-btn-stress {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--mp-cream);
  font-family: var(--mp-font);
  font-size: 9.5px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.mp-btn-stress:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(196, 163, 109, 0.4);
}

.mp-btn-stress.active {
  background: rgba(196, 163, 109, 0.25);
  border-color: var(--mp-gold);
  color: var(--mp-gold);
  font-weight: 700;
  box-shadow: 0 0 8px rgba(196, 163, 109, 0.35);
}

.mp-proforma-sparkline {
  width: 84px;
  height: 26px;
  display: flex;
  align-items: center;
  margin-top: 1px;
}

/* 2. Feasibility Action Bar & Export Button */
.mp-ws-feas-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #0b1513;
  border: 1px solid var(--mp-border);
  border-radius: 8px;
  padding: 10px 16px;
  margin-bottom: 12px;
  gap: 16px;
}

.mp-ws-feas-title-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mp-ws-feas-heading {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mp-ws-feas-heading h3 {
  margin: 0;
  font-size: 13.5px;
  font-weight: 800;
  color: var(--mp-gold);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.mp-ws-feas-subheading {
  font-size: 11px;
  color: var(--mp-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.mp-ws-feas-subheading .sep {
  color: rgba(255, 255, 255, 0.2);
}

.mp-feas-pill-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(196, 163, 109, 0.15);
  color: #fde68a;
  border: 1px solid rgba(196, 163, 109, 0.3);
}

.mp-ws-btn-export-csv {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 6px;
  background: linear-gradient(135deg, rgba(196, 163, 109, 0.22), rgba(16, 185, 129, 0.28));
  border: 1px solid rgba(16, 185, 129, 0.5);
  color: #fff;
  font-family: var(--mp-font);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.mp-ws-btn-export-csv:hover {
  background: linear-gradient(135deg, rgba(196, 163, 109, 0.38), rgba(16, 185, 129, 0.48));
  border-color: #34d399;
  box-shadow: 0 0 14px rgba(52, 211, 153, 0.4);
  transform: translateY(-1px);
}

/* 3. Ma Trận Phân Tích Độ Nhạy 2 Chiều (2-Way Sensitivity Matrix) */
.mp-ws-feas-sensitivity-table {
  width: 100%;
}

.mp-ws-feas-sensitivity-table th {
  padding: 8px 10px;
}

.sens-cell {
  padding: 10px 8px !important;
  text-align: center;
  vertical-align: middle;
  border-radius: 5px;
  transition: all 0.15s ease;
}

.sens-cell:hover {
  filter: brightness(1.2);
  transform: scale(1.02);
}

.sens-irr {
  font-size: 14.5px;
  font-weight: 800;
  font-family: monospace;
  line-height: 1.25;
}

.sens-sub {
  font-size: 9.5px;
  color: rgba(255, 255, 255, 0.72);
  margin-top: 3px;
  font-weight: 500;
}

.cell-opt {
  background: rgba(16, 185, 129, 0.16) !important;
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.35) !important;
}

.cell-mid {
  background: rgba(245, 158, 11, 0.16) !important;
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.35) !important;
}

.cell-warn {
  background: rgba(239, 68, 68, 0.16) !important;
  color: #f87171;
  border: 1px solid rgba(248, 113, 113, 0.35) !important;
}

.cell-base {
  outline: 2px solid var(--mp-gold);
  outline-offset: -2px;
  box-shadow: 0 0 12px rgba(196, 163, 109, 0.45);
}

.sens-badge-base {
  display: inline-block;
  font-size: 8.5px;
  font-weight: 800;
  color: #07100e;
  background: var(--mp-gold);
  padding: 1px 4px;
  border-radius: 3px;
  vertical-align: middle;
  margin-left: 4px;
  letter-spacing: 0.3px;
}

/* 4. Cơ Cấu Nguồn Vốn (Funding Bar) & Phân Kỳ Đầu Tư (Phasing) */
.mp-ws-feas-funding-bar {
  display: flex;
  height: 24px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  margin-bottom: 9px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
}

.mp-funding-seg {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9.5px;
  font-weight: 700;
  color: #fff;
  transition: width 0.3s ease;
  white-space: nowrap;
}

.mp-funding-seg.equity {
  background: linear-gradient(135deg, #059669, #10b981);
}

.mp-funding-seg.debt {
  background: linear-gradient(135deg, #0284c7, #38bdf8);
}

.mp-funding-seg.presale {
  background: linear-gradient(135deg, #d97706, #fbbf24);
  color: #07100e;
}

.mp-ws-feas-funding-legend {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 11px;
  color: #e2e8f0;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-item .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.legend-item .dot.eq {
  background: #10b981;
}

.legend-item .dot.db {
  background: #38bdf8;
}

.legend-item .dot.ps {
  background: #f59e0b;
}

.mp-ws-feas-phasing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.mp-phase-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px 12px;
}

.mp-phase-card.p1 {
  border-left: 3px solid #38bdf8;
}

.mp-phase-card.p2 {
  border-left: 3px solid #10b981;
}

.phase-hdr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.phase-name {
  font-size: 11px;
  font-weight: 700;
  color: #f1eee6;
}

.phase-pct {
  font-size: 9.5px;
  font-weight: 700;
  color: var(--mp-gold);
  background: rgba(196, 163, 109, 0.15);
  padding: 1px 5px;
  border-radius: 3px;
}

.phase-val {
  font-size: 15px;
  font-weight: 800;
  font-family: monospace;
  color: #fff;
  margin-bottom: 6px;
}

.phase-tasks {
  font-size: 10px;
  color: var(--mp-muted);
  line-height: 1.5;
}

/* Phân Lô Chi Tiết Bám Vỉa Hè Đường Cong (Road-First Curvilinear Micro-Lots) */
.mp-sublot-poly {
  transition: all 0.15s ease-in-out;
  cursor: crosshair;
}

.mp-sublot-poly:hover {
  fill: rgba(52, 211, 153, 0.45) !important;
  stroke: #34d399 !important;
  stroke-width: 1.8px !important;
  filter: drop-shadow(0 0 4px rgba(52, 211, 153, 0.8));
}

#mpWsToggleMicroLots.active {
  background: rgba(52, 211, 153, 0.22) !important;
  color: #34d399 !important;
  border-color: rgba(52, 211, 153, 0.6) !important;
  font-weight: 600;
}

/* ==========================================================================
   INTERACTIVE RE-ZONING: PALETTE DRAG & DROP + ZONING PAINT BRUSH
   ========================================================================== */

/* ==========================================================================
   CANVAS DUAL VERTICAL FLOATING DOCKS (LEFT PLANNING & RIGHT EXPORT)
   ========================================================================== */

/* Cột Dọc Bên Trái: Planning & 15 Phân Khu QCVN 01 */
.mp-ws-left-tool-dock {
  position: absolute;
  top: 14px;
  left: 14px;
  bottom: 84px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 25;
  pointer-events: none;
  width: 174px;
  transition: width 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.mp-ws-left-tool-dock > * {
  pointer-events: auto;
}

/* Khối Lớp Bản Đồ & Chế Độ Thao Tác */
.mp-ws-tool-panel {
  background: rgba(7, 16, 14, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(196, 163, 109, 0.38);
  border-radius: 10px;
  padding: 6px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.mp-ws-dock-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 6px 4px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 2px;
}

.mp-ws-dock-title span {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: #c4a36d;
  text-transform: uppercase;
}

.mp-ws-dock-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 5px 8px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #cbd5e1;
  font-family: inherit;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: all 0.16s ease;
  user-select: none;
}

.mp-ws-dock-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.15);
}

.mp-ws-dock-btn.active,
.mp-ws-dock-btn.is-active {
  background: rgba(196, 163, 109, 0.2);
  border-color: rgba(196, 163, 109, 0.55);
  color: #fbbf24;
  font-weight: 600;
}

.dock-btn-icon {
  font-size: 13px;
  line-height: 1;
  flex-shrink: 0;
}

.dock-btn-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.dock-hotkey {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 8.5px;
  font-weight: 700;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #94a3b8;
  margin-left: auto;
  letter-spacing: 0.2px;
  pointer-events: none;
}

.mp-ws-dock-btn:hover .dock-hotkey,
.mp-ws-dock-btn.active .dock-hotkey,
.mp-palette-btn-brush.active .dock-hotkey {
  color: #fbbf24;
  border-color: rgba(196, 163, 109, 0.4);
  background: rgba(196, 163, 109, 0.15);
}

.mp-svg-ico {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

/* Khối Bảng Phân Khu & Cọ Vẽ QCVN 01:2021 Xếp Dọc */
.mp-ws-zoning-palette-bar {
  background: rgba(7, 16, 14, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(196, 163, 109, 0.38);
  border-radius: 10px;
  padding: 6px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-height: 120px;
  max-height: calc(100vh - 430px);
  overflow: hidden;
  box-sizing: border-box;
}

.mp-palette-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

/* Nút Cọ Vẽ Phân Khu (Zoning Paint Brush Button) */
.mp-palette-btn-brush {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px 8px;
  font-size: 11px;
  font-weight: 700;
  color: #f1eee6;
  background: rgba(196, 163, 109, 0.15);
  border: 1px solid rgba(196, 163, 109, 0.4);
  border-radius: 5px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  flex: 1;
}

.mp-palette-btn-brush:hover {
  background: rgba(196, 163, 109, 0.3);
  border-color: var(--mp-gold, #c4a36d);
}

.mp-palette-btn-brush.active {
  background: #c4a36d !important;
  color: #0f172a !important;
  border-color: #f59e0b !important;
  box-shadow: 0 0 10px rgba(196, 163, 109, 0.8);
  animation: pulse-brush 1.5s infinite;
}

@keyframes pulse-brush {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

.mp-palette-btn-collapse {
  width: 26px;
  height: 28px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 5px;
  color: #94a3b8;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: all 0.16s ease;
  flex-shrink: 0;
}

.mp-palette-btn-collapse:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(196, 163, 109, 0.5);
}

/* Thanh Lọc Nhanh Nhóm Phân Khu QCVN 01 (Palette Filter Bar) */
.mp-palette-filter-bar {
  display: flex;
  align-items: center;
  gap: 2px;
  background: rgba(0, 0, 0, 0.4);
  padding: 2px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.mp-palette-filter-pill {
  flex: 1;
  background: transparent;
  border: 1px solid transparent;
  color: #94a3b8;
  font-family: inherit;
  font-size: 9px;
  font-weight: 600;
  padding: 3px 0;
  text-align: center;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.mp-palette-filter-pill:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.mp-palette-filter-pill.active {
  background: rgba(196, 163, 109, 0.25);
  border-color: rgba(196, 163, 109, 0.6);
  color: #fbbf24;
  font-weight: 700;
}

.mp-palette-chips-wrap.vertical {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 3px;
  flex: 1;
}

.mp-palette-chips-wrap.vertical::-webkit-scrollbar {
  width: 3px;
  height: 3px;
}
.mp-palette-chips-wrap.vertical::-webkit-scrollbar-thumb {
  background: rgba(196, 163, 109, 0.25);
  border-radius: 3px;
}

/* Viên Gạch Kéo Thả Phân Khu (Draggable Zoning Chip) */
.mp-zoning-drag-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  box-sizing: border-box;
  padding: 4px 6px;
  background: rgba(26, 38, 57, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 5px;
  font-size: 10.5px;
  font-weight: 500;
  color: #e2e8f0;
  cursor: grab;
  user-select: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all 0.15s ease;
}

.mp-zoning-drag-chip:hover {
  background: rgba(45, 62, 80, 0.85);
  border-color: rgba(196, 163, 109, 0.5);
  color: #fff;
  transform: translateX(2px);
}

.mp-zoning-drag-chip:active {
  cursor: grabbing;
}

.mp-zoning-drag-chip.is-dragging {
  opacity: 0.4;
  transform: scale(0.95);
}

.mp-zoning-drag-chip.brush-selected {
  outline: 2px solid #38bdf8;
  background: rgba(56, 189, 248, 0.25);
  color: #38bdf8;
  font-weight: 700;
}

.mp-zoning-chip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Chân Cột Left Dock: Nút Hoàn Tác & Thoát Cọ */
.mp-ws-dock-footer {
  display: flex;
  align-items: center;
  gap: 4px;
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 2px;
}

.mp-ws-dock-btn-sub {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  font-family: inherit;
  font-size: 9.5px;
  font-weight: 600;
  padding: 4px 2px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.16s ease;
  white-space: nowrap;
}

.mp-ws-dock-btn-sub:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(196, 163, 109, 0.5);
}

.mp-ws-dock-btn-sub:active {
  transform: scale(0.95);
}

/* Chế độ Thu Gọn của Bảng Phân Khu (Compact Mode) */
.mp-ws-zoning-palette-bar.is-compact {
  width: 52px !important;
}
.mp-ws-left-tool-dock:has(.mp-ws-zoning-palette-bar.is-compact) {
  width: 52px;
}
.mp-ws-zoning-palette-bar.is-compact .mp-palette-filter-bar {
  display: none;
}
.mp-ws-zoning-palette-bar.is-compact .mp-palette-btn-brush span:last-child {
  display: none;
}
.mp-ws-zoning-palette-bar.is-compact .mp-zoning-drag-chip {
  justify-content: center;
  padding: 4px 2px;
}
.mp-ws-zoning-palette-bar.is-compact .mp-zoning-drag-chip span:last-child {
  max-width: 22px;
  overflow: hidden;
  font-size: 9px;
}
.mp-ws-zoning-palette-bar.is-compact .mp-ws-dock-footer {
  flex-direction: column;
}
.mp-ws-zoning-palette-bar.is-compact .mp-ws-dock-btn-sub span:last-child {
  display: none;
}
.mp-ws-zoning-palette-bar.is-compact .dock-hotkey {
  display: none;
}
.mp-ws-left-tool-dock:has(.mp-ws-zoning-palette-bar.is-compact) .mp-ws-tool-panel {
  width: 52px;
}
.mp-ws-left-tool-dock:has(.mp-ws-zoning-palette-bar.is-compact) .dock-btn-label,
.mp-ws-left-tool-dock:has(.mp-ws-zoning-palette-bar.is-compact) .dock-hotkey {
  display: none;
}
.mp-ws-left-tool-dock:has(.mp-ws-zoning-palette-bar.is-compact) .mp-ws-dock-title span {
  font-size: 8px;
  text-align: center;
  display: block;
  width: 100%;
}
.mp-ws-left-tool-dock:has(.mp-ws-zoning-palette-bar.is-compact) .mp-ws-dock-btn {
  justify-content: center;
  padding: 6px 0;
}

/* ==========================================================================
   BẢNG ĐIỀU HƯỚNG & CÔNG CỤ TÁC NGHIỆP TRONG BẢNG ĐIỀU KHIỂN TRUNG TÂM (SIDEBAR)
   ========================================================================== */
.mp-ws-right-tool-dock {
  position: static !important;
  top: auto !important;
  right: auto !important;
  width: 100% !important;
  max-height: none !important;
  overflow: visible !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  z-index: 1 !important;
  pointer-events: auto !important;
  align-items: stretch !important;
  margin-bottom: 12px !important;
}

.mp-ws-right-tool-dock::-webkit-scrollbar {
  display: none;
}

.mp-ws-right-tool-dock > * {
  pointer-events: auto;
}

.mp-ws-left-panel .mp-ws-right-tool-dock {
  position: static !important;
  top: auto !important;
  right: auto !important;
  width: 100% !important;
  max-height: none !important;
  overflow: visible !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  z-index: 1 !important;
  pointer-events: auto !important;
  align-items: stretch !important;
  margin-bottom: 12px !important;
}

.mp-ws-archetype-grid {
  max-height: none !important;
  overflow-y: visible !important;
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 6px !important;
  padding-right: 0 !important;
}

#mpWsSvgWrap.is-cad-measuring,
#mpWsSvgWrap.is-cad-measuring svg {
  cursor: crosshair !important;
}

#mpWsBtnNorthCompass svg {
  transition: transform 0.08s ease-out;
}

/* Chuyển đổi nhanh 2D / 3D Segmented Switch */
.mp-ws-dim-switch {
  width: 100% !important;
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  padding: 3px !important;
  background: rgba(15, 23, 42, 0.7) !important;
  border: 1px solid rgba(196, 163, 109, 0.3) !important;
  border-radius: 8px !important;
  box-sizing: border-box !important;
}

.mp-ws-dim-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: #94a3b8;
  font-family: inherit;
  font-size: 11px !important;
  font-weight: 700;
  padding: 6px 10px !important;
  text-align: center;
  border-radius: 6px !important;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.mp-ws-dim-btn:hover {
  color: #fff;
}

.mp-ws-dim-btn.active {
  background: linear-gradient(135deg, #c4a36d, #b48c48) !important;
  color: #07100e !important;
  font-weight: 800;
  box-shadow: 0 2px 6px rgba(196, 163, 109, 0.4);
}

/* Nhóm A: Hoa tiêu la bàn & Điều hướng (Grid trong Left Panel) */
.mp-ws-nav-panel {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 6px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  background: rgba(7, 16, 14, 0.92) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(196, 163, 109, 0.38) !important;
  border-radius: 10px !important;
  padding: 8px 6px !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5) !important;
}

.mp-ws-nav-panel .mp-ws-btn-compass {
  grid-column: 1 / -1 !important;
  width: 100% !important;
  height: 36px !important;
  background: rgba(196, 163, 109, 0.1) !important;
  border: 1px solid rgba(196, 163, 109, 0.35) !important;
  border-radius: 7px !important;
  cursor: pointer;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 0 8px !important;
  transition: all 0.2s ease !important;
}

.mp-ws-nav-panel .mp-ws-btn-compass:hover {
  background: rgba(196, 163, 109, 0.2) !important;
  border-color: rgba(196, 163, 109, 0.6) !important;
  transform: none !important;
}

.mp-ws-nav-divider {
  display: none !important;
}

.mp-ws-nav-panel .mp-ws-btn-dock {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: 34px !important;
  border-radius: 7px !important;
  padding: 2px !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  background: rgba(255, 255, 255, 0.03) !important;
  color: #cbd5e1 !important;
  font-size: 13px !important;
  cursor: pointer !important;
  transition: all 0.18s ease !important;
}

.mp-ws-nav-panel .mp-ws-btn-dock:hover {
  transform: translateY(-1px) !important;
  color: #fff !important;
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(196, 163, 109, 0.45) !important;
}

.mp-ws-nav-panel .mp-ws-btn-dock.active {
  background: rgba(196, 163, 109, 0.25) !important;
  border-color: rgba(196, 163, 109, 0.7) !important;
  color: #fbbf24 !important;
}

.mp-ws-zoom-badge {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  color: #38bdf8 !important;
  background: rgba(56, 189, 248, 0.08) !important;
  border: 1px solid rgba(56, 189, 248, 0.25) !important;
  border-radius: 6px !important;
  height: 34px !important;
}

/* Nhóm B: Xuất hồ sơ BXD & Diễn họa AI (Grid 2 cột trong Left Panel) */
.mp-ws-export-panel {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 6px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  background: rgba(7, 16, 14, 0.92) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(196, 163, 109, 0.38) !important;
  border-radius: 10px !important;
  padding: 6px !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5) !important;
}

.mp-ws-export-panel .mp-ws-btn-dock {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  width: 100% !important;
  height: 32px !important;
  border-radius: 7px !important;
  padding: 2px 6px !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  background: rgba(255, 255, 255, 0.03) !important;
  color: #cbd5e1 !important;
  cursor: pointer !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  transition: all 0.18s ease !important;
}

.mp-ws-export-panel .mp-ws-btn-dock:hover {
  transform: translateY(-1px) !important;
  color: #fff !important;
  border-color: rgba(196, 163, 109, 0.5) !important;
}

.mp-ws-export-panel .mp-ws-btn-dock.ai-visuals {
  border-color: rgba(168, 85, 247, 0.5) !important;
  color: #c084fc !important;
  background: rgba(168, 85, 247, 0.1) !important;
}

.mp-ws-export-panel .mp-ws-btn-dock.teaser-deck {
  border-color: rgba(245, 158, 11, 0.5) !important;
  color: #fbbf24 !important;
  background: rgba(245, 158, 11, 0.1) !important;
}

.mp-ws-export-panel .mp-ws-btn-dock.cad-dxf {
  border-color: rgba(56, 189, 248, 0.5) !important;
  color: #38bdf8 !important;
  background: rgba(56, 189, 248, 0.1) !important;
}

.mp-ws-export-panel .mp-ws-btn-dock.snapshot {
  border-color: rgba(16, 185, 129, 0.5) !important;
  color: #34d399 !important;
  background: rgba(16, 185, 129, 0.1) !important;
}

.dock-badge-text {
  font-size: 8px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.2px;
  text-transform: uppercase;
}

/* Card Nghiên Cứu Nắng & Bóng Đổ Mặt Trời (Solar & Shadow Study) */
.mp-ws-sun-study-card {
  position: absolute;
  top: 60px;
  right: 68px;
  width: 290px;
  background: rgba(7, 16, 14, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(196, 163, 109, 0.45);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.05);
  z-index: 35;
  padding: 12px;
  box-sizing: border-box;
  animation: slide-down 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.mp-sun-study-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mp-sun-study-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  color: #fbbf24;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.mp-sun-study-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 12px;
  cursor: pointer;
  padding: 2px 5px;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.mp-sun-study-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.mp-sun-study-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mp-sun-study-slider-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mp-sun-label-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10.5px;
  color: #cbd5e1;
}

.mp-sun-slider {
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, #38bdf8, #fbbf24, #f97316);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}

.mp-sun-study-presets {
  display: flex;
  align-items: center;
  gap: 4px;
}

.mp-sun-preset-btn {
  flex: 1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  font-family: inherit;
  font-size: 9px;
  font-weight: 600;
  padding: 4px 2px;
  border-radius: 5px;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
}

.mp-sun-preset-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(196, 163, 109, 0.4);
}

.mp-sun-preset-btn.active {
  background: rgba(245, 158, 11, 0.2);
  border-color: #fbbf24;
  color: #fbbf24;
  font-weight: 700;
}

.mp-sun-season-row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
}

.mp-sun-season-btn {
  flex: 1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  font-family: inherit;
  font-size: 8.5px;
  font-weight: 600;
  padding: 4px 2px;
  border-radius: 5px;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.mp-sun-season-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(196, 163, 109, 0.4);
}

.mp-sun-season-btn.active {
  background: rgba(16, 185, 129, 0.2);
  border-color: #10b981;
  color: #34d399;
  font-weight: 700;
}

.mp-sun-compliance-badge {
  margin-top: 8px;
  padding: 5px 8px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 6px;
  color: #34d399;
  font-size: 9.5px;
  font-weight: 600;
  line-height: 1.4;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Card Điều Khiển Vùng Đệm Hiện Trạng Phụ Cận 30% (16:9 Widescreen) */
.mp-ws-context-dock-card {
  position: absolute;
  top: 60px;
  right: 68px;
  width: 310px;
  background: rgba(7, 16, 14, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(196, 163, 109, 0.45);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.05);
  z-index: 35;
  padding: 14px;
  box-sizing: border-box;
  animation: slide-down 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.mp-context-dock__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mp-context-dock__title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  color: #38bdf8;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.mp-context-dock__close {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 12px;
  cursor: pointer;
  padding: 2px 5px;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.mp-context-dock__close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.mp-context-ctrl-row {
  margin-bottom: 10px;
}

.mp-context-label-wrap {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #cbd5e1;
  margin-bottom: 5px;
}

.mp-context-slider {
  width: 100%;
  accent-color: #38bdf8;
  cursor: pointer;
}

.mp-context-btn-row {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  margin-bottom: 10px;
}

.mp-context-btn {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  font-size: 10px;
  font-weight: 600;
  padding: 6px 4px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.mp-context-btn.active,
.mp-context-btn:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
  color: #38bdf8;
}

.mp-context-compliance-badge {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
  font-size: 9.5px;
  font-weight: 600;
  padding: 6px 8px;
  border-radius: 6px;
  line-height: 1.4;
}

/* Bộ chuyển 3 chế độ bối cảnh: Vector / Vệ Tinh / Lai Ghép 50/50 */
.mp-context-mode-switch {
  display: flex;
  gap: 4px;
  background: rgba(0, 0, 0, 0.45);
  padding: 3px;
  border-radius: 8px;
  margin-bottom: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.mp-context-mode-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 9.5px;
  font-weight: 700;
  padding: 5px 4px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
}

.mp-context-mode-btn:hover {
  color: #f1f5f9;
  background: rgba(255, 255, 255, 0.06);
}

.mp-context-mode-btn.active {
  background: rgba(16, 185, 129, 0.25);
  color: #34d399;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(52, 211, 153, 0.4);
}

/* Nút vệ tinh trên thanh Dock phải */
#mpWsBtnSatBackdrop .dock-badge-text {
  font-size: 8px;
  font-weight: 800;
  color: #34d399;
  margin-left: 2px;
  letter-spacing: 0.5px;
}

#mpWsBtnSatBackdrop.active {
  background: rgba(16, 185, 129, 0.2);
  border-color: #10b981;
  color: #34d399;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.25);
}

/* Tương tác SVG nhãn sông ngòi, làng nghề, đường đối ngoại */
.mp-river-label-badge rect,
.mp-village-label-badge rect,
.mp-road-context-badge rect {
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6));
  transition: all 0.2s ease;
}

.mp-river-label-badge:hover rect {
  stroke: #38bdf8;
  stroke-width: 1.8px;
  fill: rgba(7, 16, 14, 0.98);
}

.mp-village-label-badge:hover rect {
  stroke: #f59e0b;
  stroke-width: 1.8px;
  fill: rgba(7, 16, 14, 0.98);
}

.mp-road-context-badge:hover rect {
  stroke: #ef4444;
  stroke-width: 1.8px;
  fill: rgba(7, 16, 14, 0.98);
}

/* Chế độ Toàn Cảnh Canvas (Zen Mode) */
.mp-workstation.is-zen-mode .mp-ws-body {
  grid-template-columns: 0px 1fr 0px;
  transition: grid-template-columns 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.mp-workstation.is-zen-mode .mp-ws-left-panel,
.mp-workstation.is-zen-mode .mp-ws-right-hud {
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
  padding: 0;
  border: none;
  width: 0;
  min-width: 0;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Micro-tooltips engine for canvas floating controls */
[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 115%;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  padding: 4px 8px;
  border-radius: 5px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(196, 163, 109, 0.4);
  color: #f1eee6;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 100;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6);
}

[data-tooltip]:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.mp-ws-right-tool-dock [data-tooltip]::after {
  bottom: auto;
  top: 50%;
  right: 125%;
  left: auto;
  transform: translateY(-50%) translateX(4px);
}
.mp-ws-right-tool-dock [data-tooltip]:hover::after {
  transform: translateY(-50%) translateX(0);
}

.mp-ws-left-tool-dock [data-tooltip]::after {
  bottom: auto;
  top: 50%;
  left: 110%;
  right: auto;
  transform: translateY(-50%) translateX(-4px);
}
.mp-ws-left-tool-dock [data-tooltip]:hover::after {
  transform: translateY(-50%) translateX(0);
}

/* ==========================================================================
   PILLARS 3, 5 & 6: CONTEXT CAPSULE, GHOST MODE & ENGINEERING HUD BAR
   ========================================================================== */

/* Ghost Mode: Làm mờ 25% các dock khi tương tác Canvas kéo rê / xoay 3D */
.mp-workstation.is-canvas-interacting .mp-ws-left-tool-dock,
.mp-workstation.is-canvas-interacting .mp-ws-right-tool-dock,
.mp-workstation.is-canvas-interacting .mp-ws-engineering-bar {
  opacity: 0.25;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.mp-ws-left-tool-dock,
.mp-ws-right-tool-dock,
.mp-ws-engineering-bar {
  transition: opacity 0.3s ease, width 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Floating Contextual Action Capsule (Pillar 3) */
.mp-ws-context-capsule {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(7, 16, 14, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(196, 163, 109, 0.55);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.06);
  border-radius: 24px;
  padding: 4px 6px;
  z-index: 45;
  pointer-events: auto;
  transform: translate(-50%, -100%) translateY(-12px);
  animation: capsule-pop 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  user-select: none;
  max-width: calc(100% - 24px);
  box-sizing: border-box;
}

@keyframes capsule-pop {
  from { opacity: 0; transform: translate(-50%, -100%) translateY(-2px) scale(0.92); }
  to { opacity: 1; transform: translate(-50%, -100%) translateY(-12px) scale(1); }
}

.mp-capsule-badge {
  background: linear-gradient(135deg, rgba(196, 163, 109, 0.3), rgba(180, 140, 72, 0.15));
  border: 1px solid rgba(196, 163, 109, 0.5);
  color: #fbbf24;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 14px;
  text-transform: uppercase;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mp-capsule-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 3px 9px;
  color: #e2e8f0;
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.mp-capsule-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(196, 163, 109, 0.45);
  transform: translateY(-1px);
}

.mp-capsule-btn.gold {
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.14);
}

.mp-capsule-btn.gold:hover {
  background: rgba(245, 158, 11, 0.28);
  border-color: #fbbf24;
}

.mp-capsule-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  color: #94a3b8;
  font-size: 10px;
  cursor: pointer;
  padding: 0;
  transition: all 0.15s ease;
  margin-left: 2px;
}

.mp-capsule-close:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
}

/* Engineering Status Bar (Pillar 6: Thanh Trắc Địa Kỹ Thuật) */
.mp-ws-engineering-bar {
  position: absolute;
  bottom: 8px;
  left: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(7, 16, 14, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(196, 163, 109, 0.38);
  border-radius: 6px;
  padding: 2px 10px;
  z-index: 20;
  font-size: 9.5px;
  color: #94a3b8;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  user-select: none;
  pointer-events: auto;
  width: auto;
  width: fit-content;
  max-width: calc(100% - 28px);
  box-sizing: border-box;
  white-space: nowrap;
}

@media (max-width: 1560px) {
  .mp-ws-engineering-bar .mp-eng-extra {
    display: none !important;
  }
}

.mp-eng-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.mp-eng-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.8);
  animation: pulse-eng-dot 2s infinite;
}

@keyframes pulse-eng-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.6; }
}

.mp-eng-item .lbl {
  color: #64748b;
  font-weight: 500;
}

.mp-eng-item b {
  color: #cbd5e1;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 9.5px;
  font-weight: 600;
}

.mp-eng-divider {
  width: 1px;
  height: 10px;
  background: rgba(255, 255, 255, 0.12);
}

/* Banner Cọ Vẽ Đang Hoạt Động (Brush Active Banner) */
.mp-ws-brush-banner {
  display: none;
  align-items: center;
  gap: 8px;
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(30, 41, 59, 0.95);
  border: 1px solid #38bdf8;
  border-radius: 20px;
  padding: 5px 16px;
  font-size: 11px;
  color: #f1eee6;
  z-index: 30;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  animation: slide-down 0.2s ease-out;
}

@keyframes slide-down {
  from { opacity: 0; transform: translate(-50%, -10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.mp-ws-brush-banner.is-active {
  display: inline-flex;
}

.mp-ws-brush-banner b {
  color: #38bdf8;
}

.mp-brush-btn-exit {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #ef4444;
  border-radius: 4px;
  font-size: 10px;
  padding: 1px 6px;
  cursor: pointer;
  margin-left: 4px;
}

.mp-brush-btn-exit:hover {
  background: rgba(239, 68, 68, 0.4);
}

/* Hiệu ứng Ô Đất Khi Kéo Thả Qua (Drag-Over Parcel Highlight) */
.mp-parcel-drag-over {
  stroke: #fbbf24 !important;
  stroke-width: 3.5px !important;
  stroke-dasharray: 6 3 !important;
  filter: drop-shadow(0 0 10px rgba(245, 158, 11, 0.85)) !important;
  animation: dash-move 0.8s linear infinite;
}

@keyframes dash-move {
  to { stroke-dashoffset: -18; }
}

/* Con trỏ cọ vẽ khi ở chế độ sơn */
.is-brush-mode svg {
  cursor: crosshair !important;
}

/* Khu vực Điều Chỉnh Tầng Cao & MĐXD trong Popover */
.mp-popover-controls-box {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 8px 10px;
  margin: 8px 0;
}

.mp-popover-ctrl-row {
  margin-bottom: 6px;
}

.mp-ctrl-label-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--mp-muted);
  margin-bottom: 2px;
}

.mp-ctrl-val {
  color: var(--mp-gold, #c4a36d);
  font-family: monospace;
  font-size: 11.5px;
}

.mp-popover-ctrl-row input[type="range"] {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.mp-popover-kpi-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.mp-kpi-pill {
  font-size: 10.5px;
  color: rgba(241, 238, 230, 0.7);
  background: rgba(255, 255, 255, 0.04);
  padding: 2px 6px;
  border-radius: 4px;
}

.mp-kpi-pill b {
  color: #38bdf8;
}

.mp-popover-btn-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mp-popover-btn-undo, .mp-popover-btn-batch {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--mp-cream, #f1eee6);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
}

.mp-popover-btn-undo:hover {
  background: rgba(245, 158, 11, 0.2);
  border-color: #f59e0b;
  color: #f59e0b;
}

.mp-popover-btn-batch:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
  color: #38bdf8;
}

/* ============================================================================
   AI KHỐI TÍCH 3D HƯỚNG HỒ & GIẶT CẤP BẬC THANG (LAKEFRONT STEPPED MASSING)
   ============================================================================ */

/* Nút Toggle trên Viewport Header */
#mpWsToggleSteppedMassing {
  border-color: rgba(56, 189, 248, 0.4);
  transition: all 0.2s ease;
}

#mpWsToggleSteppedMassing.is-active {
  background: rgba(56, 189, 248, 0.2) !important;
  border-color: #38bdf8 !important;
  color: #38bdf8 !important;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.35);
}

/* Card Điều Khiển Khối Tích AI Nổi Trong Canvas 3D */
.mp-ws-massing-dock-card {
  position: absolute;
  top: 16px;
  right: 68px;
  width: 290px;
  background: rgba(15, 23, 42, 0.94);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 10px;
  padding: 12px 14px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.55), 0 0 15px rgba(56, 189, 248, 0.15);
  backdrop-filter: blur(12px);
  z-index: 22;
  font-family: system-ui, -apple-system, sans-serif;
  color: var(--mp-cream, #f1eee6);
  animation: massing-card-fade 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes massing-card-fade {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.mp-massing-dock__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 8px;
  margin-bottom: 10px;
}

.mp-massing-dock__title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #38bdf8;
}

.mp-massing-dock__close {
  background: transparent;
  border: none;
  color: var(--mp-muted, #94a3b8);
  font-size: 12px;
  cursor: pointer;
  padding: 2px 5px;
  border-radius: 4px;
}

.mp-massing-dock__close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.mp-massing-mode-switch {
  display: flex;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 6px;
  padding: 3px;
  gap: 3px;
  margin-bottom: 10px;
}

.mp-massing-mode-btn {
  flex: 1;
  padding: 5px 8px;
  font-size: 10.5px;
  font-weight: 700;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--mp-muted, #94a3b8);
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.mp-massing-mode-btn.active {
  background: #38bdf8;
  color: #0f172a;
  box-shadow: 0 2px 8px rgba(56, 189, 248, 0.4);
}

.mp-massing-slider-row {
  margin-bottom: 10px;
}

.mp-massing-slider-label {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  color: var(--mp-muted, #94a3b8);
  margin-bottom: 4px;
}

.mp-massing-slider-val {
  color: var(--mp-gold, #c4a36d);
  font-family: monospace;
  font-weight: 700;
}

.mp-massing-slider-row input[type="range"] {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.mp-massing-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.mp-massing-stat-box {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 5px;
  padding: 6px 8px;
}

.mp-massing-stat-box .lbl {
  font-size: 9.5px;
  color: rgba(241, 238, 230, 0.6);
  display: block;
}

.mp-massing-stat-box .val {
  font-size: 11.5px;
  font-weight: 800;
  color: #38bdf8;
  font-family: monospace;
}

.mp-massing-stat-box.gold .val {
  color: var(--mp-gold, #c4a36d);
}

.mp-massing-stat-box.green .val {
  color: #34d399;
}

.mp-massing-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  font-size: 10px;
  color: #86efac;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 4px;
  padding: 3px 6px;
  width: 100%;
  justify-content: center;
  font-weight: 600;
}

/* ==========================================================================
   MODAL DIỄN HỌA Ý TƯỞNG AI 4K & PROMPTS ĐIỆN ẢNH 8K
   ========================================================================== */
.mp-ws-ai-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mp-ws-ai-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 11, 9, 0.85);
  backdrop-filter: blur(8px);
}

.mp-ws-ai-dialog {
  position: relative;
  width: 92vw;
  max-width: 1400px;
  height: 88vh;
  max-height: 900px;
  background: #081411;
  border: 1px solid rgba(196, 163, 109, 0.4);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(168, 85, 247, 0.15);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 1;
}

.mp-ws-ai-header {
  padding: 14px 24px;
  background: #0d1e19;
  border-bottom: 1px solid rgba(196, 163, 109, 0.25);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.mp-ws-ai-header-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mp-ws-ai-badge {
  font-size: 10px;
  font-weight: 700;
  color: #c084fc;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.mp-ws-ai-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #f1eee6;
}

.mp-ws-ai-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mp-ws-ai-btn-primary {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.25), rgba(139, 92, 246, 0.4));
  border: 1px solid rgba(168, 85, 247, 0.6);
  color: #e9d5ff;
  font-weight: 700;
  font-size: 12px;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.mp-ws-ai-btn-primary:hover {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.4), rgba(139, 92, 246, 0.6));
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.4);
}

.mp-ws-ai-btn-gold {
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.25), rgba(245, 158, 11, 0.4));
  border: 1px solid rgba(245, 158, 11, 0.6);
  color: #fef3c7;
  font-weight: 700;
  font-size: 12px;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.mp-ws-ai-btn-gold:hover {
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.4), rgba(245, 158, 11, 0.6));
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.4);
}

.mp-ws-ai-btn-close {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--mp-border, rgba(241, 238, 230, 0.15));
  color: var(--mp-muted, #94a3b8);
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.mp-ws-ai-btn-close:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.4);
}

.mp-ws-ai-body {
  flex: 1;
  padding: 18px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mp-ws-ai-intro-bar {
  background: rgba(168, 85, 247, 0.08);
  border: 1px solid rgba(168, 85, 247, 0.25);
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 12px;
  color: #e9d5ff;
  line-height: 1.5;
}

.mp-ws-ai-prompts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.teaser-prompt-card {
  background: #0b1915;
  border: 1px solid rgba(196, 163, 109, 0.2);
  border-radius: 10px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.2s, transform 0.2s;
}

.teaser-prompt-card:hover {
  border-color: rgba(196, 163, 109, 0.45);
  transform: translateY(-2px);
}

.teaser-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.teaser-card-tag {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: #c4a36d;
  background: rgba(196, 163, 109, 0.12);
  border: 1px solid rgba(196, 163, 109, 0.3);
  padding: 2px 8px;
  border-radius: 4px;
}

.teaser-card-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #f1eee6;
  flex: 1;
}

.teaser-prompt-meta {
  font-size: 11.5px;
  color: rgba(241, 238, 230, 0.7);
  line-height: 1.4;
}

.teaser-prompt-meta b {
  color: #38bdf8;
}

.teaser-prompt-desc {
  margin: 0;
  font-size: 12px;
  color: rgba(241, 238, 230, 0.85);
  line-height: 1.45;
}

.teaser-mj-box {
  background: #050b09;
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 6px;
  padding: 10px 12px;
}

.teaser-mj-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.teaser-mj-header .lbl {
  font-size: 10.5px;
  font-weight: 700;
  color: #c084fc;
}

.btn-copy-ai-prompt {
  background: rgba(168, 85, 247, 0.2);
  border: 1px solid rgba(168, 85, 247, 0.5);
  color: #e9d5ff;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-copy-ai-prompt:hover {
  background: rgba(168, 85, 247, 0.4);
}

.teaser-mj-code {
  margin: 0;
  font-family: 'JetBrains Mono', Consolas, monospace;
  font-size: 11px;
  color: #a7f3d0;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 90px;
  overflow-y: auto;
}

.teaser-sd-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 8px 10px;
}

.teaser-sd-box .lbl {
  font-size: 10px;
  font-weight: 600;
  color: rgba(241, 238, 230, 0.5);
  display: block;
  margin-bottom: 4px;
}

.teaser-sd-text {
  font-size: 11px;
  color: rgba(241, 238, 230, 0.8);
  font-family: monospace;
}

.teaser-tools-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding-top: 4px;
}

.teaser-tools-row .lbl {
  font-size: 10.5px;
  color: rgba(241, 238, 230, 0.6);
}

.teaser-tool-pill {
  font-size: 9.5px;
  font-weight: 700;
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 2px 6px;
  border-radius: 4px;
}

/* ==========================================================================
   FLOATING HUD CARD: MÔ PHỎNG VI KHÍ HẬU 3D, NẮNG & GIÓ (QCVN 04 & LAWSON)
   ========================================================================== */
.mp-ws-microclimate-dock-card {
  position: absolute;
  top: 16px;
  left: 80px;
  width: 320px;
  background: rgba(10, 19, 26, 0.95);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.65), 0 0 20px rgba(245, 158, 11, 0.15);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 25;
  font-family: system-ui, -apple-system, sans-serif;
  color: var(--mp-cream, #f1eee6);
  animation: microclimate-card-fade 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes microclimate-card-fade {
  from { opacity: 0; transform: translateY(-8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.mp-microclimate-dock__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(245, 158, 11, 0.2);
  padding-bottom: 8px;
  margin-bottom: 10px;
}

.mp-microclimate-dock__title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #fbbf24;
}

.mp-microclimate-dock__close {
  background: transparent;
  border: none;
  color: var(--mp-muted, #94a3b8);
  font-size: 13px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
}

.mp-microclimate-dock__close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.mp-microclimate-ctrl-group {
  margin-bottom: 10px;
}

.mp-microclimate-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  margin-bottom: 4px;
  color: rgba(241, 238, 230, 0.85);
}

.mp-microclimate-val-badge {
  font-weight: 700;
  color: #fbbf24;
  font-family: monospace;
}

.mp-microclimate-slider {
  width: 100%;
  accent-color: #f59e0b;
  cursor: pointer;
}

.mp-microclimate-btn-row {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.mp-microclimate-btn {
  flex: 1;
  padding: 5px 8px;
  font-size: 10.5px;
  font-weight: 700;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.mp-microclimate-btn.active {
  background: rgba(245, 158, 11, 0.22);
  border-color: rgba(245, 158, 11, 0.6);
  color: #fbbf24;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.2);
}

.mp-microclimate-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 10px;
}

.mp-microclimate-stat-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
}

.mp-microclimate-stat-box .lbl {
  font-size: 9.5px;
  color: rgba(241, 238, 230, 0.55);
  margin-bottom: 2px;
}

.mp-microclimate-stat-box .val {
  font-size: 11.5px;
  font-weight: 800;
  color: #f1eee6;
  font-family: monospace;
}

.mp-microclimate-stat-box.cyan .val { color: #06b6d4; }
.mp-microclimate-stat-box.green .val { color: #10b981; }
.mp-microclimate-stat-box.amber .val { color: #f59e0b; }

.mp-microclimate-footer-pill {
  font-size: 10px;
  text-align: center;
  padding: 5px 8px;
  border-radius: 6px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
  font-weight: 600;
}

/* ==========================================================================
   CSS CHO THỦY LỰC THOÁT NƯỚC & BỘ BẢN VẼ TRÌNH KÝ A0/A1
   ========================================================================== */
.mp-storm-scenario-btn {
  transition: all 0.2s ease;
}
.mp-storm-scenario-btn:hover {
  background: rgba(56, 189, 248, 0.15) !important;
  color: #38bdf8 !important;
  border-color: rgba(56, 189, 248, 0.5) !important;
}

.mp-stat-tab-btn {
  background: #1e293b;
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}
.mp-stat-tab-btn:hover {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.5);
}
.mp-stat-tab-btn.active {
  background: #0284c7;
  color: #ffffff;
  border-color: #38bdf8;
  box-shadow: 0 0 12px rgba(2, 132, 199, 0.4);
}

#mpWsStatutoryDrawingCanvasWrap svg {
  max-width: 100%;
  height: auto;
  display: block;
}

#mpWsToggleSasakiStyle.is-active {
  background: rgba(16, 185, 129, 0.2) !important;
  color: #34d399 !important;
  border-color: #10b981 !important;
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.4) !important;
}

/* Tab buttons & layout cho Hướng B & C */
.mp-unitmix-btn {
  padding: 5px 12px;
  font-size: 11.5px;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #1e293b;
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.mp-unitmix-btn:hover {
  color: #f8fafc;
  border-color: rgba(96, 165, 250, 0.5);
}
.mp-unitmix-btn.active {
  background: #2563eb;
  color: #ffffff;
  border-color: #60a5fa;
  box-shadow: 0 0 10px rgba(96, 165, 250, 0.35);
}

.mp-traffic-tab-btn {
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #1e293b;
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.mp-traffic-tab-btn:hover {
  color: #f8fafc;
  border-color: rgba(244, 114, 182, 0.5);
}
.mp-traffic-tab-btn.active {
  background: #db2777;
  color: #ffffff;
  border-color: #f472b6;
  box-shadow: 0 0 12px rgba(244, 114, 182, 0.35);
}

.mp-state-tab-btn {
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #1e293b;
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.mp-state-tab-btn:hover {
  color: #f8fafc;
  border-color: rgba(251, 191, 36, 0.5);
}
.mp-state-tab-btn.active {
  background: #d97706;
  color: #ffffff;
  border-color: #fbbf24;
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.35);
}

/* Định dạng Thể thức Văn bản Hành chính Nhà nước (Nghị định 30/2020/NĐ-CP) */
.mp-state-doc {
  font-family: 'Times New Roman', Times, serif;
  font-size: 14pt;
  line-height: 1.45;
  color: #0f172a;
}
.mp-doc-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 12pt;
}
.mp-doc-table th,
.mp-doc-table td {
  border: 1px solid #334155;
  padding: 6px 10px;
}
.mp-doc-table th {
  background: #f1f5f9;
  font-weight: bold;
  text-align: center;
}

/* ==========================================================================
   TÍCH HỢP 3 CỘT: LEFT PANEL TOOLS & RIGHT HUD PRO FORMA DOCK
   ========================================================================== */

/* 1. Bộ Công Cụ & Bảng Phân Khu Tích Hợp Khung Bên Trái */
.mp-ws-left-panel .mp-ws-left-tool-dock {
  position: static;
  width: 100%;
  bottom: auto;
  left: auto;
  top: auto;
  gap: 10px;
  pointer-events: auto;
  box-shadow: none;
}

.mp-ws-left-panel .mp-ws-tool-panel {
  background: var(--mp-surface-2);
  border: 1px solid var(--mp-border);
  border-radius: 8px;
  box-shadow: none;
  padding: 8px;
  gap: 3px;
}

.mp-ws-left-panel .mp-ws-dock-title {
  display: none !important;
  padding: 3px 6px 5px 6px;
  margin-bottom: 4px;
}

.mp-ws-left-panel .mp-ws-dock-btn {
  padding: 6px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.mp-ws-left-panel .mp-ws-dock-btn:hover {
  background: rgba(196, 163, 109, 0.12);
  border-color: rgba(196, 163, 109, 0.4);
  color: #fff;
}

.mp-ws-left-panel .mp-ws-dock-btn.active,
.mp-ws-left-panel .mp-ws-dock-btn.is-active {
  background: rgba(196, 163, 109, 0.18);
  border-color: var(--mp-gold);
  color: #fff;
}

.mp-ws-left-panel .mp-ws-zoning-palette-bar {
  background: var(--mp-surface-2);
  border: 1px solid var(--mp-border);
  border-radius: 8px;
  box-shadow: none;
  padding: 8px;
  width: 100%;
  box-sizing: border-box;
}

.mp-ws-left-panel .mp-palette-chips-wrap.vertical {
  max-height: 230px;
}

/* 2. Live Pro Forma Dock Tích Hợp Khung Bên Phải */
.mp-ws-right-hud .mp-ws-proforma-dock {
  position: static;
  bottom: auto;
  left: auto;
  transform: none;
  max-width: 100%;
  width: 100%;
  border-radius: 8px;
  border: 1px solid rgba(196, 163, 109, 0.35);
  background: rgba(0, 0, 0, 0.28);
  box-shadow: none;
  margin: 6px 0;
  box-sizing: border-box;
}

.mp-ws-right-hud .mp-proforma-dock__header {
  padding: 7px 10px;
  border-radius: 7px 7px 0 0;
  flex-wrap: wrap;
  gap: 8px;
}

.mp-ws-right-hud .mp-proforma-dock__body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  padding: 8px 10px;
}

.mp-ws-right-hud .mp-proforma-dock__body .mp-proforma-divider {
  display: none;
}

.mp-ws-right-hud .mp-proforma-dock__body .mp-proforma-stat {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  padding: 6px 8px;
  min-width: 0;
}

.mp-ws-right-hud .mp-proforma-dock__body .mp-proforma-stat:last-child {
  grid-column: span 2;
}

/* 3. Tối Giản Thanh Cuộn Toàn Bộ Bảng Điều Khiển (Ultra-Thin 2.5px Minimal Scrollbars) */
* {
  scrollbar-width: thin !important;
  scrollbar-color: rgba(196, 163, 109, 0.22) transparent !important;
}

::-webkit-scrollbar {
  width: 2.5px !important;
  height: 2.5px !important;
}

::-webkit-scrollbar-track {
  background: transparent !important;
}

::-webkit-scrollbar-thumb {
  background: rgba(196, 163, 109, 0.22) !important;
  border-radius: 99px !important;
  transition: background 0.2s ease !important;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(196, 163, 109, 0.65) !important;
}

::-webkit-scrollbar-corner {
  background: transparent !important;
}

/* ============================================================================
   MULTI-SCHEME GENERATIVE MASTERPLAN ENGINE (BỘ 5 PHƯƠNG ÁN SƠ ĐỒ QUY HOẠCH)
   ============================================================================ */

/* 1. Quick Morphing Schemes Selector in Left Sidebar */
.mp-ws-schemes-capsule {
  position: relative;
  width: 100%;
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(168, 85, 247, 0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(168, 85, 247, 0.4);
  border-radius: 8px;
  padding: 8px 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45), inset 0 0 12px rgba(168, 85, 247, 0.06);
  pointer-events: auto;
  user-select: none;
  transition: all 0.25s ease;
  box-sizing: border-box;
}

.mp-ws-schemes-capsule:hover {
  border-color: rgba(168, 85, 247, 0.7);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.55), 0 0 14px rgba(168, 85, 247, 0.25);
}

.mp-schemes-capsule-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding-bottom: 2px;
}

.mp-schemes-capsule-label {
  font-size: 11px;
  font-weight: 800;
  color: #c084fc;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 4px;
}

.mp-schemes-capsule-badge {
  font-size: 9px;
  font-weight: 800;
  color: #d8b4fe;
  background: rgba(168, 85, 247, 0.25);
  border: 1px solid rgba(168, 85, 247, 0.45);
  border-radius: 9999px;
  padding: 1px 7px;
  letter-spacing: 0.4px;
}

.mp-schemes-pill-list {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 5px !important;
  width: 100% !important;
}

.mp-scheme-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 8px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap !important;
  text-align: left;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: inherit;
  width: 100%;
  box-sizing: border-box;
}

.mp-scheme-pill .pill-code {
  font-family: monospace;
  font-size: 9.5px;
  font-weight: 800;
  color: #c084fc;
  background: rgba(168, 85, 247, 0.2);
  border: 1px solid rgba(168, 85, 247, 0.4);
  border-radius: 4px;
  padding: 1px 5px;
  flex-shrink: 0;
}

.mp-scheme-pill:hover {
  background: rgba(168, 85, 247, 0.2);
  border-color: rgba(168, 85, 247, 0.6);
  color: #ffffff;
  transform: translateX(2px);
}

.mp-scheme-pill.active {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.4), rgba(168, 85, 247, 0.45));
  border-color: #c084fc;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(168, 85, 247, 0.35);
}

.mp-scheme-pill.active .pill-code {
  background: #a855f7;
  color: #ffffff;
  border-color: #c084fc;
}

/* 2. Viewport Schemes Tab Container & Gallery */
.mp-ws-schemes-wrap {
  width: 100%;
  height: 100%;
  overflow-y: auto;
}

.mp-schemes-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.mp-schemes-gallery-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(168, 85, 247, 0.25);
  border-radius: 12px;
  padding: 20px 24px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.mp-schemes-header-left {
  flex: 1;
  min-width: 300px;
}

.mp-schemes-badge-head {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #c084fc;
  background: rgba(168, 85, 247, 0.16);
  border: 1px solid rgba(168, 85, 247, 0.35);
  padding: 3px 10px;
  border-radius: 9999px;
  margin-bottom: 8px;
}

.mp-schemes-title {
  font-size: 20px;
  font-weight: 800;
  color: #f8fafc;
  margin: 0 0 6px 0;
  line-height: 1.3;
}

.mp-schemes-desc {
  font-size: 12.5px;
  color: #94a3b8;
  margin: 0;
  line-height: 1.5;
  max-width: 900px;
}

/* 3. Responsive Cards Grid */
.mp-schemes-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

@media (min-width: 1400px) {
  .mp-schemes-cards-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

.mp-scheme-card {
  background: rgba(13, 21, 32, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  position: relative;
}

.mp-scheme-card:hover {
  border-color: rgba(168, 85, 247, 0.5);
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45), 0 0 18px rgba(168, 85, 247, 0.2);
}

.mp-scheme-card.is-active {
  border-color: #34d399;
  background: rgba(13, 26, 30, 0.95);
  box-shadow: 0 0 24px rgba(52, 211, 153, 0.25), 0 8px 24px rgba(0, 0, 0, 0.45);
}

.mp-scheme-card-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mp-scheme-badge-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.mp-scheme-badge-pill {
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 6px;
}

.mp-scheme-archetype-tag {
  font-size: 10px;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.mp-scheme-active-tag {
  font-size: 10px;
  font-weight: 800;
  color: #34d399;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(52, 211, 153, 0.4);
  padding: 2px 8px;
  border-radius: 9999px;
  margin-left: auto;
}

.mp-scheme-name {
  font-size: 15px;
  font-weight: 800;
  color: #f8fafc;
  margin: 0;
  line-height: 1.3;
}

.mp-scheme-en-name {
  font-size: 11px;
  color: #64748b;
  font-style: italic;
}

.mp-scheme-tagline {
  font-size: 11.5px;
  color: #94a3b8;
  margin: 2px 0 0 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mp-scheme-thumb-wrap {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #09141c;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.5);
}

.mp-scheme-svg-map {
  width: 100%;
  height: auto;
  display: block;
}

/* 4. Mini KPI Grid inside Card */
.mp-scheme-kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.mp-scheme-kpi-box {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mp-scheme-kpi-box .lbl {
  font-size: 10px;
  color: #64748b;
  font-weight: 600;
}

.mp-scheme-kpi-box .val {
  font-size: 11.5px;
  font-weight: 700;
  color: #f1eee6;
}

.mp-scheme-kpi-box .val.gold { color: #fbbf24; }
.mp-scheme-kpi-box .val.cyan { color: #38bdf8; }
.mp-scheme-kpi-box .val.green { color: #34d399; }
.mp-scheme-kpi-box .val.purple { color: #c084fc; }
.mp-scheme-kpi-box .val.emerald { color: #10b981; }

.mp-scheme-highlights {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  color: #cbd5e1;
  flex: 1;
}

.mp-scheme-hl-item {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  line-height: 1.35;
}

.mp-scheme-card-footer {
  margin-top: auto;
  padding-top: 6px;
}

.mp-btn-apply-scheme {
  width: 100%;
  background: linear-gradient(135deg, #1e293b, #334155);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #f8fafc;
  font-size: 11.5px;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
  transition: all 0.2s ease;
}

.mp-btn-apply-scheme:hover {
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  border-color: #c084fc;
  box-shadow: 0 4px 14px rgba(168, 85, 247, 0.4);
  transform: translateY(-1px);
}

/* 5. Comparison Matrix Section */
.mp-schemes-table-section {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(168, 85, 247, 0.25);
  border-radius: 12px;
  padding: 20px 24px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.mp-schemes-table-title {
  font-size: 16px;
  font-weight: 800;
  color: #f8fafc;
  margin: 0 0 14px 0;
}

.mp-schemes-table-wrap {
  overflow-x: auto;
}

.mp-schemes-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.mp-schemes-table th {
  background: rgba(168, 85, 247, 0.12);
  color: #c084fc;
  font-weight: 700;
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(168, 85, 247, 0.25);
  white-space: nowrap;
}

.mp-schemes-table td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
}

.mp-schemes-table tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

.mp-schemes-table tr.is-selected td {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(52, 211, 153, 0.2);
}

.mp-pattern-badge {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 10.5px;
  text-transform: uppercase;
  color: #94a3b8;
}

.mp-pill-xs {
  background: #10b981;
  color: #07100e;
  font-size: 9px;
  font-weight: 900;
  padding: 1px 5px;
  border-radius: 4px;
}

.mp-btn-apply-mini {
  background: rgba(168, 85, 247, 0.2);
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: #c084fc;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
}

.mp-btn-apply-mini:hover {
  background: #a855f7;
  color: #ffffff;
}

/* ==========================================================================
   INTERACTIVE MICRO-SUBDIVISION HUD (ZOOM-IN CẤP 2 CHO Ô ĐẤT 1/500)
   ========================================================================== */
.mp-ws-micro-subdiv-hud {
  position: absolute;
  top: 54px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(7, 16, 14, 0.95);
  border: 1px solid rgba(234, 179, 8, 0.7);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  padding: 8px 16px;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 11.5px;
  color: #f1eee6;
  z-index: 35;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.85), 0 0 18px rgba(234, 179, 8, 0.25);
  animation: mpFadeInDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
  max-width: calc(100% - 32px);
}

.mp-micro-hud-top {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
}

.mp-micro-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(234, 179, 8, 0.2);
  border: 1px solid #eab308;
  color: #fef08a;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 14px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  white-space: nowrap;
}

.mp-micro-title {
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  font-size: 12px;
}

.mp-micro-stats-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 3px 12px;
  border-radius: 14px;
  font-size: 11px;
  white-space: nowrap;
}

.mp-micro-stats-pill span {
  color: #94a3b8;
}

.mp-micro-stats-pill b {
  color: #fbbf24;
  margin-left: 2px;
}

.mp-micro-type-group {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(0, 0, 0, 0.4);
  padding: 2px 3px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.mp-micro-btn-type {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 10.5px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.18s ease;
  font-family: inherit;
  white-space: nowrap;
}

.mp-micro-btn-type:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.mp-micro-btn-type.is-active {
  background: #eab308;
  color: #07100e;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(234, 179, 8, 0.4);
}

.mp-micro-btn-exit {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid #ef4444;
  color: #fca5a5;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: inherit;
  margin-left: auto;
}

.mp-micro-btn-exit:hover {
  background: #ef4444;
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(239, 68, 68, 0.5);
}

/* Hàng thứ 2: Parametric Sliders & Action Buttons */
.mp-micro-hud-bottom {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  font-size: 11px;
}

.mp-micro-slider-item {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.mp-micro-slider-item label {
  color: #94a3b8;
  font-size: 10.5px;
  font-weight: 500;
}

.mp-micro-slider-item input[type="range"] {
  width: 76px;
  height: 4px;
  accent-color: #eab308;
  cursor: pointer;
  vertical-align: middle;
}

.mp-micro-slider-val {
  color: #fbbf24;
  font-weight: 700;
  min-width: 36px;
  font-size: 11px;
  font-family: monospace;
}

.mp-micro-btn-dxf {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  border: 1px solid #38bdf8;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: inherit;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.35);
  margin-left: auto;
}

.mp-micro-btn-dxf:hover {
  background: linear-gradient(135deg, #0369a1, #0284c7);
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.5);
  transform: translateY(-1px);
}

.mp-micro-btn-reset {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #cbd5e1;
  font-size: 10.5px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
  font-family: inherit;
}

.mp-micro-btn-reset:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

/* Lớp vẽ phủ Micro-subdivision trên SVG */
.mp-micro-sublot {
  cursor: pointer;
  transition: all 0.15s ease;
}

.mp-micro-sublot:hover polygon {
  filter: drop-shadow(0 0 5px rgba(234, 179, 8, 0.9));
  stroke: #ffffff !important;
  stroke-width: 1.5 !important;
}

.mp-micro-sublot text {
  pointer-events: none;
  user-select: none;
}

/* Tự động neo gọn Wally AI Assistant tránh che khuất Cột Phải (Bảng Cân Bằng Đất & Donut Chart) */
body.has-mp-workstation .wally-chat,
body:has(.mp-workstation) .wally-chat,
.mp-workstation ~ .wally-chat {
  right: 386px !important;
  bottom: 24px !important;
  transition: right 0.3s ease, bottom 0.3s ease;
}

@media (max-width: 1400px) {
  body.has-mp-workstation .wally-chat,
  body:has(.mp-workstation) .wally-chat,
  .mp-workstation ~ .wally-chat {
    right: 326px !important;
    bottom: 24px !important;
  }
}

@media (max-width: 1180px) {
  body.has-mp-workstation .wally-chat,
  body:has(.mp-workstation) .wally-chat,
  .mp-workstation ~ .wally-chat {
    right: 24px !important;
    bottom: 24px !important;
  }
}

/* ==========================================================================
   CADASTRAL DEED MODAL (THÔNG TƯ 25/2014 & TT 02/2023/TT-BTNMT)
   ========================================================================== */
.mp-cadastral-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(3, 8, 7, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

.mp-cadastral-modal-card {
  background: #08110f;
  border: 1px solid rgba(196, 163, 109, 0.45);
  border-radius: 12px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.95), 0 0 28px rgba(196, 163, 109, 0.25);
  width: 100%;
  max-width: 980px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: Inter, system-ui, -apple-system, sans-serif;
  color: #f1eee6;
  box-sizing: border-box;
}

.mp-cadastral-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(196, 163, 109, 0.25);
  background: rgba(12, 24, 21, 0.95);
}

.mp-cadastral-badge {
  background: rgba(196, 163, 109, 0.2);
  color: var(--gold, #c4a36d);
  border: 1px solid rgba(196, 163, 109, 0.5);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.4px;
}

.mp-cadastral-modal-title {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.5px;
}

.mp-cadastral-corner-tag {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  border: 1px solid #38bdf8;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 9.5px;
  font-weight: 700;
}

.mp-cadastral-close-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #94a3b8;
  border-radius: 6px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mp-cadastral-close-btn:hover {
  color: #ffffff;
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.2);
}

.mp-cadastral-modal-body {
  display: flex;
  gap: 16px;
  padding: 16px;
  overflow-y: auto;
  flex: 1;
}

.mp-cadastral-col-svg {
  flex: 1.2;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mp-cadastral-svg-container {
  background: #050a09;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mp-cadastral-svg-container svg {
  max-width: 100%;
  height: auto;
}

.mp-cadastral-legal-notice {
  font-size: 11px;
  line-height: 1.45;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 8px 12px;
}

.mp-cadastral-legal-notice b {
  color: var(--gold, #c4a36d);
}

.mp-cadastral-col-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mp-cadastral-card-section {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 12px;
}

.mp-cadastral-section-title {
  margin: 0 0 10px 0;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--gold, #c4a36d);
  letter-spacing: 0.3px;
}

.mp-cadastral-specs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
  font-size: 11px;
}

.mp-cadastral-spec-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mp-cadastral-spec-item .lbl {
  color: #94a3b8;
  font-size: 10px;
}

.mp-cadastral-spec-item .val {
  color: #f1eee6;
  font-weight: 600;
}

.mp-cadastral-spec-item .val.highlight {
  color: #8aff68;
  font-weight: 700;
}

.mp-cadastral-spec-item .val.highlight-orange {
  color: #fb923c;
  font-weight: 700;
}

.mp-cadastral-table-scroll {
  overflow-y: auto;
  max-height: 230px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  background: #050a09;
}

.mp-cadastral-coords-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 10.5px;
}

.mp-cadastral-coords-table th {
  position: sticky;
  top: 0;
  background: #0f1c19;
  color: #cbd5e1;
  padding: 6px 8px;
  text-align: left;
  font-size: 10px;
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mp-cadastral-modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(12, 24, 21, 0.95);
  flex-wrap: wrap;
  gap: 8px;
}

.mp-btn-cadastral {
  padding: 6px 13px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.mp-btn-cadastral.primary {
  background: linear-gradient(135deg, #c4a36d, #9c7b44);
  color: #050a09;
  border: none;
}

.mp-btn-cadastral.primary:hover {
  filter: brightness(1.15);
  box-shadow: 0 0 10px rgba(196, 163, 109, 0.4);
}

.mp-btn-cadastral.secondary {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
}

.mp-btn-cadastral.secondary:hover {
  background: rgba(56, 189, 248, 0.25);
  border-color: #38bdf8;
}

.mp-btn-cadastral.outline {
  background: rgba(255, 255, 255, 0.05);
  color: #f1eee6;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.mp-btn-cadastral.outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
}

.mp-btn-cadastral.text {
  background: transparent;
  color: #94a3b8;
  border: none;
}

.mp-btn-cadastral.text:hover {
  color: #ef4444;
}

@media (max-width: 820px) {
  .mp-cadastral-modal-body {
    flex-direction: column;
  }
}

/* ==========================================================================
   QUY HOẠCH 1/2000 NỀN: MODAL ĐỐI CHIẾU LAYER, DRAG & DROP & BENCHMARK HUB
   ========================================================================== */
.mp-12000-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 9, 14, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: mpFadeIn 0.2s ease-out;
}

.mp-12000-modal-card {
  background: linear-gradient(180deg, #0b151f 0%, #070e15 100%);
  border: 1px solid rgba(56, 189, 248, 0.35);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.8), 0 0 32px rgba(56, 189, 248, 0.15);
  border-radius: 12px;
  width: 1040px;
  max-width: 96vw;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.mp-12000-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: rgba(15, 23, 42, 0.85);
  border-bottom: 1px solid rgba(56, 189, 248, 0.2);
}

.mp-12000-modal-title {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  color: #f1eee6;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mp-12000-modal-tabs {
  display: flex;
  background: rgba(2, 6, 23, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0 16px;
  gap: 4px;
}

.mp-12000-tab-btn {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: #94a3b8;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 10px 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s;
}

.mp-12000-tab-btn:hover {
  color: #f1eee6;
  background: rgba(255, 255, 255, 0.03);
}

.mp-12000-tab-btn.active {
  color: #38bdf8;
  border-bottom-color: #38bdf8;
  background: rgba(56, 189, 248, 0.08);
}

.mp-12000-modal-body {
  display: flex;
  flex: 1;
  overflow-y: auto;
  gap: 16px;
  padding: 16px 20px;
}

.mp-12000-col-preview {
  flex: 1.1;
  display: flex;
  flex-direction: column;
  background: rgba(2, 6, 23, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 12px;
  min-height: 360px;
}

.mp-12000-col-controls {
  flex: 0.9;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mp-12000-stats-card {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 12px 14px;
}

.mp-12000-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  padding: 4px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
}

.mp-12000-stat-row:last-child {
  border-bottom: none;
}

.mp-12000-stat-row .lbl {
  color: #94a3b8;
}

.mp-12000-stat-row .val {
  color: #f8fafc;
  font-weight: 700;
  font-family: monospace;
}

.mp-12000-stat-row .val.highlight {
  color: #38bdf8;
}

.mp-12000-mapping-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
}

.mp-12000-mapping-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  align-items: center;
  gap: 8px;
  font-size: 11px;
}

.mp-12000-mapping-row label {
  color: #cbd5e1;
  font-weight: 600;
}

.mp-12000-mapping-row select {
  background: #0f172a;
  border: 1px solid #334155;
  color: #e2e8f0;
  padding: 5px 8px;
  border-radius: 4px;
  font-size: 11px;
  outline: none;
}

.mp-12000-mapping-row select:focus {
  border-color: #38bdf8;
}

.mp-12000-checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: #cbd5e1;
  cursor: pointer;
  margin-top: 4px;
}

.mp-12000-modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: rgba(15, 23, 42, 0.95);
  border-top: 1px solid rgba(56, 189, 248, 0.2);
}

.mp-ws-drop-overlay {
  position: absolute;
  inset: 0;
  background: rgba(2, 132, 199, 0.88);
  border: 3px dashed #ffffff;
  border-radius: 8px;
  z-index: 999;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  pointer-events: none;
  backdrop-filter: blur(4px);
  animation: mpPulse 1.5s infinite;
}

.mp-ws-drop-overlay.is-active {
  display: flex;
}

/* Tab 2: Thư Viện 25 Đồ Án Mẫu 1/2000 */
.mp-12000-pills-bar {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.mp-12000-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.mp-12000-pill:hover {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.4);
}

.mp-12000-pill.active {
  background: #0284c7;
  color: #ffffff;
  border-color: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

.mp-12000-lib-search {
  width: 100%;
  background: #09121d;
  border: 1px solid #1e293b;
  border-radius: 6px;
  color: #e2e8f0;
  padding: 6px 10px;
  font-size: 11.5px;
  margin-bottom: 10px;
  outline: none;
}

.mp-12000-lib-search:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

.mp-12000-lib-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 4px;
}

.mp-12000-lib-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.mp-12000-lib-card:hover {
  background: rgba(30, 41, 59, 0.9);
  border-color: rgba(56, 189, 248, 0.5);
  transform: translateY(-1px);
}

.mp-12000-lib-card.active {
  background: rgba(14, 116, 144, 0.25);
  border-color: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
}

.mp-12000-region-tag {
  font-size: 9.5px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.mp-12000-region-tag.north {
  background: rgba(56, 189, 248, 0.18);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
}

.mp-12000-region-tag.central {
  background: rgba(245, 158, 11, 0.18);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.mp-12000-region-tag.south {
  background: rgba(16, 185, 129, 0.18);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

/* Tab 3: AI Vision Scanner & Nắn Ảnh Georeferencing */
.mp-12000-scan-dropzone {
  border: 2px dashed rgba(56, 189, 248, 0.4);
  background: rgba(2, 6, 23, 0.4);
  border-radius: 8px;
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.mp-12000-scan-dropzone:hover {
  background: rgba(56, 189, 248, 0.08);
  border-color: #38bdf8;
}

.mp-12000-scan-dropzone.has-file {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.06);
}

.mp-12000-affine-panel {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 8px;
  padding: 10px 12px;
}

.mp-12000-metric-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  font-family: monospace;
}

.mp-12000-metric-pill.success {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.mp-12000-metric-pill.info {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.mp-12000-ocr-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 10.5px;
  margin-top: 6px;
}

.mp-12000-ocr-table th {
  background: rgba(30, 41, 59, 0.8);
  color: #94a3b8;
  font-weight: 700;
  padding: 5px 8px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mp-12000-ocr-table td {
  padding: 5px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
}

.mp-12000-ocr-table tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

.mp-12000-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #38bdf8;
  animation: mpSpin 0.8s linear infinite;
}

@keyframes mpSpin {
  to { transform: rotate(360deg); }
}

/* ============================================================================
   L.A.C.I v4.0 — PROFESSIONAL PLANNING WORKSTATION STYLES
   CAD/GIS Measurement, Property Legal Inspector, Scenario A/B Delta Engine
   ============================================================================ */

/* 1. CAD Measurement & Snap Floating Toolbar */
.mp-ws-cad-toolbar {
  position: absolute;
  top: 12px;
  left: 18px;
  right: auto;
  max-width: calc(100% - 36px);
  overflow-x: auto;
  scrollbar-width: none;
  background: rgba(11, 21, 19, 0.94);
  border: 1px solid rgba(196, 163, 109, 0.45);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 5px 12px;
  border-radius: 24px;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 24;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.65);
  user-select: none;
}

.mp-cad-tool-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--mp-muted, #94a3b8);
  padding: 5px 10px;
  border-radius: 14px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.mp-cad-tool-btn:hover {
  background: rgba(196, 163, 109, 0.2);
  border-color: rgba(196, 163, 109, 0.5);
  color: var(--mp-cream, #f1eee6);
}

.mp-cad-tool-btn.active {
  background: rgba(16, 185, 129, 0.25);
  border-color: #10b981;
  color: #34d399;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.35);
}

.mp-cad-tool-btn.snap-on {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
  color: #38bdf8;
}

.mp-cad-divider {
  width: 1px;
  height: 18px;
  background: rgba(255, 255, 255, 0.15);
  margin: 0 2px;
}

/* CAD Measurement SVG Overlay */
#mpWsMeasurementOverlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 20;
}

/* 2. Property & Legal Inspector Panel */
.mp-ws-inspector-panel {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 380px;
  max-width: calc(100% - 28px);
  max-height: calc(100% - 28px);
  background: rgba(11, 21, 19, 0.96);
  border: 1px solid rgba(196, 163, 109, 0.4);
  border-radius: 12px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.75), 0 0 15px rgba(196, 163, 109, 0.15);
  z-index: 30;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: mpSlideInRight 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes mpSlideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

.mp-inspector-empty {
  padding: 30px 20px;
  text-align: center;
}

.mp-inspector-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.mp-inspector-header {
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mp-inspector-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mp-inspector-type-badge {
  font-size: 10px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  padding: 2px 6px;
  border-radius: 4px;
}

.mp-inspector-status-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 10px;
  letter-spacing: 0.04em;
}

.mp-inspector-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mp-inspector-tab {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--mp-muted, #94a3b8);
  padding: 9px 8px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.mp-inspector-tab:hover {
  color: #f1eee6;
  background: rgba(255, 255, 255, 0.04);
}

.mp-inspector-tab.active {
  color: var(--mp-gold, #c4a36d);
  border-bottom-color: var(--mp-gold, #c4a36d);
  background: rgba(196, 163, 109, 0.1);
}

.mp-inspector-body {
  padding: 12px 14px;
  overflow-y: auto;
  flex: 1;
  max-height: 480px;
}

.mp-inspector-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
}

.mp-inspector-table tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mp-inspector-table tr:last-child {
  border-bottom: none;
}

.mp-inspector-table td {
  padding: 7px 4px;
}

.mp-inspector-table td.lbl {
  color: var(--mp-muted, #94a3b8);
  width: 48%;
}

.mp-inspector-table td.val {
  color: #f1eee6;
  text-align: right;
}

.mp-inspector-legal-summary {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
}

.mp-inspector-prog-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

.mp-inspector-prog-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
}

.mp-inspector-audit-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mp-inspector-audit-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px;
  transition: border-color 0.2s;
}

.mp-inspector-audit-card.pass {
  border-left: 3px solid #10b981;
}

.mp-inspector-audit-card.warning {
  border-left: 3px solid #f59e0b;
}

.mp-inspector-audit-card.fail {
  border-left: 3px solid #ef4444;
}

.mp-audit-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.mp-audit-badge {
  font-size: 9px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid;
  letter-spacing: 0.05em;
}

.mp-audit-cite {
  font-size: 10.5px;
  color: var(--mp-muted, #94a3b8);
  margin-bottom: 6px;
}

.mp-audit-metric-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  font-size: 10.5px;
  background: rgba(0, 0, 0, 0.25);
  padding: 5px 8px;
  border-radius: 4px;
  margin-bottom: 6px;
}

.mp-audit-metric-row .val {
  font-weight: 700;
}

.mp-audit-rec {
  font-size: 10.5px;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.02);
  padding: 4px 6px;
  border-radius: 4px;
  border-left: 2px solid var(--mp-gold, #c4a36d);
}

.mp-inspector-close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: transparent;
  border: none;
  color: var(--mp-muted, #94a3b8);
  cursor: pointer;
  font-size: 14px;
  padding: 4px;
  border-radius: 4px;
}

.mp-inspector-close-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

/* 3. Scenario A/B Delta Comparison Styles */
.mp-scenario-delta-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--mp-surface, #0b1513);
  border: 1px solid var(--mp-border, rgba(241, 238, 230, 0.12));
  border-radius: 10px;
  padding: 14px;
}

.mp-delta-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mp-delta-header__titles {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 12px;
}

.mp-delta-scenario {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #f1eee6;
}

.mp-delta-scenario .badge {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
}

.mp-delta-scenario.a .badge {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  border: 1px solid #38bdf8;
}

.mp-delta-scenario.b .badge {
  background: rgba(168, 85, 247, 0.2);
  color: #c084fc;
  border: 1px solid #a855f7;
}

.mp-delta-vs {
  font-size: 11px;
  font-weight: 800;
  color: var(--mp-gold, #c4a36d);
  background: rgba(196, 163, 109, 0.15);
  padding: 2px 8px;
  border-radius: 12px;
}

.mp-delta-verdict-bar {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
  font-size: 11.5px;
  padding: 6px 12px;
  border-radius: 6px;
  text-align: center;
}

.mp-delta-table-wrap {
  overflow-x: auto;
}

.mp-delta-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.mp-delta-table th {
  background: rgba(255, 255, 255, 0.04);
  color: var(--mp-muted, #94a3b8);
  font-weight: 600;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mp-delta-table td {
  padding: 9px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #f1eee6;
}

.mp-delta-table td.indicator-name {
  font-weight: 600;
  color: #e2e8f0;
}

.mp-delta-table td.val-a {
  text-align: right;
  color: #bae6fd;
}

.mp-delta-table td.val-b {
  text-align: right;
  color: #e9d5ff;
}

.mp-delta-table td.val-delta {
  text-align: right;
}

.mp-delta-table .delta-pct {
  font-size: 10.5px;
  opacity: 0.85;
}

.mp-delta-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.mp-delta-badge.better {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid #10b981;
}

.mp-delta-badge.worse {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid #ef4444;
}

.mp-delta-badge.neutral {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  border: 1px solid #64748b;
}

/* Side-by-Side Dual Viewport Container */
.mp-ws-split-view-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  z-index: 15;
  background: #050a09;
}

.mp-ws-split-pane {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--mp-border, rgba(241, 238, 230, 0.12));
  overflow: hidden;
}

.mp-ws-split-pane:last-child {
  border-right: none;
}

.mp-ws-split-pane__header {
  height: 36px;
  padding: 0 12px;
  background: rgba(11, 21, 19, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  z-index: 5;
}

.mp-ws-split-pane__content {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* ==========================================================================
   L.A.C.I v4.1 — LAYER MANAGER PANEL (LEFT DOCK)
   ========================================================================== */
.mp-layer-manager-card {
  position: absolute;
  top: 60px;
  left: 16px;
  width: 260px;
  max-width: calc(100vw - 32px);
  background: rgba(11, 21, 19, 0.94);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(196, 163, 109, 0.3);
  border-radius: 10px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.55);
  z-index: 25;
  color: #e2e8f0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  transition: all 0.25s ease;
  overflow: hidden;
}

.mp-layer-mgr-header {
  height: 38px;
  padding: 0 12px;
  background: rgba(15, 29, 26, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mp-layer-mgr-title-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: #c4a36d;
}

.mp-layer-mgr-count {
  font-size: 10.5px;
  color: #94a3b8;
  font-weight: 500;
}

.mp-layer-mgr-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.mp-layer-btn-reset,
.mp-layer-btn-toggle-panel {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  font-size: 11px;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.mp-layer-btn-reset:hover,
.mp-layer-btn-toggle-panel:hover {
  background: rgba(196, 163, 109, 0.2);
  border-color: #c4a36d;
  color: #fff;
}

.mp-layer-mgr-body {
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 280px;
  overflow-y: auto;
}

.mp-layer-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  transition: all 0.15s;
}

.mp-layer-item:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(196, 163, 109, 0.25);
}

.mp-layer-item.is-hidden {
  opacity: 0.55;
  background: rgba(0, 0, 0, 0.2);
}

.mp-layer-checkbox-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  cursor: pointer;
  user-select: none;
  flex: 1;
}

.mp-layer-checkbox {
  cursor: pointer;
  accent-color: #c4a36d;
}

.mp-layer-color-badge {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.mp-layer-name {
  font-weight: 600;
  color: #f1f5f9;
}

.mp-layer-eye-btn {
  background: transparent;
  border: none;
  font-size: 13px;
  cursor: pointer;
  padding: 2px 4px;
  opacity: 0.8;
  transition: opacity 0.15s;
}

.mp-layer-eye-btn:hover {
  opacity: 1;
}

/* ==========================================================================
   L.A.C.I v4.1 — VERSION HISTORY TIMELINE & UNDO/REDO
   ========================================================================== */
.mp-ws-history-controls {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 8px;
}

.mp-ws-hist-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
}

.mp-ws-hist-btn:hover:not(:disabled) {
  background: rgba(196, 163, 109, 0.2);
  border-color: #c4a36d;
  color: #fff;
}

.mp-ws-hist-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.mp-history-timeline-wrap {
  position: absolute;
  top: 60px;
  left: 285px;
  width: 320px;
  max-height: 420px;
  background: rgba(11, 21, 19, 0.96);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(196, 163, 109, 0.4);
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65);
  z-index: 30;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.mp-history-header {
  height: 38px;
  padding: 0 12px;
  background: rgba(15, 29, 26, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mp-history-title-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: #c4a36d;
}

.mp-history-badge {
  font-size: 10px;
  background: rgba(196, 163, 109, 0.18);
  color: #c4a36d;
  padding: 1px 6px;
  border-radius: 8px;
  border: 1px solid rgba(196, 163, 109, 0.3);
}

.mp-history-close-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 14px;
  cursor: pointer;
}

.mp-history-close-btn:hover {
  color: #fff;
}

.mp-history-list {
  padding: 8px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mp-history-entry {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  font-size: 11px;
  transition: all 0.15s;
}

.mp-history-entry:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(196, 163, 109, 0.3);
}

.mp-history-entry.is-active {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.08);
}

.mp-history-entry-time {
  font-size: 9.5px;
  color: #94a3b8;
  font-family: monospace;
}

.mp-history-entry-main {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mp-history-entry-desc {
  flex: 1;
  font-weight: 500;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mp-history-tag-current {
  font-size: 9.5px;
  font-weight: 700;
  color: #34d399;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(52, 211, 153, 0.3);
  padding: 1px 5px;
  border-radius: 4px;
}

.mp-history-btn-restore {
  align-self: flex-end;
  background: rgba(196, 163, 109, 0.15);
  border: 1px solid rgba(196, 163, 109, 0.35);
  color: #c4a36d;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
}

.mp-history-btn-restore:hover {
  background: #c4a36d;
  color: #07100e;
  font-weight: 700;
}

/* ==========================================================================
   L.A.C.I v4.1 — SPATIAL AI COPILOT FLOATING DOCK
   ========================================================================== */
.mp-spatial-copilot-dock {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: 640px;
  max-width: calc(100vw - 48px);
  background: rgba(11, 21, 19, 0.95);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(196, 163, 109, 0.45);
  border-radius: 12px;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.65), 0 0 20px rgba(196, 163, 109, 0.15);
  z-index: 25;
  display: flex;
  flex-direction: column;
  padding: 8px 10px;
  gap: 6px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  transition: all 0.25s ease;
}

.mp-copilot-chips-wrap {
  display: flex;
  align-items: center;
  gap: 5px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.mp-copilot-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  font-size: 10.5px;
  padding: 3px 8px;
  border-radius: 12px;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s;
}

.mp-copilot-chip:hover {
  background: rgba(196, 163, 109, 0.2);
  border-color: #c4a36d;
  color: #fff;
}

.mp-copilot-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 4px 8px;
}

.mp-copilot-icon-badge {
  font-size: 11px;
  font-weight: 700;
  color: #c4a36d;
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.mp-copilot-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #f8fafc;
  font-size: 12px;
  font-family: inherit;
}

.mp-copilot-input::placeholder {
  color: #64748b;
  font-size: 11.5px;
}

.mp-copilot-send-btn {
  background: #c4a36d;
  border: none;
  color: #07100e;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}

.mp-copilot-send-btn:hover {
  background: #d4b584;
}

.mp-copilot-popover {
  margin-top: 4px;
  padding: 8px 10px;
  background: rgba(15, 29, 26, 0.95);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 8px;
  font-size: 11.5px;
  line-height: 1.5;
  color: #e2e8f0;
  max-height: 180px;
  overflow-y: auto;
}

/* ==========================================================================
   L.A.C.I v4.2 — 3D FLYTHROUGH & PRESENTATION THEATER HUD
   ========================================================================== */
.mp-flythrough-hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 500;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px 32px;
  box-sizing: border-box;
}

.mp-fly-lower-third {
  pointer-events: auto;
  align-self: flex-start;
  max-width: 520px;
  background: rgba(8, 18, 22, 0.88);
  border: 1px solid rgba(196, 163, 109, 0.35);
  border-left: 4px solid #c4a36d;
  border-radius: 10px;
  padding: 16px 20px;
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.65), 0 0 20px rgba(196, 163, 109, 0.15);
  color: #f8fafc;
  animation: mpFlySlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes mpFlySlideIn {
  from { opacity: 0; transform: translateY(-16px); }
  to { opacity: 1; transform: translateY(0); }
}

.mp-fly-badge-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.mp-fly-station-tag {
  background: rgba(196, 163, 109, 0.2);
  color: #d4b584;
  border: 1px solid rgba(196, 163, 109, 0.4);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  border-radius: 4px;
}

.mp-fly-badge-kpi {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
}

.mp-fly-title {
  margin: 0 0 4px 0;
  font-size: 17px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.mp-fly-subtitle {
  margin: 0 0 10px 0;
  font-size: 12px;
  color: #94a3b8;
  font-weight: 500;
}

.mp-fly-narration-box {
  background: rgba(0, 0, 0, 0.4);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 12px;
  line-height: 1.55;
  color: #cbd5e1;
  border-left: 2px solid rgba(52, 211, 153, 0.6);
}

.mp-flythrough-dock {
  pointer-events: auto;
  align-self: center;
  width: 100%;
  max-width: 820px;
  background: rgba(8, 18, 22, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 12px 18px;
  backdrop-filter: blur(14px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mp-fly-progress-bar-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.mp-fly-progress-track {
  position: relative;
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 3px;
  cursor: pointer;
}

.mp-fly-progress-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: linear-gradient(90deg, #c4a36d, #34d399);
  border-radius: 3px;
  transition: width 0.08s linear;
}

.mp-fly-timeline-marker {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 14px;
  height: 14px;
  background: #0f172a;
  border: 2px solid #c4a36d;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8.5px;
  font-weight: 800;
  color: #d4b584;
  cursor: pointer;
  transition: all 0.15s;
}

.mp-fly-timeline-marker:hover {
  transform: translate(-50%, -50%) scale(1.3);
  border-color: #34d399;
  color: #34d399;
}

.mp-fly-time-label {
  font-size: 11px;
  font-family: monospace;
  color: #94a3b8;
  white-space: nowrap;
}

.mp-fly-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.mp-fly-left-controls, .mp-fly-right-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mp-fly-btn-play {
  background: #c4a36d;
  color: #07100e;
  border: none;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}

.mp-fly-btn-play:hover {
  background: #d4b584;
  box-shadow: 0 0 12px rgba(196, 163, 109, 0.4);
}

.mp-fly-btn-stop {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #f87171;
  font-size: 11.5px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
}

.mp-fly-speed-group {
  display: flex;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  overflow: hidden;
}

.mp-fly-speed-chip {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 10.5px;
  font-weight: 700;
  padding: 4px 7px;
  cursor: pointer;
}

.mp-fly-speed-chip.is-active {
  background: rgba(196, 163, 109, 0.25);
  color: #d4b584;
}

.mp-fly-btn-tool {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
}

.mp-fly-btn-tool:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.mp-fly-btn-tool.is-muted {
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.3);
}

.mp-fly-btn-close {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #94a3b8;
  font-size: 12px;
  font-weight: 700;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mp-fly-btn-close:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

/* Chế độ Theater Fullscreen (F5) */
.mp-presentation-theater-mode {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 99999 !important;
  background: #000 !important;
}

/* ==========================================================================
   L.A.C.I v4.2+ — AI STATUTORY DEFENSE SIMULATOR (HỘI ĐỒNG THẨM ĐỊNH ẢO)
   ========================================================================== */

.mp-defense-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(10, 15, 29, 0.82);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.mp-defense-modal-container {
  width: 100%;
  max-width: 1040px;
  max-height: 90vh;
  background: #0f172a;
  border: 1px solid rgba(196, 163, 109, 0.4);
  border-radius: 12px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 30px rgba(196, 163, 109, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: #e2e8f0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.mp-defense-header {
  padding: 16px 20px;
  background: rgba(30, 41, 59, 0.7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 16px;
}

.mp-defense-kicker {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #c4a36d;
  text-transform: uppercase;
  display: block;
  margin-bottom: 2px;
}

.mp-defense-title-group {
  flex: 1;
}

.mp-defense-title-group h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: #f8fafc;
}

.mp-defense-proj-meta {
  margin: 4px 0 0;
  font-size: 12px;
  color: #94a3b8;
}

.mp-defense-verdict-card {
  padding: 6px 14px;
  border-radius: 8px;
  text-align: right;
  border: 1px solid;
}

.mp-defense-verdict-card.verdict-approved {
  background: rgba(16, 185, 129, 0.15);
  border-color: #10b981;
}

.mp-defense-verdict-card.verdict-conditional {
  background: rgba(245, 158, 11, 0.15);
  border-color: #f59e0b;
}

.mp-defense-verdict-card.verdict-failed {
  background: rgba(239, 68, 68, 0.15);
  border-color: #ef4444;
}

.mp-verdict-title {
  display: block;
  font-size: 11px;
  font-weight: 700;
}

.mp-verdict-score {
  display: block;
  font-size: 16px;
  font-weight: 800;
  color: #fff;
}

.mp-defense-btn-close {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #94a3b8;
  font-size: 13px;
  font-weight: 700;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.mp-defense-btn-close:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border-color: #ef4444;
}

.mp-defense-resolution-banner {
  padding: 10px 20px;
  background: rgba(196, 163, 109, 0.08);
  border-bottom: 1px solid rgba(196, 163, 109, 0.2);
  font-size: 12.5px;
  line-height: 1.5;
  color: #cbd5e1;
}

.mp-defense-resolution-banner strong {
  color: #c4a36d;
}

.mp-defense-tabs-row {
  display: flex;
  background: rgba(15, 23, 42, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 4px 16px 0;
  gap: 8px;
  overflow-x: auto;
}

.mp-defense-dept-tab {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: #94a3b8;
  font-size: 12.5px;
  font-weight: 600;
  padding: 10px 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
  white-space: nowrap;
}

.mp-defense-dept-tab:hover {
  color: #e2e8f0;
}

.mp-defense-dept-tab.is-active {
  color: #c4a36d;
  border-bottom-color: #c4a36d;
  background: rgba(196, 163, 109, 0.05);
}

.mp-dept-score-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.mp-dept-score-badge.dept-badge-pass {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

.mp-dept-score-badge.dept-badge-cond {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}

.mp-dept-score-badge.dept-badge-fail {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

.mp-defense-panels-wrap {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}

.mp-defense-dept-panel {
  display: none;
}

.mp-defense-dept-panel.is-active {
  display: block;
}

.mp-dept-summary-banner {
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border-left: 4px solid #3b82f6;
  border-radius: 4px;
  font-size: 12px;
  line-height: 1.6;
  color: #94a3b8;
  margin-bottom: 16px;
}

.mp-dept-summary-banner strong {
  color: #e2e8f0;
}

.mp-interrogation-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mp-interrogation-card {
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 14px 16px;
}

.mp-interrogation-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.mp-speaker-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #f1f5f9;
  margin-right: 10px;
}

.mp-statutory-pill {
  font-size: 10.5px;
  padding: 2px 7px;
  background: rgba(196, 163, 109, 0.15);
  color: #c4a36d;
  border-radius: 4px;
  border: 1px solid rgba(196, 163, 109, 0.3);
}

.mp-risk-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
}

.mp-risk-badge.risk-advisory {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

.mp-risk-badge.risk-warning {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}

.mp-risk-badge.risk-critical {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

.mp-interrogation-question {
  font-size: 13px;
  line-height: 1.5;
  color: #cbd5e1;
  margin-bottom: 12px;
  background: rgba(15, 23, 42, 0.5);
  padding: 10px 12px;
  border-radius: 6px;
}

.mp-defense-rebuttal-box {
  background: rgba(16, 185, 129, 0.05);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 10px;
}

.mp-rebuttal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 11.5px;
  color: #34d399;
}

.mp-rebuttal-score {
  font-size: 10.5px;
  font-weight: 700;
  color: #10b981;
}

.mp-rebuttal-speech {
  margin: 0 0 8px;
  font-size: 12.5px;
  line-height: 1.6;
  color: #f1f5f9;
}

.mp-legal-evidence {
  font-size: 11.5px;
  color: #94a3b8;
  background: rgba(0, 0, 0, 0.25);
  padding: 6px 10px;
  border-radius: 4px;
}

.mp-recommendation-note {
  font-size: 11.5px;
  color: #cbd5e1;
  padding: 6px 10px;
  background: rgba(245, 158, 11, 0.08);
  border-left: 3px solid #f59e0b;
  border-radius: 0 4px 4px 0;
}

.mp-defense-conditions-box {
  background: rgba(15, 23, 42, 0.9);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 12px 20px;
  max-height: 110px;
  overflow-y: auto;
}

.mp-defense-conditions-box h4 {
  margin: 0 0 6px;
  font-size: 11.5px;
  color: #c4a36d;
  text-transform: uppercase;
}

.mp-defense-conditions-list {
  margin: 0;
  padding-left: 18px;
  font-size: 11.5px;
  line-height: 1.5;
  color: #94a3b8;
}

.mp-defense-footer {
  padding: 12px 20px;
  background: rgba(30, 41, 59, 0.6);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.mp-defense-btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.mp-defense-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.mp-defense-btn-primary {
  background: linear-gradient(135deg, #c4a36d, #a88243);
  border: none;
  color: #0f172a;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.mp-defense-btn-primary:hover {
  filter: brightness(1.1);
  box-shadow: 0 0 12px rgba(196, 163, 109, 0.5);
}

/* ==========================================================================
   L.A.C.I v4.3 — REAL TOPOGRAPHY DEM & CUT/FILL BALANCING
   ========================================================================== */

.mp-dem-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(10, 15, 29, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.mp-dem-modal-container {
  width: 100%;
  max-width: 960px;
  max-height: 90vh;
  background: #0f172a;
  border: 1px solid rgba(196, 163, 109, 0.4);
  border-radius: 12px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 30px rgba(59, 130, 246, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: #e2e8f0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.mp-dem-header {
  padding: 16px 20px;
  background: rgba(30, 41, 59, 0.7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mp-dem-kicker {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #38bdf8;
  text-transform: uppercase;
  display: block;
  margin-bottom: 2px;
}

.mp-dem-header h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: #f8fafc;
}

.mp-dem-sub {
  margin: 4px 0 0;
  font-size: 12px;
  color: #94a3b8;
}

.mp-dem-btn-close {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #94a3b8;
  font-size: 13px;
  font-weight: 700;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.mp-dem-btn-close:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border-color: #ef4444;
}

.mp-dem-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 16px 20px;
  background: rgba(15, 23, 42, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mp-dem-kpi-card {
  padding: 12px;
  border-radius: 8px;
  border: 1px solid;
}

.mp-dem-kpi-card.kpi-cut {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
}

.mp-dem-kpi-card.kpi-fill {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.3);
}

.mp-dem-kpi-card.kpi-balance {
  background: rgba(196, 163, 109, 0.1);
  border-color: rgba(196, 163, 109, 0.3);
}

.mp-dem-kpi-card.kpi-cost {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
}

.mp-kpi-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: #94a3b8;
  margin-bottom: 4px;
}

.mp-kpi-val {
  display: block;
  font-size: 16px;
  font-weight: 800;
  color: #fff;
}

.mp-kpi-note {
  display: block;
  font-size: 10.5px;
  color: #cbd5e1;
  margin-top: 4px;
}

.mp-dem-controls-box {
  padding: 16px 20px;
  background: rgba(30, 41, 59, 0.4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 20px;
}

.mp-dem-slider-group {
  flex: 1;
}

.mp-dem-slider-group label {
  display: block;
  font-size: 12.5px;
  color: #cbd5e1;
  margin-bottom: 8px;
}

.mp-dem-slider-group label strong {
  color: #38bdf8;
}

.mp-dem-slider-group input[type="range"] {
  width: 100%;
  accent-color: #38bdf8;
  cursor: pointer;
}

.mp-dem-btn-optimize {
  background: linear-gradient(135deg, #38bdf8, #0284c7);
  border: none;
  color: #0f172a;
  font-size: 12px;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.3);
  transition: all 0.2s;
}

.mp-dem-btn-optimize:hover {
  filter: brightness(1.15);
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.5);
}

.mp-dem-preview-legend {
  padding: 12px 20px;
  background: rgba(15, 23, 42, 0.8);
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 11.5px;
  color: #94a3b8;
}

.mp-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mp-legend-color {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  display: inline-block;
}

.mp-legend-color.cut {
  background: rgba(239, 68, 68, 0.7);
  border: 1px solid #ef4444;
}

.mp-legend-color.fill {
  background: rgba(59, 130, 246, 0.7);
  border: 1px solid #3b82f6;
}

.mp-legend-color.zero {
  background: rgba(196, 163, 109, 0.7);
  border: 1px solid #c4a36d;
}

.mp-dem-footer {
  padding: 12px 20px;
  background: rgba(30, 41, 59, 0.6);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.mp-dem-btn-sec {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.mp-dem-btn-sec:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.mp-dem-btn-pri {
  background: linear-gradient(135deg, #c4a36d, #a88243);
  border: none;
  color: #0f172a;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.mp-dem-btn-pri:hover {
  filter: brightness(1.1);
  box-shadow: 0 0 12px rgba(196, 163, 109, 0.5);
}

/* ==========================================================================
   L.A.C.I v5.0 — MULTI-USER REAL-TIME COLLABORATION ("FIGMA FOR PLANNING")
   ========================================================================== */

.mp-collab-presence-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 4px 12px 4px 6px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.35);
}

.mp-collab-avatar-stack {
  display: flex;
  align-items: center;
  margin-left: 2px;
}

.mp-collab-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid #0f172a;
  margin-left: -6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  cursor: pointer;
  transition: transform 0.2s;
}

.mp-collab-avatar:first-child {
  margin-left: 0;
}

.mp-collab-avatar:hover {
  transform: scale(1.2) translateY(-2px);
  z-index: 10;
}

.mp-collab-live-badge {
  font-size: 11px;
  font-weight: 700;
  color: #34d399;
  letter-spacing: 0.03em;
}

.mp-collab-btn-comment {
  background: rgba(196, 163, 109, 0.18);
  border: 1px solid rgba(196, 163, 109, 0.4);
  color: #f1f5f9;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 4px;
}

.mp-collab-btn-comment:hover {
  background: rgba(196, 163, 109, 0.35);
  border-color: #c4a36d;
}

.mp-collab-comments-drawer {
  position: fixed;
  top: 60px;
  right: 20px;
  bottom: 60px;
  width: 340px;
  background: #0f172a;
  border: 1px solid rgba(196, 163, 109, 0.35);
  border-radius: 12px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.mp-collab-drawer-header {
  padding: 12px 16px;
  background: rgba(30, 41, 59, 0.7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mp-collab-drawer-header h3 {
  margin: 0;
  font-size: 13.5px;
  color: #f8fafc;
}

.mp-collab-drawer-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mp-collab-comment-card {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px 12px;
}

.mp-collab-comment-card.is-resolved {
  opacity: 0.6;
}

.mp-collab-comment-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.mp-collab-author-tag {
  font-size: 11.5px;
  font-weight: 700;
  color: #38bdf8;
}

.mp-collab-dept-pill {
  font-size: 9.5px;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(196, 163, 109, 0.15);
  color: #c4a36d;
}

.mp-collab-comment-text {
  font-size: 12px;
  line-height: 1.45;
  color: #cbd5e1;
  margin: 0 0 6px;
}

.mp-collab-comment-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10.5px;
  color: #94a3b8;
}

/* ==========================================================================
   L.A.C.I v4.3+ BIM IFC 4.3 & Civil 3D LandXML Export Modal
   ========================================================================== */
.mp-bim-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 15, 29, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: mpFadeIn 0.2s ease-out;
}

.mp-bim-modal-card {
  background: #0f172a;
  border: 1px solid rgba(196, 163, 109, 0.4);
  border-radius: 14px;
  width: 100%;
  max-width: 680px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(196, 163, 109, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: #f8fafc;
  font-family: inherit;
}

.mp-bim-modal-header {
  padding: 18px 24px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.95));
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.mp-bim-modal-header h3 {
  margin: 0 0 4px 0;
  font-size: 17px;
  font-weight: 700;
  color: #c4a36d;
}

.mp-bim-modal-sub {
  margin: 0;
  font-size: 11.5px;
  color: #94a3b8;
}

.mp-bim-modal-close {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  padding: 0;
}

.mp-bim-modal-close:hover {
  color: #ef4444;
}

.mp-bim-modal-body {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-height: 75vh;
  overflow-y: auto;
}

.mp-bim-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  background: rgba(30, 41, 59, 0.4);
  padding: 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.mp-bim-stat-box {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mp-bim-stat-box .lbl {
  font-size: 11px;
  color: #94a3b8;
}

.mp-bim-stat-box .val {
  font-size: 13.5px;
  font-weight: 700;
  color: #f1f5f9;
}

.mp-bim-stat-box .val.highlight {
  color: #38bdf8;
}

.mp-bim-formats-container h4 {
  margin: 0 0 12px 0;
  font-size: 13.5px;
  font-weight: 700;
  color: #cbd5e1;
}

.mp-bim-format-option {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 12px;
  transition: all 0.2s;
}

.mp-bim-format-option:hover {
  border-color: rgba(196, 163, 109, 0.5);
  background: rgba(30, 41, 59, 0.7);
}

.mp-bim-format-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.mp-bim-format-tag {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
}

.tag-ifc {
  background: rgba(14, 165, 233, 0.2);
  color: #38bdf8;
  border: 1px solid rgba(14, 165, 233, 0.4);
}

.tag-xml {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.mp-bim-format-desc {
  font-size: 11.5px;
  color: #94a3b8;
  line-height: 1.5;
  margin: 0 0 12px 0;
}

.mp-bim-action-row {
  display: flex;
  gap: 10px;
}

.mp-bim-btn-download {
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-ifc {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #ffffff;
}

.btn-ifc:hover {
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.35);
}

.btn-xml {
  background: linear-gradient(135deg, #059669, #047857);
  color: #ffffff;
}

.btn-xml:hover {
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

.mp-bim-modal-footer {
  padding: 14px 24px;
  background: rgba(15, 23, 42, 0.8);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mp-bim-footer-note {
  font-size: 10.5px;
  color: #64748b;
}

.mp-bim-btn-cancel {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
}

.mp-bim-btn-cancel:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

/* ==========================================================================
   L.A.C.I v5.2 AI ARCHITECTURAL CONCEPT RENDER MODAL
   ========================================================================== */
.mp-ai-render-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(7, 16, 14, 0.82);
  backdrop-filter: blur(12px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: mpFadeIn 0.25s ease-out;
}

.mp-ai-render-modal-card {
  width: 90vw;
  max-width: 1080px;
  max-height: 90vh;
  background: #0b1513;
  border: 1px solid rgba(196, 163, 109, 0.4);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85);
  overflow: hidden;
}

.mp-ai-render-header {
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mp-ai-render-body {
  padding: 20px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 20px;
}

.mp-ai-render-preview-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 8px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.mp-ai-render-controls {
  display: flex;
  flex-direction: column;
}

.mp-ai-style-selector {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mp-ai-style-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #f1eee6;
  padding: 10px 12px;
  border-radius: 8px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
}

.mp-ai-style-btn:hover {
  background: rgba(196, 163, 109, 0.15);
  border-color: rgba(196, 163, 109, 0.4);
}

.mp-ai-style-btn.active {
  background: rgba(196, 163, 109, 0.25);
  border-color: #c4a36d;
  box-shadow: 0 0 12px rgba(196, 163, 109, 0.2);
}

.mp-ai-prompt-box {
  width: 100%;
  height: 90px;
  background: #07100e;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: #a7f3d0;
  font-family: monospace;
  font-size: 11px;
  padding: 8px 10px;
  resize: none;
  box-sizing: border-box;
}

/* ==========================================================================
   L.A.C.I v5.3 — 4D PHASING TIMELINE, S-CURVE HUD & SUBSURFACE UTILITY BIM
   ========================================================================== */

/* 1. Thanh trượt thời gian 4D Time-Slider Bar */
.mp-4d-slider-container {
  position: absolute;
  bottom: 110px;
  left: 50%;
  transform: translateX(-50%);
  width: min(92%, 780px);
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 12px;
  padding: 10px 16px 14px 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.65), 0 0 18px rgba(14, 165, 233, 0.18);
  backdrop-filter: blur(16px);
  z-index: 95;
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: mp-4d-slide-up 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

@keyframes mp-4d-slide-up {
  from { opacity: 0; transform: translate(-50%, 16px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.mp-4d-slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mp-4d-slider-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: #f1f5f9;
  letter-spacing: 0.3px;
}

.mp-4d-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 8px #38bdf8;
  animation: mp-4d-pulse 1.8s infinite;
}

@keyframes mp-4d-pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 12px #38bdf8; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.mp-4d-btn-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mp-4d-btn {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #bae6fd;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.18s;
}

.mp-4d-btn:hover {
  background: rgba(56, 189, 248, 0.25);
  border-color: #38bdf8;
  color: #ffffff;
}

.mp-4d-btn.active {
  background: #0284c7;
  border-color: #38bdf8;
  color: #ffffff;
}

.mp-4d-btn-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 14px;
  padding: 2px 6px;
  cursor: pointer;
}

.mp-4d-btn-close:hover {
  color: #f43f5e;
}

.mp-4d-slider-track-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
}

.mp-4d-slider-input {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: #1e293b;
  outline: none;
  cursor: pointer;
}

.mp-4d-slider-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #38bdf8;
  border: 2px solid #ffffff;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.8);
  transition: transform 0.12s;
}

.mp-4d-slider-input::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.mp-4d-slider-ticks {
  display: flex;
  justify-content: space-between;
  padding: 0 4px;
}

.mp-4d-slider-ticks .tick {
  font-size: 10px;
  color: #64748b;
  text-align: center;
  line-height: 1.15;
  cursor: pointer;
  transition: color 0.15s;
}

.mp-4d-slider-ticks .tick small {
  font-size: 8.5px;
  opacity: 0.75;
}

.mp-4d-slider-ticks .tick:hover,
.mp-4d-slider-ticks .tick.active {
  color: #38bdf8;
  font-weight: 700;
}

/* 2. Thẻ Mini-HUD S-Curve Card */
.mp-4d-scurve-hud-card {
  position: absolute;
  top: 68px;
  right: 18px;
  width: 330px;
  background: rgba(15, 23, 42, 0.94);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.7), 0 0 16px rgba(245, 158, 11, 0.15);
  backdrop-filter: blur(16px);
  z-index: 94;
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: mp-4d-fade-in 0.22s ease-out;
}

@keyframes mp-4d-fade-in {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.mp-4d-hud-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mp-4d-hud-title {
  font-size: 11.5px;
  font-weight: 800;
  color: #fbbf24;
  letter-spacing: 0.4px;
}

.mp-4d-hud-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 13px;
  cursor: pointer;
}

.mp-4d-hud-close:hover {
  color: #f43f5e;
}

.mp-4d-hud-chart-box {
  width: 100%;
  height: 160px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 4px;
  box-sizing: border-box;
}

.mp-4d-hud-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.mp-4d-stat-pill {
  background: rgba(0, 0, 0, 0.4);
  border-radius: 6px;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.mp-4d-stat-pill .lbl {
  font-size: 9px;
  color: #94a3b8;
}

.mp-4d-stat-pill .val {
  font-size: 11.5px;
  font-weight: 800;
  font-family: monospace;
}

.mp-4d-stat-pill.red { border-left: 3px solid #f43f5e; }
.mp-4d-stat-pill.red .val { color: #fda4af; }

.mp-4d-stat-pill.green { border-left: 3px solid #10b981; }
.mp-4d-btn-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mp-4d-btn {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #bae6fd;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.18s;
}

.mp-4d-btn:hover {
  background: rgba(56, 189, 248, 0.25);
  border-color: #38bdf8;
  color: #ffffff;
}

.mp-4d-btn.active {
  background: #0284c7;
  border-color: #38bdf8;
  color: #ffffff;
}

.mp-4d-btn-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 14px;
  padding: 2px 6px;
  cursor: pointer;
}

.mp-4d-btn-close:hover {
  color: #f43f5e;
}

.mp-4d-slider-track-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
}

.mp-4d-slider-input {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: #1e293b;
  outline: none;
  cursor: pointer;
}

.mp-4d-slider-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #38bdf8;
  border: 2px solid #ffffff;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.8);
  transition: transform 0.12s;
}

.mp-4d-slider-input::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.mp-4d-slider-ticks {
  display: flex;
  justify-content: space-between;
  padding: 0 4px;
}

.mp-4d-slider-ticks .tick {
  font-size: 10px;
  color: #64748b;
  text-align: center;
  line-height: 1.15;
  cursor: pointer;
  transition: color 0.15s;
}

.mp-4d-slider-ticks .tick small {
  font-size: 8.5px;
  opacity: 0.75;
}

.mp-4d-slider-ticks .tick:hover,
.mp-4d-slider-ticks .tick.active {
  color: #38bdf8;
  font-weight: 700;
}

/* 2. Thẻ Mini-HUD S-Curve Card */
.mp-4d-scurve-hud-card {
  position: absolute;
  top: 68px;
  right: 18px;
  width: 330px;
  background: rgba(15, 23, 42, 0.94);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.7), 0 0 16px rgba(245, 158, 11, 0.15);
  backdrop-filter: blur(16px);
  z-index: 94;
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: mp-4d-fade-in 0.22s ease-out;
}

@keyframes mp-4d-fade-in {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.mp-4d-hud-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mp-4d-hud-title {
  font-size: 11.5px;
  font-weight: 800;
  color: #fbbf24;
  letter-spacing: 0.4px;
}

.mp-4d-hud-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 13px;
  cursor: pointer;
}

.mp-4d-hud-close:hover {
  color: #f43f5e;
}

.mp-4d-hud-chart-box {
  width: 100%;
  height: 160px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 4px;
  box-sizing: border-box;
}

.mp-4d-hud-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.mp-4d-stat-pill {
  background: rgba(0, 0, 0, 0.4);
  border-radius: 6px;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.mp-4d-stat-pill .lbl {
  font-size: 9px;
  color: #94a3b8;
}

.mp-4d-stat-pill .val {
  font-size: 11.5px;
  font-weight: 800;
  font-family: monospace;
}

.mp-4d-stat-pill.red { border-left: 3px solid #f43f5e; }
.mp-4d-stat-pill.red .val { color: #fda4af; }

.mp-4d-stat-pill.green { border-left: 3px solid #10b981; }
.mp-4d-stat-pill.green .val { color: #6ee7b7; }

.mp-4d-stat-pill.amber { border-left: 3px solid #f59e0b; }
.mp-4d-stat-pill.amber .val { color: #fcd34d; }

.mp-4d-stat-pill.cyan { border-left: 3px solid #0ea5e9; }
.mp-4d-stat-pill.cyan .val { color: #7dd3fc; }

/* ==========================================================================
   L.A.C.I v4.4 — STRATEGIC UPGRADES: SWIPE CURTAIN, GPS SITE BAR & SHARE
   ========================================================================== */
.mp-swipe-curtain-wrap {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 25;
  overflow: hidden;
}

.mp-swipe-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--mp-gold, #c4a36d);
  box-shadow: 0 0 12px rgba(196, 163, 109, 0.85);
  pointer-events: auto;
  cursor: ew-resize;
  transform: translateX(-50%);
  z-index: 30;
}

.mp-swipe-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #07100e;
  border: 2px solid var(--mp-gold, #c4a36d);
  color: var(--mp-gold, #c4a36d);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
  user-select: none;
  touch-action: none;
}


.mp-gps-site-bar {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(7, 16, 14, 0.92);
  border: 1px solid rgba(59, 130, 246, 0.4);
  border-radius: 20px;
  padding: 6px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: #f8fafc;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  z-index: 28;
  pointer-events: auto;
}

.mp-gps-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3b82f6;
  box-shadow: 0 0 8px #3b82f6;
  animation: mpGpsPulse 1.5s infinite;
}

@keyframes mpGpsPulse {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

/* =========================================================================
   ZEN MODE: SA BÀN QUY HOẠCH TOÀN MÀN HÌNH TỐI GIẢN (CITY TOUR JOEL STRAIT)
   ========================================================================= */
body.mp-ws-zen-mode,
.mp-ws-container.mp-ws-zen-mode {
  overflow: hidden !important;
}

body.mp-ws-zen-mode .site-header,
body.mp-ws-zen-mode .topbar,
body.mp-ws-zen-mode .cta,
body.mp-ws-zen-mode .site-footer,
body.mp-ws-zen-mode .hero-workspace__header,
body.mp-ws-zen-mode .mp-ws-header,
body.mp-ws-zen-mode .mp-ws-engineering-bar,
body.mp-ws-zen-mode .mp-ws-left-panel,
body.mp-ws-zen-mode .mp-ws-right-hud,
body.mp-ws-zen-mode .mp-ws-proforma-dock,
body.mp-ws-zen-mode .mp-ws-bottom-dock,
.mp-ws-container.mp-ws-zen-mode .mp-ws-header,
.mp-ws-container.mp-ws-zen-mode .mp-ws-engineering-bar,
.mp-ws-container.mp-ws-zen-mode .mp-ws-left-panel,
.mp-ws-container.mp-ws-zen-mode .mp-ws-right-hud,
.mp-ws-container.mp-ws-zen-mode .mp-ws-proforma-dock,
.mp-ws-container.mp-ws-zen-mode .mp-ws-bottom-dock {
  display: none !important;
}

body.mp-ws-zen-mode .hero-workspace,
.mp-ws-container.mp-ws-zen-mode {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 99999 !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.mp-ws-zen-mode .mp-ws-body,
.mp-ws-container.mp-ws-zen-mode .mp-ws-body {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
}

body.mp-ws-zen-mode .mp-ws-viewport,
.mp-ws-container.mp-ws-zen-mode .mp-ws-viewport,
body.mp-ws-zen-mode #mpStudioMount,
body.mp-ws-zen-mode #mpWs3dContainer {
  width: 100% !important;
  height: 100% !important;
}

.mp-zen-exit-pill {
  position: fixed;
  top: 18px;
  right: 22px;
  z-index: 100000;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.90);
  border: 1px solid rgba(244, 63, 94, 0.5);
  color: #fecdd3;
  padding: 8px 18px;
  border-radius: 999px;
  font-family: var(--mp-font, system-ui);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.mp-zen-exit-pill:hover {
  background: rgba(244, 63, 94, 0.95);
  border-color: #f43f5e;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(244, 63, 94, 0.5);
}

/* =========================================================================
   MOBILE & TABLET RESPONSIVE SYSTEM (Comprehensive Audit)
   ========================================================================= */
@media (max-width: 1024px) {
  .mp-ws-body {
    grid-template-columns: 280px 1fr 300px;
  }
}

@media (max-width: 900px) {
  .mp-workstation {
    height: auto;
    min-height: auto;
    overflow-y: visible;
  }
  .mp-ws-body {
    display: flex;
    flex-direction: column;
    height: auto;
    overflow: visible;
  }
  .mp-ws-left-panel {
    max-height: 480px;
    border-right: none;
    border-bottom: 1px solid var(--mp-border);
  }
  .mp-ws-viewport {
    height: 55vh;
    min-height: 380px;
    position: relative;
  }
  .mp-ws-right-hud {
    border-left: none;
    border-top: 1px solid var(--mp-border);
    max-height: 520px;
  }
  .mp-ws-header {
    height: auto;
    padding: 10px 14px;
    flex-wrap: wrap;
    gap: 8px;
  }
  .mp-ws-project-title {
    width: 100%;
    max-width: none;
    order: 3;
    font-size: 16px;
  }
  .mp-ws-header__left {
    flex-wrap: wrap;
  }
  .mp-ws-header__right {
    flex-wrap: wrap;
    gap: 6px;
  }
  .mp-ws-btn-tool {
    min-height: 44px;
    padding: 8px 12px;
  }
}

@media (max-width: 640px) {
  .mp-ws-viewport {
    height: 48vh;
    min-height: 320px;
  }
  .mp-ws-btn-tool {
    font-size: 10.5px;
    padding: 8px 10px;
  }
  .mp-ws-card {
    padding: 12px;
  }
  .mp-ws-bottom-dock, .mp-hud-bottom-dock {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 6px;
    gap: 6px;
    max-width: calc(100vw - 20px);
  }
  .mp-ws-bottom-dock button, .mp-hud-bottom-dock button {
    min-height: 44px;
    min-width: 44px;
  }
}

/* ==========================================================================
   BỘ CÔNG CỤ TÁC NGHIỆP TRUNG TÂM (CHUYỂN TỪ CANVAS SANG BẢNG ĐIỀU KHIỂN TRÁI)
   ========================================================================== */
.mp-ws-interactive-tools-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* 1. Spatial AI Copilot trong Left Panel */
.mp-ws-left-panel .mp-spatial-copilot-dock {
  position: static !important;
  transform: none !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
  background: rgba(11, 21, 19, 0.85);
  border: 1px solid rgba(196, 163, 109, 0.35);
  border-radius: 8px;
  padding: 8px;
  gap: 6px;
  box-shadow: none;
}

.mp-ws-left-panel .mp-copilot-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  overflow-x: visible;
  padding-bottom: 2px;
}

.mp-ws-left-panel .mp-copilot-chip {
  font-size: 10px;
  padding: 3px 6px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  cursor: pointer;
  white-space: nowrap;
}

.mp-ws-left-panel .mp-copilot-chip:hover {
  background: rgba(196, 163, 109, 0.18);
  border-color: #c4a36d;
  color: #f1eee6;
}

.mp-ws-left-panel .mp-copilot-input-row {
  display: flex;
  gap: 4px;
  align-items: center;
}

.mp-ws-left-panel .mp-copilot-icon-badge {
  font-size: 10px;
  padding: 3px 6px;
  white-space: nowrap;
  background: rgba(196, 163, 109, 0.15);
  border: 1px solid rgba(196, 163, 109, 0.3);
  border-radius: 6px;
  color: #c4a36d;
  font-weight: 700;
}

.mp-ws-left-panel .mp-copilot-input {
  flex: 1;
  min-width: 0;
  font-size: 11px;
  padding: 4px 8px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: #f1eee6;
}

.mp-ws-left-panel .mp-copilot-send-btn {
  font-size: 10.5px;
  padding: 4px 8px;
  background: #0a4d3c;
  border: 1px solid #34d399;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  font-weight: 600;
  white-space: nowrap;
}

.mp-ws-left-panel .mp-copilot-popover {
  position: static;
  margin-top: 4px;
  width: 100%;
  box-sizing: border-box;
  font-size: 10.5px;
  background: rgba(15, 29, 26, 0.95);
  border: 1px solid rgba(196, 163, 109, 0.3);
  border-radius: 6px;
  padding: 6px 8px;
}

/* 2. Quản Lý Lớp Bản Vẽ trong Left Panel */
.mp-ws-left-panel .mp-layer-manager-card {
  position: static !important;
  top: auto !important;
  left: auto !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
  background: rgba(11, 21, 19, 0.85);
  border: 1px solid rgba(196, 163, 109, 0.35);
  border-radius: 8px;
  box-shadow: none;
  overflow: hidden;
}

.mp-ws-left-panel .mp-layer-mgr-header {
  height: 32px;
  padding: 0 8px;
  background: rgba(15, 29, 26, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mp-ws-left-panel .mp-layer-mgr-title {
  font-size: 11.5px;
  font-weight: 700;
}

.mp-ws-left-panel .mp-layer-item {
  padding: 4px 8px;
  font-size: 11px;
}

/* 3. Đo Đạc CAD trong Left Panel */
.mp-ws-left-panel .mp-ws-cad-toolbar {
  position: static !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  transform: none !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
  background: rgba(11, 21, 19, 0.85);
  border: 1px solid rgba(196, 163, 109, 0.35);
  border-radius: 8px;
  padding: 6px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  box-shadow: none;
}

.mp-ws-left-panel .mp-cad-divider {
  display: none;
}

.mp-ws-left-panel .mp-cad-tool-btn {
  padding: 5px 6px;
  font-size: 10.5px;
  border-radius: 6px;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
}

/* 4. Bộ Điều Khiển 3D Controls Mount trong Left Panel */
.mp-ws-3d-controls-mount {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}

.mp-ws-left-panel .mp-ws-3d-hud {
  position: static !important;
  transform: none !important;
  top: auto !important;
  left: auto !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
  background: rgba(7, 16, 14, 0.85);
  border: 1px solid rgba(196, 163, 109, 0.35);
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 10.5px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  box-shadow: none;
  white-space: normal;
  pointer-events: auto;
}

.mp-ws-left-panel .mp-ws-3d-tools-dock {
  position: static !important;
  bottom: auto !important;
  left: auto !important;
  transform: none !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
  background: rgba(11, 21, 19, 0.85);
  border: 1px solid rgba(196, 163, 109, 0.35);
  border-radius: 8px;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  box-shadow: none;
  overflow-x: visible;
}

.mp-ws-left-panel .mp-3d-btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.mp-ws-left-panel .mp-3d-btn-divider {
  width: 100%;
  height: 1px;
  background: rgba(196, 163, 109, 0.2);
  margin: 2px 0;
}

.mp-ws-left-panel .mp-3d-dock-btn {
  flex: 1 1 calc(50% - 4px);
  min-width: 65px;
  justify-content: center;
  padding: 4px 6px;
  font-size: 10.5px;
  border-radius: 6px;
  white-space: nowrap;
}

.mp-ws-left-panel .mp-ws-qcvn-badge {
  position: static !important;
  top: auto !important;
  right: auto !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
  background: rgba(11, 21, 19, 0.85);
  border: 1px solid rgba(52, 211, 153, 0.35);
  border-radius: 8px;
  box-shadow: none;
}

/* Phase 66: 5 Tính Năng Chuyên Sâu - Workstation Pro UI Enhancements */
.mp-slider-lock-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 11px;
  padding: 0 2px;
  opacity: 0.75;
  transition: transform 0.15s ease, opacity 0.15s ease;
  user-select: none;
}
.mp-slider-lock-btn:hover {
  opacity: 1;
  transform: scale(1.15);
}
.mp-ws-3d-building-inspector-card {
  animation: mpFadeInSlide 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes mpFadeInSlide {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================================================================
   UX-100 ENHANCEMENT: KEYBOARD SHORTCUTS CHEATSHEET & INTERACTIVE CONTROLS
   ========================================================================= */
.mp-kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  color: #f1eee6;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-bottom: 2px solid rgba(196, 163, 109, 0.6);
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  user-select: none;
}

.mp-hotkey-group-card {
  background: rgba(15, 29, 26, 0.7);
  border: 1px solid rgba(196, 163, 109, 0.25);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.mp-hotkey-group-title {
  font-size: 12px;
  font-weight: 700;
  color: #c4a36d;
  display: flex;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(196, 163, 109, 0.15);
}

.mp-hotkey-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 11.5px;
  color: #cbd5e1;
  gap: 8px;
  transition: all 0.15s ease;
}

.mp-hotkey-row:hover {
  background: rgba(196, 163, 109, 0.12);
  border-color: rgba(196, 163, 109, 0.35);
  color: #f1eee6;
}

.mp-hotkey-keys {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.mp-ws-zoom-badge {
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.mp-ws-zoom-badge:hover {
  background: rgba(196, 163, 109, 0.25) !important;
  border-color: #c4a36d !important;
  color: #fff !important;
  transform: scale(1.05);
  box-shadow: 0 0 10px rgba(196, 163, 109, 0.35);
}

/* ============================================================================
   BẢNG ĐIỀU KHIỂN NÂNG CẤP v4.1: COMMAND PALETTE, ACCORDION & CLUSTERED TABS
   ============================================================================ */

/* 1. Global Command Palette (Ctrl+K) */
.mp-command-palette-dialog {
  width: 92vw;
  max-width: 680px;
  max-height: 82vh;
  background: rgba(10, 18, 16, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(196, 163, 109, 0.45);
  border-radius: 14px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.9), 0 0 40px rgba(196, 163, 109, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: paletteScaleIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes paletteScaleIn {
  from { opacity: 0; transform: scale(0.96) translateY(-8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.mp-command-palette-input-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: rgba(13, 24, 21, 0.95);
  border-bottom: 1px solid rgba(196, 163, 109, 0.25);
}

.mp-command-palette-icon {
  font-size: 16px;
  color: var(--mp-gold, #c4a36d);
  flex-shrink: 0;
}

.mp-command-palette-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  font-weight: 500;
}

.mp-command-palette-input::placeholder {
  color: rgba(241, 238, 230, 0.4);
  font-weight: 400;
}

.mp-command-palette-results {
  flex: 1;
  overflow-y: auto;
  padding: 8px 10px;
  max-height: calc(82vh - 120px);
}

.mp-command-group-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--mp-gold, #c4a36d);
  padding: 10px 10px 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.mp-command-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 2px;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
}

.mp-command-item:hover,
.mp-command-item.is-selected {
  background: rgba(196, 163, 109, 0.15);
  border-color: rgba(196, 163, 109, 0.4);
  transform: translateX(3px);
}

.mp-command-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.mp-command-item-icon {
  font-size: 15px;
  flex-shrink: 0;
}

.mp-command-item-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.mp-command-item-title {
  font-size: 12.5px;
  font-weight: 600;
  color: #f1eee6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mp-command-item-desc {
  font-size: 10.5px;
  color: rgba(241, 238, 230, 0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mp-command-item-badge {
  font-size: 9.5px;
  font-family: monospace;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(241, 238, 230, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.mp-command-palette-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: rgba(7, 14, 12, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 11px;
  color: rgba(241, 238, 230, 0.55);
}

.mp-command-hints {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* 2. Sidebar Accordion 4 Phân Khu Tác Nghiệp */
.mp-ws-accordion-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 4px 8px;
  margin-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.mp-ws-accordion-tb-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(241, 238, 230, 0.7);
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.mp-ws-accordion-tb-btn:hover {
  background: rgba(196, 163, 109, 0.15);
  border-color: rgba(196, 163, 109, 0.4);
  color: #fff;
}

.mp-ws-accordion-section {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  margin-bottom: 8px;
  overflow: visible !important;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.mp-ws-accordion-section:hover {
  border-color: rgba(196, 163, 109, 0.3);
}

.mp-ws-accordion-section.is-active-focus {
  border-color: rgba(196, 163, 109, 0.5);
  background: rgba(196, 163, 109, 0.03);
}

.mp-ws-accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease;
}

.mp-ws-accordion-header:hover {
  background: rgba(196, 163, 109, 0.1);
}

.mp-ws-accordion-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.mp-ws-accordion-badge {
  font-size: 10px;
  font-weight: 700;
  font-family: monospace;
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
  flex-shrink: 0;
}

.mp-ws-accordion-title {
  font-size: 11.5px;
  font-weight: 700;
  color: #f1eee6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.02em;
}

.mp-ws-accordion-chevron {
  font-size: 11px;
  color: rgba(241, 238, 230, 0.5);
  transition: transform 0.2s ease;
  flex-shrink: 0;
  padding-left: 6px;
}

.mp-ws-accordion-section.is-collapsed .mp-ws-accordion-chevron {
  transform: rotate(-90deg);
}

.mp-ws-accordion-section.is-collapsed {
  overflow: hidden !important;
}

.mp-ws-accordion-section.is-collapsed .mp-ws-accordion-content {
  display: none !important;
}

.mp-ws-accordion-content {
  padding: 8px 10px 12px;
}

/* 3. Gom nhóm 13 Viewport Tabs thành 4 Cụm Chức Năng */
.mp-ws-vp-clusters-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.mp-ws-cluster-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border-radius: 6px;
  background: transparent;
  border: 1px solid transparent;
  color: rgba(241, 238, 230, 0.7);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.mp-ws-cluster-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.mp-ws-cluster-btn.active {
  background: rgba(196, 163, 109, 0.18);
  border-color: rgba(196, 163, 109, 0.45);
  color: #fff;
  box-shadow: 0 0 10px rgba(196, 163, 109, 0.18);
}

.mp-ws-subtabs-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.mp-ws-subtabs-wrap::-webkit-scrollbar {
  display: none;
}

/* ============================================================================
   BỘ TÍNH TOÁN DÂN SỐ & HẠ TẦNG XÃ HỘI CHUẨN QCVN 01:2021
   ============================================================================ */
.mp-social-infra-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.mp-social-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.2s ease;
}

.mp-social-card:hover {
  border-color: rgba(196, 163, 109, 0.4);
  background: rgba(255, 255, 255, 0.035);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.mp-social-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 8px;
}

.mp-social-card-title {
  font-size: 13px;
  font-weight: 700;
  color: #f1eee6;
  display: flex;
  align-items: center;
  gap: 6px;
}

.mp-social-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
}

.mp-social-badge.pass {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.mp-social-badge.deficit {
  background: rgba(239, 68, 68, 0.18);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.mp-social-metrics-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: rgba(241, 238, 230, 0.75);
}

.mp-social-metric-val {
  font-weight: 700;
  font-family: monospace;
  color: #fff;
}

.mp-social-progress-wrap {
  margin-top: 4px;
}

.mp-social-progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}

.mp-social-progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
}

.mp-social-progress-fill.pass {
  background: linear-gradient(90deg, #10b981, #34d399);
}

.mp-social-progress-fill.deficit {
  background: linear-gradient(90deg, #f59e0b, #ef4444);
}

/* ==========================================================================
   NÂNG CẤP v4.1 - GIAI ĐOẠN 2: LIVE QCVN SMART HEALTH-BAR & 1-CLICK AUTO-HEAL
   ========================================================================== */
.mp-ws-hud-healthbar {
  position: static !important;
  width: 100% !important;
  max-width: 100% !important;
  margin-top: 10px;
  margin-bottom: 6px;
  box-sizing: border-box;
  background: rgba(12, 21, 30, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
  color: #f1eee6;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  padding: 12px 14px;
  pointer-events: auto;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.mp-ws-hud-healthbar.is-collapsed .mp-hud-health-body {
  display: none;
}

.mp-hud-health-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.mp-hud-health-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mp-hud-health-icon {
  font-size: 16px;
}

.mp-hud-health-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #f1eee6;
}

.mp-hud-health-score-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  font-family: monospace;
}

.mp-hud-health-score-badge.pass {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.mp-hud-health-score-badge.warning {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.mp-hud-health-score-badge.danger {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.mp-hud-health-toggle-btn {
  background: none;
  border: none;
  color: rgba(241, 238, 230, 0.6);
  cursor: pointer;
  font-size: 12px;
  padding: 2px 5px;
  border-radius: 4px;
  line-height: 1;
}

.mp-hud-health-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.mp-hud-health-body {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mp-hud-health-radar-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.mp-hud-health-metric-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 10.5px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mp-hud-health-metric-box .label {
  color: rgba(241, 238, 230, 0.6);
  font-size: 9.5px;
}

.mp-hud-health-metric-box .value {
  font-weight: 700;
  font-family: monospace;
}

.mp-hud-health-metric-box.pass .value {
  color: #34d399;
}

.mp-hud-health-metric-box.violation .value {
  color: #f87171;
}

.mp-hud-health-alert-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 6px 9px;
  font-size: 10.5px;
  line-height: 1.4;
  color: rgba(241, 238, 230, 0.85);
}

.mp-hud-health-alert-box.has-violations {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.mp-hud-btn-auto-heal {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 7px 12px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.mp-hud-btn-auto-heal:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.45);
}

.mp-hud-btn-auto-heal:active {
  transform: translateY(0);
}

.mp-hud-btn-auto-heal.is-healing {
  opacity: 0.75;
  pointer-events: none;
}

/* ==========================================================================
   GIAI ĐOẠN 3: EXECUTIVE PITCH DECK & 3D STORYTELLING OVERLAY (PHÍM F5)
   ========================================================================== */
.mp-ws-presentation-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: radial-gradient(circle at 50% 10%, #0f172a 0%, #030712 100%);
  color: #f8fafc;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  animation: mpFadeIn 0.25s ease-out;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.mp-pres-header {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.6);
  flex-shrink: 0;
}

.mp-pres-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.mp-pres-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(217, 119, 6, 0.15));
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fde68a;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 4px 10px;
  border-radius: 6px;
}

.mp-pres-proj-title {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mp-pres-header-center {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mp-pres-slide-badge {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #38bdf8;
}

.mp-pres-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mp-pres-btn-close {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #94a3b8;
  font-size: 18px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.mp-pres-btn-close:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #fca5a5;
  transform: rotate(90deg);
}

.mp-pres-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 48px;
  overflow-y: auto;
}

.mp-pres-slide-card {
  width: 100%;
  max-width: 1400px;
  min-height: 520px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  padding: 36px 40px;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 36px;
  position: relative;
  overflow: hidden;
  animation: mpSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes mpSlideIn {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.mp-pres-slide-left {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.mp-pres-slide-num {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: #38bdf8;
  letter-spacing: 1.5px;
  margin-bottom: 8px;
}

.mp-pres-slide-title {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.25;
  color: #ffffff;
  margin: 0 0 12px 0;
  background: linear-gradient(135deg, #ffffff 40%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.mp-pres-slide-desc {
  font-size: 14px;
  color: #94a3b8;
  line-height: 1.6;
  margin-bottom: 24px;
}

.mp-pres-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.mp-pres-kpi-box {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px 18px;
  transition: all 0.2s ease;
}

.mp-pres-kpi-box:hover {
  background: rgba(30, 41, 59, 0.9);
  border-color: rgba(56, 189, 248, 0.4);
  transform: translateY(-2px);
}

.mp-pres-kpi-lbl {
  font-size: 11px;
  color: #64748b;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.mp-pres-kpi-val {
  font-size: 22px;
  font-weight: 800;
  color: #f8fafc;
}

.mp-pres-kpi-sub {
  font-size: 11px;
  color: #10b981;
  margin-top: 4px;
}

.mp-pres-slide-right {
  background: rgba(2, 6, 23, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

.mp-pres-diagram-box {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.mp-pres-footer {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  background: rgba(15, 23, 42, 0.75);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.mp-pres-footer-left {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #64748b;
  font-size: 12px;
}

.mp-pres-kbd {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 11px;
  color: #e2e8f0;
}

.mp-pres-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

.mp-pres-btn-nav {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  padding: 8px 18px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.mp-pres-btn-nav:hover:not(:disabled) {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
  color: #38bdf8;
}

.mp-pres-btn-nav:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.mp-pres-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mp-pres-dot {
  width: 10px;
  height: 10px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all 0.25s ease;
}

.mp-pres-dot.active {
  width: 28px;
  background: linear-gradient(90deg, #38bdf8, #818cf8);
}

.mp-pres-btn-autoplay {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.mp-pres-btn-autoplay.is-playing {
  background: rgba(245, 158, 11, 0.2);
  border-color: #f59e0b;
  color: #fde68a;
}

/* ==========================================================================
   GÓI 1: SPATIAL COPILOT v2 & WALLY VOICE HUD STYLES
   ========================================================================== */
.mp-copilot-voice-btn {
  background: rgba(56, 189, 248, 0.18);
  border: 1px solid rgba(56, 189, 248, 0.45);
  color: #38bdf8;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.mp-copilot-voice-btn:hover {
  background: rgba(56, 189, 248, 0.35);
  border-color: #38bdf8;
  color: #ffffff;
  transform: translateY(-1px);
}

.mp-copilot-voice-btn.is-recording {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
  color: #fca5a5;
  animation: mpVoicePulse 1.2s infinite ease-in-out;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.6);
}

@keyframes mpVoicePulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6); }
  50% { transform: scale(1.05); box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}


/* ==========================================================================
   LACI GÓI 2: DÀN TRANG BẢN VẼ KỸ THUẬT A0/A1 & THUYẾT MINH THÔNG TƯ 04/2022
   ========================================================================== */

#mpWsBtnHeaderA0Sheets {
  background: rgba(2, 132, 199, 0.22) !important;
  border-color: #38bdf8 !important;
  color: #7dd3fc !important;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
}

#mpWsBtnHeaderA0Sheets:hover {
  background: rgba(2, 132, 199, 0.45) !important;
  color: #ffffff !important;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.5);
  transform: translateY(-1px);
}

#mpWsBtnDossierA0Sheets {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
  border-color: #38bdf8 !important;
  color: #ffffff !important;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.35);
  transition: all 0.2s ease;
}

#mpWsBtnDossierA0Sheets:hover {
  background: linear-gradient(135deg, #0369a1 0%, #075985 100%) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.5);
}

#mpWsBtnDownloadStatutoryDXF {
  background: linear-gradient(135deg, #0284c7 0%, #0891b2 100%);
  color: #ffffff;
  border: 1px solid #38bdf8;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

#mpWsBtnDownloadStatutoryDXF:hover {
  background: linear-gradient(135deg, #0369a1 0%, #0e7490 100%);
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.5);
  transform: translateY(-1px);
}

#mpWsSelectDrawingScale {
  background: #1e293b;
  color: #f8fafc;
  border: 1px solid rgba(56, 189, 248, 0.4);
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

#mpWsSelectDrawingScale:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.25);
}

.vn2000-grid line {
  shape-rendering: crispEdges;
}

.vn2000-grid text {
  user-select: none;
}

/* In ấn khổ lớn A0/A1 chuẩn xác */
@media print {
  body.mp-printing-a0 {
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
  }
  @page {
    size: 1189mm 841mm;
    margin: 0mm;
  }
}

/* ==========================================================================
   LACI GÓI 3: 3D WEBXR / VR & 24H SOLAR SHADOW STUDY
   ========================================================================== */

.mp-shadow-study-hud {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(251, 191, 36, 0.4);
  backdrop-filter: blur(12px);
  padding: 12px 18px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 520px;
  max-width: 90vw;
  pointer-events: auto;
}

.mp-shadow-hud-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mp-shadow-hud-badge {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.35);
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.mp-shadow-hud-val {
  font-size: 12px;
  font-weight: 700;
  color: #f8fafc;
}

.mp-shadow-hud-solstice {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  color: #34d399;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(52, 211, 153, 0.3);
  padding: 2px 8px;
  border-radius: 4px;
}

.mp-shadow-hud-slider-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mp-shadow-slider {
  flex: 1;
  accent-color: #fbbf24;
  cursor: pointer;
}

.mp-shadow-btn-play {
  background: #1e293b;
  border: 1px solid rgba(251, 191, 36, 0.35);
  color: #fbbf24;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.mp-shadow-btn-play:hover {
  background: #fbbf24;
  color: #0f172a;
}

.mp-shadow-btn-vr {
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
  border: 1px solid #c084fc;
  color: #ffffff;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.4);
}

.mp-shadow-btn-vr:hover {
  background: linear-gradient(135deg, #6d28d9 0%, #9333ea 100%);
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.7);
  transform: translateY(-1px);
}


/* ==========================================================================
   GÓI 4: PHÂN LÔ PHONG THỦY ĐÔ THỊ & KIỂM ĐỊNH ĐỊA CHÍNH AI (TT 25/2014 & THƯỚC LỖ BAN)
   ========================================================================== */

.mp-fsc-card {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 14px;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.mp-fsc-card:hover {
  border-color: rgba(245, 158, 11, 0.4);
  transform: translateY(-1px);
}

.mp-fsc-tab {
  transition: all 0.2s ease;
}

.mp-fsc-tab:hover {
  filter: brightness(1.15);
}

.mp-cadastral-table {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  overflow: hidden;
}

.mp-cadastral-table th {
  border-bottom: 2px solid rgba(255, 255, 255, 0.15);
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.5px;
}

.mp-cadastral-table td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 9px 12px;
}

.mp-cadastral-table tr:hover td {
  background: rgba(255, 255, 255, 0.04);
}

.mp-luban-good {
  color: #ef4444; /* Thước Lỗ Ban: Cung Đỏ là Cát Lành */
  font-weight: 700;
}

.mp-luban-bad {
  color: #94a3b8; /* Thước Lỗ Ban: Cung Đen là Hung Hại */
  font-weight: 500;
}


/* ==========================================================================
   GÓI 5: LACI MULTIPLAYER STUDIO (FIGMA CHO QUY HOẠCH ĐÔ THỊ)
   ========================================================================== */

.mp-multiplayer-header-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mp-mp-avatar-stack {
  display: flex;
  align-items: center;
  margin-right: 4px;
}

.mp-mp-avatar-stack .mp-mp-avatar-mini {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  margin-left: -8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  transition: transform 0.2s ease, z-index 0.2s ease;
}

.mp-mp-avatar-stack .mp-mp-avatar-mini:first-child {
  margin-left: 0;
}

.mp-mp-avatar-stack .mp-mp-avatar-mini:hover {
  transform: translateY(-2px) scale(1.15);
  z-index: 10;
}

.mp-mp-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.mp-mp-live-indicator {
  font-size: 11.5px;
  color: #4ade80;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-shadow: 0 0 8px rgba(74, 222, 128, 0.5);
}

.mp-mp-btn-room {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(96, 165, 250, 0.35);
  color: #93c5fd;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.mp-mp-btn-room:hover {
  background: rgba(59, 130, 246, 0.3);
  border-color: #60a5fa;
  color: #ffffff;
}

.mp-mp-user-card {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  backdrop-filter: blur(8px);
  transition: all 0.2s ease;
}

.mp-mp-user-card:hover {
  border-color: rgba(59, 130, 246, 0.4);
  transform: translateY(-1px);
}

.mp-parcel-locked-glow {
  animation: mpParcelPulse 1.8s infinite alternate;
  filter: drop-shadow(0 0 6px rgba(59, 130, 246, 0.8));
}

@keyframes mpParcelPulse {
  0% { opacity: 0.7; }
  100% { opacity: 1.0; }
}


/* Nổi bật và mở rộng Phân khu 02: Kiến Tạo Hình Thái & Kịch Bản AI */
#mpAccSection2 {
  border-color: rgba(196, 163, 109, 0.45) !important;
  background: rgba(196, 163, 109, 0.025) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35) !important;
}
#mpAccSection2 .mp-ws-accordion-header {
  background: linear-gradient(90deg, rgba(196, 163, 109, 0.16), rgba(255, 255, 255, 0.02)) !important;
  border-bottom: 1px solid rgba(196, 163, 109, 0.25);
}
#mpAccSection2 .mp-ws-accordion-badge {
  background: rgba(196, 163, 109, 0.25) !important;
  color: #fbbf24 !important;
  border-color: rgba(196, 163, 109, 0.5) !important;
}


/* ========================================================
   MỞ RỘNG TOÀN DIỆN KHUNG PHẦN HIỂN THỊ: PHÂN KHU 02
   ======================================================== */
#mpAccSection2 {
  border-color: rgba(196, 163, 109, 0.55) !important;
  background: linear-gradient(180deg, rgba(196, 163, 109, 0.05) 0%, rgba(7, 16, 14, 0.85) 100%) !important;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45), 0 0 16px rgba(196, 163, 109, 0.15) !important;
  transition: all 0.25s ease !important;
}

#mpAccSection2 .mp-ws-accordion-header {
  background: linear-gradient(90deg, rgba(196, 163, 109, 0.22), rgba(255, 255, 255, 0.03)) !important;
  border-bottom: 1px solid rgba(196, 163, 109, 0.3) !important;
  padding: 10px 12px !important;
}

#mpAccSection2 .mp-ws-accordion-title {
  font-size: 12px !important;
  color: #fbbf24 !important;
  letter-spacing: 0.03em !important;
}

#mpAccSection2 .mp-ws-card {
  padding: 12px !important;
  background: rgba(0, 0, 0, 0.25) !important;
  border: 1px solid rgba(196, 163, 109, 0.25) !important;
  border-radius: 8px !important;
}

#mpAccSection2 .mp-ws-archetype-grid {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 8px !important;
  max-height: none !important;
  overflow: visible !important;
  margin-top: 6px !important;
}

#mpAccSection2 .mp-ws-archetype-btn {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(196, 163, 109, 0.25) !important;
  color: var(--mp-cream) !important;
  font-family: var(--mp-font) !important;
  font-size: 11px !important;
  padding: 9px 10px !important;
  min-height: 56px !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 2.5px !important;
  text-align: left !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

#mpAccSection2 .mp-ws-archetype-btn:hover {
  background: rgba(196, 163, 109, 0.16) !important;
  border-color: rgba(196, 163, 109, 0.6) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4) !important;
}

#mpAccSection2 .mp-ws-archetype-btn.active {
  background: linear-gradient(135deg, rgba(196, 163, 109, 0.3), rgba(16, 185, 129, 0.2)) !important;
  border-color: var(--mp-gold) !important;
  box-shadow: 0 0 16px rgba(196, 163, 109, 0.35) !important;
}

#mpAccSection2 .mp-ws-archetype-btn span {
  font-size: 16px !important;
}

#mpAccSection2 .mp-ws-archetype-btn b {
  font-size: 11.5px !important;
  font-weight: 700 !important;
  color: #fff !important;
}

#mpAccSection2 .mp-ws-archetype-btn small {
  font-size: 9.5px !important;
  color: #94a3b8 !important;
}

#mpAccSection2 .mp-ws-scenario-opt {
  padding: 11px 12px !important;
  border-radius: 8px !important;
  border-color: rgba(196, 163, 109, 0.25) !important;
}

#mpAccSection2 .mp-ws-scenario-opt__header {
  font-size: 13px !important;
  font-weight: 700 !important;
}

#mpAccSection2 .mp-ws-scenario-opt__desc {
  font-size: 11px !important;
  line-height: 1.4 !important;
}


/* ==========================================================================
   TỐI ƯU HÓA CUỘN CHUỘT & THANH CUỘN BẢNG ĐIỀU KHIỂN TRUNG TÂM (LEFT PANEL)
   ========================================================================== */
.mp-ws-left-panel::-webkit-scrollbar,
.mp-ws-right-hud::-webkit-scrollbar {
  width: 6px !important;
  display: block !important;
}

.mp-ws-left-panel::-webkit-scrollbar-track,
.mp-ws-right-hud::-webkit-scrollbar-track {
  background: rgba(7, 16, 14, 0.45) !important;
  border-radius: 4px !important;
}

.mp-ws-left-panel::-webkit-scrollbar-thumb,
.mp-ws-right-hud::-webkit-scrollbar-thumb {
  background: rgba(196, 163, 109, 0.4) !important;
  border-radius: 4px !important;
  border: 1px solid rgba(196, 163, 109, 0.25) !important;
}

.mp-ws-left-panel::-webkit-scrollbar-thumb:hover,
.mp-ws-right-hud::-webkit-scrollbar-thumb:hover {
  background: rgba(196, 163, 109, 0.8) !important;
}


/* ==========================================================================
   TỐI ƯU HÓA CUỘN CHUỘT MƯỢT MÀ CHO BẢNG ĐIỀU KHIỂN BÊN TRÁI (LEFT PANEL)
   ========================================================================== */
.mp-ws-left-panel,
.mp-ws-left-panel * {
  overscroll-behavior-y: contain;
}

.mp-ws-left-panel .mp-ws-accordion-section {
  overflow: visible !important;
}

.mp-ws-left-panel .mp-ws-accordion-section.is-collapsed {
  overflow: hidden !important;
}

.mp-ws-left-panel .mp-ws-accordion-content {
  overflow: visible !important;
}

/* ==========================================================================
   L.A.C.I v4.6 STRATEGIC UPGRADES: BIDIRECTIONAL SYNAPSE, VISUAL DIFF & HUDS
   ========================================================================== */

/* 1. Bidirectional Parcel Selection Highlight Pulse */
.is-selected-parcel > polygon:first-child,
.is-selected-parcel > path:first-child {
  stroke: #38bdf8 !important;
  stroke-width: 2.8px !important;
  stroke-linejoin: round !important;
  filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.85)) !important;
  animation: mpPulseSelectedParcel 2s ease-in-out infinite alternate !important;
}

@keyframes mpPulseSelectedParcel {
  0% { stroke: #38bdf8; filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.6)); }
  100% { stroke: #67e8f9; filter: drop-shadow(0 0 14px rgba(103, 232, 249, 0.95)); }
}

/* 2. Auto-Heal Visual Diff Modal & Pulse Halo */
.mp-autoheal-diff-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(7, 16, 14, 0.82);
  backdrop-filter: blur(8px);
}

.mp-diff-modal-card {
  width: 92vw;
  max-width: 580px;
  background: #0d1412;
  border: 1px solid rgba(196, 163, 109, 0.45);
  border-radius: 12px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85), 0 0 35px rgba(196, 163, 109, 0.15);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.mp-diff-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: rgba(13, 20, 18, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mp-diff-close-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
}

.mp-diff-close-btn:hover {
  background: rgba(239, 68, 68, 0.25);
  color: #fca5a5;
}

.mp-diff-modal-body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mp-diff-item {
  background: rgba(255, 255, 255, 0.03);
  border-left: 3px solid #34d399;
  padding: 8px 12px;
  border-radius: 0 6px 6px 0;
  font-size: 11.5px;
  color: #e2e8f0;
  line-height: 1.45;
}

.mp-diff-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 18px;
  background: rgba(7, 16, 14, 0.7);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.mp-diff-btn-cancel {
  padding: 8px 16px;
  border-radius: 6px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #cbd5e1;
  font-size: 11.5px;
  cursor: pointer;
}

.mp-diff-btn-apply {
  padding: 8px 18px;
  border-radius: 6px;
  background: linear-gradient(135deg, #10b981, #059669);
  border: 1px solid #34d399;
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

/* 3. Ghost Compare Floating Badge */
.mp-ghost-compare-badge {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 11.5px;
  color: #f1f5f9;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  pointer-events: auto;
}

/* 4. 3D Storyboard Bookmarks Bar */
.mp-3d-storyboard-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 0;
  max-width: 100%;
}

.mp-3d-bookmark-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #f1eee6;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 10.5px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.mp-3d-bookmark-chip:hover {
  background: rgba(196, 163, 109, 0.25);
  border-color: #c4a36d;
  color: #fff;
}


/* ==========================================================================
   L.A.C.I v4.3 — TABLET & TOUCH SCREEN ERGONOMICS ENHANCEMENT
   ========================================================================== */
@media (max-width: 1024px), (pointer: coarse) {
  /* 1. Header Toolbar Adaptive Wrapping */
  .mp-ws-header-actions {
    flex-wrap: wrap !important;
    gap: 6px !important;
    padding: 6px 0 !important;
  }

  .mp-ws-btn-tool,
  .mp-cad-tool-btn,
  .mp-ws-btn-action,
  .mp-unitmix-btn {
    min-height: 40px !important;
    padding: 8px 14px !important;
    font-size: 12px !important;
    touch-action: manipulation;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
  }

  .mp-ws-btn-tool:active,
  .mp-cad-tool-btn:active {
    transform: scale(0.96);
  }

  /* 2. Floating Quick Action Button (FAB) for Mobile/Tablet */
  .mp-ws-mobile-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0284c7, #2563eb);
    color: #fff;
    border: 2px solid #38bdf8;
    box-shadow: 0 10px 25px rgba(2, 132, 199, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    cursor: pointer;
    z-index: 9999;
    touch-action: manipulation;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }

  .mp-ws-mobile-fab:active {
    transform: scale(0.92);
  }

  /* 3. Smooth Touch Scrolling */
  .mp-ws-left-panel,
  .mp-ws-accordion-content,
  .mp-command-results {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
}

/* ==========================================================================
   L.A.C.I v4.3.2 — SMART FOCUS VIEW & GLASS CAPSULE DOCK
   ========================================================================== */
.mp-workstation.is-focus-active .mp-ws-header {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%) translateY(-75%);
  z-index: 9999;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: 0 0 16px 16px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s;
  opacity: 0.4;
  padding: 6px 20px;
}

.mp-workstation.is-focus-active .mp-ws-header:hover {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.mp-workstation.is-focus-active .mp-ws-left-panel {
  transform: translateX(-100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: absolute;
  z-index: 9998;
  height: 100%;
}

.mp-workstation.is-focus-active .mp-ws-left-panel:hover {
  transform: translateX(0);
}

.mp-workstation.is-focus-active .mp-ws-main-viewport {
  width: 100% !important;
  flex: 1 1 100% !important;
}

/* ==========================================================================
   L.A.C.I v4.3.3 — AMBIENT LIGHTING & EYE-CARE MODES
   ========================================================================== */
.mp-workstation.ambient-sunlight {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}

.mp-workstation.ambient-sunlight .mp-ws-header,
.mp-workstation.ambient-sunlight .mp-ws-left-panel,
.mp-workstation.ambient-sunlight .mp-ws-accordion-section {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}

.mp-workstation.ambient-sunlight .mp-ws-btn-tool {
  background: #e2e8f0 !important;
  color: #0f172a !important;
  border-color: #94a3b8 !important;
}

.mp-workstation.ambient-amber {
  filter: sepia(0.25) hue-rotate(-12deg) brightness(0.92);
}
