/* [02/11/2026] Đổi toàn bộ checkbox QLNS thành switch — CHỈ đổi giao diện, không đụng tick/name/value/sự kiện.
   Nạp 1 lần ở khung: lib/nhan_su_html_header.lbi, lib/html_header.lbi, dmn_soft/soft/lib/html_header.lbi + vài trang tự có <head>.
   - Mọi selector bọc :where() nên độ ưu tiên = 0: switch tự làm và CSS riêng của trang vẫn thắng.
   - Vẽ bằng background, không dùng ::before (pseudo trên input không ổn định).
   - Không đặt display: để [hidden], display:none của trang vẫn có tác dụng.
   - Chỉ áp màn hình: bản in giữ ô tick gốc (trình duyệt bỏ background khi in).
   - Muốn giữ ô vuông: thêm class khong-switch vào input hoặc khung bao ngoài. */
@media screen
{
	:where(input[type="checkbox"]:not(.khong-switch, .khong-switch *))
	{
		--sw-nen: #c3c8d1;
		--sw-vt: 0 0;
		-webkit-appearance: none;
		-moz-appearance: none;
		appearance: none;
		box-sizing: border-box;
		width: 30px;
		height: 16px;
		padding: 0;
		border: 0;
		border-radius: 8px;
		flex-shrink: 0;
		vertical-align: middle;
		cursor: pointer;
		background-color: var(--sw-nen);
		background-image: radial-gradient(circle at center, #fff 0, #fff 5.5px, rgba(255, 255, 255, 0) 6.2px);
		background-repeat: no-repeat;
		background-size: 16px 16px;
		background-position: var(--sw-vt);
		transition: background-color .15s ease, background-position .15s ease;
	}
	:where(input[type="checkbox"]:not(.khong-switch, .khong-switch *)):hover
	{
		--sw-nen: #aeb4bf;
	}
	:where(input[type="checkbox"]:not(.khong-switch, .khong-switch *)):checked
	{
		--sw-nen: #e95211;
		--sw-vt: 14px 0;
	}
	:where(input[type="checkbox"]:not(.khong-switch, .khong-switch *)):indeterminate
	{
		--sw-nen: #f3a988;
		--sw-vt: 7px 0;
	}
	:where(input[type="checkbox"]:not(.khong-switch, .khong-switch *)):disabled
	{
		opacity: .5;
		cursor: not-allowed;
	}
	:where(input[type="checkbox"]:not(.khong-switch, .khong-switch *)):focus-visible
	{
		outline: 2px solid rgba(233, 82, 17, .5);
		outline-offset: 1px;
	}

	/* Ép lại những chỗ CSS riêng đặt cỡ ô vuông (16-18px) hoặc rule chung "x input" có nền/viền/padding:
	   ô gốc của trình duyệt bỏ qua nền/viền nên trước đây vô hại, nay sẽ làm mất hình switch. Bỏ qua input đi kèm thẻ span/label rỗng (kiểu vẽ switch tự làm). */
	/* [20/11/2026] anh Huy: "các option hay bị như này… khắc phục triệt để" — trước chỉ ép trong DANH SÁCH lớp ghi tay, trang mới
	   (vd /kinh-doanh/san-pham-shopvnb .spw-bat input{width:18px}) không có trong danh sách → switch bị bóp thành chấm xám.
	   Nay ép cho MỌI checkbox dạng switch (vẫn bỏ qua: .khong-switch, .c-switch-input, switch tự vẽ có span/label rỗng liền sau). */
	:where(input[type="checkbox"]:not(.khong-switch, .khong-switch *):not(.c-switch-input):not(:has(+ span:empty)):not(:has(+ label:empty)))
	{
		width: 30px !important;
		min-width: 30px !important;
		height: 16px !important;
		flex: 0 0 30px !important;
		padding: 0 !important;
		border: 0 !important;
		border-radius: 8px !important;
		background-color: var(--sw-nen) !important;
		background-image: radial-gradient(circle at center, #fff 0, #fff 5.5px, rgba(255, 255, 255, 0) 6.2px) !important;
		background-repeat: no-repeat !important;
		background-size: 16px 16px !important;
		background-position: var(--sw-vt) !important;
	}

	/* Bootstrap: ô đặt absolute trong phần đệm 20px của nhãn, switch 30px sẽ đè chữ — đưa về dòng chữ. */
	:where(.checkbox, .checkbox-inline) :where(input[type="checkbox"]:not(.khong-switch, .khong-switch *):not(:has(+ span:empty)):not(:has(+ label:empty))),
	:where(.checkbox-inline) > :where(input[type="checkbox"]:not(.khong-switch, .khong-switch *))
	{
		position: static !important;
		margin: 0 6px 0 -20px !important;
	}
	:where(.form-check:not(.form-check-inline)) > :where(input.form-check-input[type="checkbox"]:not(.khong-switch, .khong-switch *))
	{
		position: static !important;
		margin: 0 6px 0 -1.25rem !important;
	}
	/* Kendo 2014: k-checkbox là input thường + nhãn liền sau, thêm khoảng cách. */
	:where(input.k-checkbox[type="checkbox"]:not(.khong-switch, .khong-switch *))
	{
		margin-right: 6px !important;
	}
}
