/* Đặt lịch Nhà hàng (tiền tố nh-). Bảng giờ, form, nút dùng lại lớp ms- ở lich-massage.css.
   Màu thanh theo giai đoạn: design/tokens.json nha_hang_giai_doan */
.nh-than { flex: 1; min-height: 0; display: flex; gap: 20px; }
.nh-cot-trai { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.nh-ban-som { flex: none; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; background: #E3F1E5; color: #1D4A27; font-size: calc(13.5px * var(--co-chu)); line-height: 1.35; }
.nh-ban-som svg { flex: none; }
.nh-trang .ms-hang-chu-thich { gap: 14px; font-size: calc(12.5px * var(--co-chu)); }
.nh-trang .ms-chu-thich { gap: 14px; }
.nh-trang .ms-chu-thich i { width: 20px; }

.nh-lg-da_dat_lich { background: #E2EBF5; box-shadow: inset 0 0 0 1.5px #8FB0D3; }
.nh-lg-da_goi_mon { background: #FBEBC8; box-shadow: inset 0 0 0 1.5px #E2B65A; }
.nh-lg-da_che_bien { background: #DCEFD9; box-shadow: inset 0 0 0 1.5px #7DBB86; }
.nh-lg-da_an_xong { background: #ECEAE3; box-shadow: inset 0 0 0 1.5px #C9C5B8; }
.nh-g-da_dat_lich { background: #E2EBF5; color: #2B4C70; }
.nh-g-da_goi_mon { background: #FBEBC8; color: #7A4E05; }
.nh-g-da_che_bien { background: #DCEFD9; color: #1F5A2B; }
.nh-g-da_an_xong { background: #ECEAE3; color: #6B6557; }

/* Ngăn chi tiết bên phải */
.nh-panel { width: 360px; flex: none; padding: 16px 18px; overflow: auto; display: flex; flex-direction: column; min-height: 0; }
.nh-panel > .khung-trong { margin: auto 0; }
.nh-ct { display: flex; flex-direction: column; gap: 12px; flex: 1; min-height: 0; }
.nh-ct-dau { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.nh-ct-dau h2 { margin: 0; font-size: calc(17px * var(--co-chu)); font-weight: 700; color: var(--xanh-dam); }
.nh-ct-tieu-phu { font-size: calc(16px * var(--co-chu)); font-weight: 700; color: var(--xanh-dam); }
.nh-buoc { display: flex; list-style: none; margin: 0; padding: 0; }
.nh-buoc li { flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 0; }
.nh-buoc li + li::before { content: ''; position: absolute; top: 12px; right: 50%; width: 100%; height: 2px; background: #E1DDD1; }
.nh-buoc li.xong + li.xong::before { background: var(--xanh-rung); }
.nh-vong { position: relative; z-index: 1; width: 26px; height: 26px; border-radius: 50%; border: 2px solid #D3CEBF; background: #fff; color: #fff; display: flex; align-items: center; justify-content: center; }
.nh-buoc li.xong .nh-vong { background: var(--xanh-rung); border-color: var(--xanh-rung); }
.nh-ten-buoc { font-size: 11px; font-weight: 700; text-align: center; line-height: 1.2; color: var(--chu-phu); }
.nh-buoc li.hien .nh-ten-buoc { color: var(--xanh-dam); }
.nh-khach { font-size: calc(13.5px * var(--co-chu)); line-height: 1.6; padding: 10px 12px; border-radius: 12px; background: #F6F5EF; }
.nh-sdt { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--xanh-dam); }
.nh-vong-ds { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.nh-vong-chip { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px 0 7px; border-radius: 999px; background: #E3F1E5; color: #1D4A27; font-size: 11.5px; font-weight: 700; border: 1px solid #C3DEC8; }
.nh-vong-chip i { width: 6px; height: 6px; border-radius: 50%; background: var(--xanh-rung); }
.nh-mon-dau { display: flex; justify-content: space-between; align-items: center; }
.nh-nhan-nho { font-size: calc(13px * var(--co-chu)); font-weight: 700; color: #8A8372; }
.nh-mo { color: var(--chu-phu); font-size: calc(12px * var(--co-chu)); }
.nh-mon-dong { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: calc(13.5px * var(--co-chu)); padding: 7px 0; border-bottom: 1px solid #F0ECE2; }
.nh-mon-dong > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.nh-nguon { font-style: normal; font-size: 11px; font-weight: 700; color: var(--chu-phu); background: #F0ECE2; border-radius: 6px; padding: 1px 6px; white-space: nowrap; }
.nh-gia { font-weight: 700; color: var(--xanh-dam); white-space: nowrap; }
.nh-phieu { margin-top: 8px; display: flex; gap: 6px; align-items: center; font-size: 12.5px; color: #1D4A27; font-weight: 500; }
.nh-phieu.loi { color: var(--canh-bao); }
.nh-qr-nho { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 12px; border: 1px dashed #CFC9B8; }
.nh-qr-anh { padding: 0; border: 0; background: #fff; border-radius: 8px; flex: none; line-height: 0; }
.nh-qr-anh img { display: block; border-radius: 6px; }
.nh-qr-chu { display: flex; flex-direction: column; gap: 2px; font-size: calc(12.5px * var(--co-chu)); line-height: 1.45; min-width: 0; }
.nh-qr-chu span { color: var(--chu-phu); }
.nh-qr-lien { display: flex; gap: 14px; margin-top: 2px; }
.nh-qr-lien button { background: none; border: 0; padding: 4px 0; color: var(--xanh-rung); font-weight: 700; font-size: calc(12.5px * var(--co-chu)); text-decoration: underline; min-height: 32px; }
.nh-qr-lon { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 10px; border-radius: 14px; border: 1px dashed #CFC9B8; text-align: center; }
.nh-qr-lon .nh-qr-anh { padding: 8px; border: 1px solid var(--vien); border-radius: 14px; }
.nh-qr-lon .nh-qr-chu { align-items: center; font-size: calc(13px * var(--co-chu)); }
.nh-qr-nut { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.nh-qr-nut .nut-chung.nho { padding: 0 10px; font-size: calc(13px * var(--co-chu)); gap: 5px; }
.nh-qr-het { display: flex; gap: 8px; align-items: flex-start; font-size: calc(13px * var(--co-chu)); color: var(--chu-phu); padding: 10px 12px; border-radius: 12px; background: #F6F5EF; }
.nh-ct-nut { margin-top: auto; padding: 8px 0 16px; margin-bottom: -16px; display: flex; gap: 8px; position: sticky; bottom: -16px; background: #fff; }
.nh-ct-nut > .nut-chung, .nh-ct-nut > .nut-chung.chinh { flex: 1; }
.nh-ct-nut > .nut-chung:last-child:not(:first-child), .nh-ct-nut > .nut-chung.chinh:last-child:not(:first-child) { flex: 1.4; }
.nh-ghi-xong { margin: 0; font-size: calc(13px * var(--co-chu)); color: var(--chu-phu); text-align: center; }

/* Form tạo lịch */
.nh-hai-cot { display: grid; grid-template-columns: auto 1fr; gap: 16px 22px; align-items: start; }
.nh-so-khach { align-self: flex-start; display: inline-flex; align-items: center; border: 1.5px solid var(--vien-dam); border-radius: 12px; height: 48px; background: #fff; }
.nh-so-khach button { width: 46px; height: 45px; border: 0; background: none; color: var(--xanh-rung); display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; }
.nh-so-khach button:disabled { opacity: .35; }
.nh-so-khach b { min-width: 40px; text-align: center; font-size: calc(17px * var(--co-chu)); }
.nh-thoi-gian .chip.ms-chon { padding: 0 14px; }

/* Hộp mã QR sau khi tạo lịch */
.nh-modal-nut { display: flex; gap: 10px; flex: 1; }
.nh-modal-nut > .nut-chung, .nh-modal-nut > .nut-chung.chinh { flex: 1; }
.nh-modal-qr { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.nh-modal-qr h3 { margin: 0; font-size: calc(19px * var(--co-chu)); color: var(--xanh-dam); }
.nh-tich { width: 52px; height: 52px; border-radius: 50%; background: #E3F1E5; color: var(--xanh-rung); display: flex; align-items: center; justify-content: center; }
.nh-phu { margin: 0; color: var(--chu-phu); font-size: calc(13.5px * var(--co-chu)); }
.nh-qr-khung { padding: 10px; background: #fff; border: 1px solid var(--vien); border-radius: 18px; line-height: 0; margin: 6px 0; }
.nh-qr-khung img { width: min(260px, 62vw); height: auto; }
.nh-moi { margin: 0; font-size: calc(14px * var(--co-chu)); line-height: 1.55; max-width: 380px; }
.nh-ghi { margin: 0; font-size: calc(12.5px * var(--co-chu)); color: var(--chu-phu); }
.nh-link { display: flex; gap: 8px; width: 100%; align-items: center; }
.nh-link input { flex: 1; min-width: 0; height: 36px; border: 1px solid var(--vien-dam); border-radius: 10px; padding: 0 10px; font-size: 12.5px; background: var(--ban-ghi); color: var(--chu-phu); }

/* In riêng mã QR (nút "In mã QR"): chỉ vùng này hiện khi in */
.nh-vung-in { display: none; }
@media print {
  body.nh-dang-in > *:not(.nh-vung-in) { display: none !important; }
  body.nh-dang-in .nh-vung-in { display: block; text-align: center; padding: 10mm; font-family: var(--font); color: #000; }
  .nh-in-tieu { font-size: 22pt; font-weight: 700; }
  .nh-in-phu { font-size: 12pt; margin: 2mm 0 6mm; }
  .nh-in-qr { width: 72mm; height: 72mm; }
  .nh-in-chan { font-size: 11pt; margin-top: 6mm; line-height: 1.5; }
}

@media (max-width: 767px) {
  .nh-than { gap: 0; }
  .nh-ban-som { padding: 8px 10px; font-size: calc(12.5px * var(--co-chu)); }
  .nh-trang .ms-hang-chu-thich { flex-wrap: wrap; gap: 6px 12px; }
  .nh-trang .ms-chu-thich { flex-wrap: wrap; margin-left: 0; gap: 4px 12px; font-size: calc(12px * var(--co-chu)); }
  .nh-trang .ms-chu-thich i { width: 18px; height: 10px; }
  .nh-cot-trai { min-width: 0; }
  .nh-hai-cot { grid-template-columns: 1fr; }
  .nh-qr-lon .nh-qr-anh img { width: 200px; height: 200px; }
}
