/* CNP Lịch xem nhà – theo Bảng màu chuẩn CNP (biến --cnp-*). Phông chữ lấy của web. */
:root {
	--cnp-than: #1f2e35; --cnp-chu: #2b2b2b; --cnp-mo: #6e6a62; --cnp-nen: #fff; --cnp-kem: #f7f4eb; --cnp-be: #efe7d6; --cnp-vien: #e5dccb;
	--cnp-vang: #c89434; --cnp-vang-dam: #8c6418; --cnp-vang-nhat: #f6ecd3; --cnp-xanh: #307468; --cnp-xanh-nhat: #e1efe9; --cnp-gach: #b4482c; --cnp-gach-nhat: #f8e4dc;
}
/* Chế độ tối: chỉ khi bật trong CNP Hiển thị (thân trang có lớp cnp-toi) và máy khách để chế độ tối. */
@media (prefers-color-scheme: dark) {
	body.cnp-toi {
		--cnp-than: #0f1518; --cnp-chu: #efe9dc; --cnp-mo: #b3aa98; --cnp-nen: #26231d; --cnp-kem: #1e1b16; --cnp-be: #2c2820; --cnp-vien: #3d372c;
		--cnp-vang: #e0b84a; --cnp-vang-dam: #e0b84a; --cnp-vang-nhat: #3b3220; --cnp-xanh: #4fa596; --cnp-xanh-nhat: #1f332e; --cnp-gach: #e07a5c; --cnp-gach-nhat: #3a2620;
	}
}

/* ---------- Nút, nhãn trạng thái ---------- */
.cnplx-nut { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 0 16px; border: 1px solid var(--cnp-vang); border-radius: 10px;
	background: var(--cnp-vang); color: #1f2e35; font: inherit; font-weight: 700; text-transform: none; letter-spacing: 0; line-height: 1.2; cursor: pointer; text-decoration: none; margin: 0; }
.cnplx-nut:hover { filter: brightness(1.05); color: #1f2e35; }
.cnplx-nut:disabled { opacity: .6; cursor: default; }
.cnplx-nut.cnplx-phu { background: var(--cnp-nen); border-color: var(--cnp-vien); color: var(--cnp-chu); }
.cnplx-nut.cnplx-do { color: var(--cnp-gach); }
.cnplx-phu.cnplx-do { border-color: var(--cnp-gach); }
.cnplx-nut.cnplx-do:not(.cnplx-phu) { background: var(--cnp-gach); border-color: var(--cnp-gach); color: #fff; }

.cnplx-tt { display: inline-block; padding: 1px 9px; border-radius: 10px; font-size: 12px; font-weight: 700; white-space: nowrap; background: var(--n); color: var(--m); }
.cnplx-tt-moi, .cnplx-the-moi { --m: var(--cnp-gach); --n: var(--cnp-gach-nhat); }
.cnplx-tt-chu, .cnplx-the-chu { --m: var(--cnp-vang-dam); --n: var(--cnp-vang-nhat); }
.cnplx-tt-hen, .cnplx-the-hen { --m: var(--cnp-xanh); --n: var(--cnp-xanh-nhat); }
.cnplx-tt-xem, .cnplx-the-xem { --m: var(--cnp-chu); --n: var(--cnp-be); }
.cnplx-tt-huy, .cnplx-the-huy { --m: var(--cnp-mo); --n: var(--cnp-kem); }

.cnplx-mo { color: var(--cnp-mo); font-size: 13px; margin: 6px 0; }
.cnplx-hang { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.cnplx-hop-nho { background: var(--cnp-kem); border: 1px solid var(--cnp-vien); border-radius: 12px; padding: 14px 16px; color: var(--cnp-chu); }

/* ---------- Nhà quan tâm, Tài khoản ---------- */
.cnplx-quan-tam, .cnplx-tk { display: grid; gap: 10px; color: var(--cnp-chu); }
.cnplx-dong { display: flex; align-items: center; gap: 10px; background: var(--cnp-nen); border: 1px solid var(--cnp-vien); border-radius: 12px; padding: 10px 12px; }
.cnplx-dong-ten { flex: 1; min-width: 0; }
.cnplx-dong-ten a { color: var(--cnp-chu); }
.cnplx-dong .cnplx-nut { flex: none; min-height: 38px; }
.cnplx-the { background: var(--cnp-nen); border: 1px solid var(--cnp-vien); border-left: 5px solid var(--m); border-radius: 12px; padding: 12px 14px; }
.cnplx-the-dau { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; color: var(--cnp-chu); }
.cnplx-the ul { margin: 8px 0 4px 18px; padding: 0; }
.cnplx-the li { margin: 2px 0; }

/* ---------- Hộp đặt lịch ---------- */
.cnplx-nen { position: fixed; inset: 0; z-index: 100000; background: rgba(15, 21, 24, .55); display: none; align-items: center; justify-content: center; padding: 16px; box-sizing: border-box; }
.cnplx-nen.cnplx-mo-hop { display: flex; }
.cnplx-hop { width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; box-sizing: border-box; background: var(--cnp-nen); color: var(--cnp-chu); border-radius: 16px; padding: 20px; }
.cnplx-hop h2 { margin: 0 0 4px; font-size: 20px; color: var(--cnp-chu); text-transform: none; }
.cnplx-hop *, .cnplx-hop *::before { box-sizing: border-box; }
.cnplx-giua { text-align: center; }
.cnplx-giua .cnplx-hang { justify-content: center; }
.cnplx-tick { display: inline-flex; width: 52px; height: 52px; border-radius: 50%; align-items: center; justify-content: center; background: var(--cnp-xanh-nhat); color: var(--cnp-xanh); font-size: 26px; margin-bottom: 8px; }
.cnplx-buoc { margin: 14px 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--cnp-mo); }
.cnplx-ngay { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cnplx-gio { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.cnplx-ngay button, .cnplx-gio button { margin: 0; padding: 7px 2px; min-height: 0; border: 1.5px solid var(--cnp-vien); border-radius: 10px; background: var(--cnp-kem); color: var(--cnp-chu);
	font: inherit; text-transform: none; letter-spacing: 0; line-height: 1.25; cursor: pointer; }
.cnplx-gio button { background: var(--cnp-nen); }
.cnplx-ngay small { display: block; font-size: 11px; color: var(--cnp-mo); }
.cnplx-ngay b { font-size: 17px; }
.cnplx-ngay .cnplx-chon, .cnplx-gio .cnplx-chon { border-color: var(--cnp-vang); background: var(--cnp-vang-nhat); font-weight: 700; }
.cnplx-gio button:disabled { opacity: .4; text-decoration: line-through; cursor: default; }
.cnplx-gio .cnplx-gio-khac { grid-column: span 2; border-style: dashed; }
.cnplx-o { display: block; margin-top: 10px; font-size: 13px; font-weight: 600; }
.cnplx-o input, .cnplx-o textarea { display: block; width: 100%; margin: 4px 0 0; padding: 9px 11px; border: 1px solid var(--cnp-vien); border-radius: 10px; background: var(--cnp-kem); color: var(--cnp-chu); font: inherit; font-weight: 400; box-shadow: none; height: auto; }
.cnplx-o small { display: block; font-weight: 400; color: var(--cnp-mo); margin-top: 4px; }
.cnplx-them { display: grid; gap: 6px; }
.cnplx-them label { display: flex; gap: 10px; align-items: center; margin: 0; padding: 9px 12px; border: 1px solid var(--cnp-vien); border-radius: 10px; font-weight: 400; cursor: pointer; }
.cnplx-them input { margin: 0; flex: none; accent-color: var(--cnp-vang); }
.cnplx-them span { min-width: 0; }
.cnplx-tom-tat { margin-top: 14px; padding: 10px 12px; border-radius: 10px; background: var(--cnp-xanh-nhat); font-size: 13.5px; }
.cnplx-loi { color: var(--cnp-gach); font-size: 13px; min-height: 1em; margin: 8px 0 0; }
.cnplx-cuoi { justify-content: flex-end; }
@media (max-width: 549px) {
	.cnplx-nen { align-items: flex-end; padding: 0; }
	.cnplx-hop { border-radius: 16px 16px 0 0; max-height: 92vh; padding: 16px; }
	.cnplx-gio { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.cnplx-gio .cnplx-gio-khac { grid-column: span 3; }
	.cnplx-ngay b { font-size: 15px; }
	.cnplx-cuoi .cnplx-nut { flex: 1; }
}

/* ---------- Trang quản trị ---------- */
.cnplx-thanh { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0; }
.cnplx-kieu { display: inline-flex; gap: 2px; }
.cnplx-chu-giai { display: inline-flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.cnplx-gio-khac-ds { border: 1.5px dashed var(--cnp-gach); border-radius: 10px; padding: 8px 12px; margin-bottom: 12px; background: #fff; }
.cnplx-gio-khac-ds > b { color: var(--cnp-gach); }
.cnplx-gio-khac-ds [data-buoi] { padding: 4px 0; cursor: pointer; }
.cnplx-tuan { background: #fff; border: 1px solid var(--cnp-vien); border-radius: 10px; overflow: hidden; }
.cnplx-tuan-dau, .cnplx-tuan-than { display: grid; grid-template-columns: 48px repeat(7, minmax(0, 1fr)); }
.cnplx-tuan-dau span { padding: 8px 4px; text-align: center; font-weight: 600; background: var(--cnp-kem); border-left: 1px solid var(--cnp-vien); border-bottom: 1px solid var(--cnp-vien); }
.cnplx-tuan-dau .cnplx-hom-nay { background: var(--cnp-vang-nhat); }
.cnplx-cot-gio span { display: block; box-sizing: border-box; padding: 2px 6px 0 0; text-align: right; font-size: 11px; color: var(--cnp-mo); border-top: 1px dashed var(--cnp-vien); }
.cnplx-cot { position: relative; border-left: 1px solid var(--cnp-vien); background-image: linear-gradient(to bottom, var(--cnp-vien) 1px, transparent 1px); }
.cnplx-buoi { position: absolute; box-sizing: border-box; padding: 4px 6px; margin: 1px 0 0; overflow: hidden; text-align: left; font-size: 12px; line-height: 1.3; cursor: pointer;
	border: 0; border-left: 4px solid var(--m); border-radius: 7px; background: var(--n); color: var(--cnp-chu); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.cnplx-buoi.cnplx-dang-mo { outline: 2px solid var(--cnp-than); }
.cnplx-trung { display: inline-block; font-style: normal; font-size: 11px; font-weight: 700; color: #fff; background: var(--cnp-gach); border-radius: 6px; padding: 0 5px; }
.cnplx-buoi .cnplx-trung { float: right; margin-left: 4px; }
.cnplx-chon-ngay { display: flex; flex-wrap: wrap; gap: 4px; }
.cnplx-dong-ds { display: block; width: 100%; box-sizing: border-box; text-align: left; margin: 0 0 8px; padding: 10px 12px; cursor: pointer; font: inherit;
	background: #fff; border: 1px solid var(--cnp-vien); border-left: 5px solid var(--m); border-radius: 10px; color: var(--cnp-chu); }
.cnplx-ngan { position: fixed; z-index: 9999; top: 32px; right: 0; bottom: 0; width: min(480px, 100%); display: flex; flex-direction: column; background: #fff; border-left: 1px solid var(--cnp-vien); box-shadow: -8px 0 24px rgba(0, 0, 0, .12); }
.cnplx-ngan-dau { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--cnp-vien); font-size: 15px; }
.cnplx-ngan-than { flex: 1; overflow: auto; padding: 4px 16px 20px; }
.cnplx-ngan-than h4 { margin: 16px 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--cnp-mo); }
.cnplx-bao { margin: 10px 0 0; padding: 6px 10px; border-radius: 6px; background: var(--cnp-xanh-nhat); color: var(--cnp-xanh); font-weight: 600; }
.cnplx-hang-nho { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0; }
.cnplx-tuyen { margin: 0 0 0 20px; }
.cnplx-tuyen li { padding: 6px 0 8px; border-bottom: 1px dashed var(--cnp-vien); }
.cnplx-gio-can { margin-left: auto; font-weight: 700; }
.cnplx-nut-do { border-color: var(--cnp-gach) !important; color: var(--cnp-gach) !important; }
@media (max-width: 782px) {
	.cnplx-ngan { top: 46px; }
	.cnplx-chu-giai { margin-left: 0; }
}
