/* Gói D mục 2: cụm nút nổi CRM – bên phải giữa màn hình; ≤ 640px: góc dưới phải. Cụm mở thì chừa lề phải cho nội dung để không che cột tiền / nút cuối bảng. */
.nn { position: fixed; right: 6px; top: 50%; transform: translateY(-50%); z-index: 900; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.nn .nn-ds { display: flex; flex-direction: column; gap: 6px; }
.nn.nn-dong .nn-ds { display: none; }
.nn .nn-nut { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 52px; min-height: 48px; padding: 4px 2px; border: 0; border-radius: 12px; color: #fff; font-size: 11px; line-height: 1.15; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.18); text-align: center; }
.nn .nn-nut[hidden] { display: none; }
.nn .nn-ic { font-size: 16px; font-weight: 700; line-height: 1; }
.nn .nn-chu { margin-top: 2px; }
.nn .nn-so { display: none; }
.nn .nn-hoithoai { background: #475569; }
.nn .nn-goi { background: #0a7d3b; }
.nn .nn-zalo { background: #0068ff; }
.nn .nn-huongdan { background: #7c3aed; }
.nn .nn-dem { position: absolute; top: -5px; left: -5px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: #dc2626; color: #fff; font-size: 11px; line-height: 18px; font-weight: 700; white-space: nowrap; }
.nn .nn-dem[hidden] { display: none; }
.nn .nn-gon { width: 52px; min-height: 26px; border: 1px solid #c8ced6; border-radius: 10px; background: #fff; color: #334; cursor: pointer; font-size: 14px; }
.nn .nn-nut:focus-visible, .nn .nn-gon:focus-visible { outline: 3px solid #f59e0b; outline-offset: 2px; }
html.nn-mo #main { padding-right: 68px; }
html.nn-gon #main { padding-right: 68px; }
.nn-hoi { position: fixed; right: 68px; top: 50%; transform: translateY(-50%); z-index: 901; width: 320px; max-width: calc(100vw - 90px); background: #fff; border: 1px solid #d5dbe3; border-radius: 12px; box-shadow: 0 6px 24px rgba(0,0,0,.18); padding: 10px 12px; }
.nn-hoi[hidden] { display: none; }
.nn-hoi .nn-hoi-dau { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.nn-hoi .nn-x { border: 0; background: none; font-size: 20px; cursor: pointer; line-height: 1; }
@media (max-width: 640px) {
  .nn { top: auto; bottom: 12px; right: 10px; transform: none; flex-direction: column-reverse; }
  .nn .nn-ds { flex-direction: column; }
  .nn .nn-nut { width: 48px; min-height: 44px; }
  .nn .nn-gon { width: 48px; }
  html.nn-mo #main { padding-right: 60px; padding-bottom: 20px; }
  html.nn-gon #main { padding-right: 0; padding-bottom: 50px; }
  .nn-hoi { right: 8px; left: 8px; top: auto; bottom: 70px; transform: none; width: auto; max-width: none; }
}
@media print { .nn, .nn-hoi { display: none !important; } }
