/* Phân công nhiệm vụ (/cong-cu/bang-viec). Tệp nạp ở mọi trang → mọi lớp có tiền tố bv-. Máy tính: 3 cột cạnh nhau; điện thoại: một cột, chọn cột bằng nút. */
.chinh:has(#bv-app) { max-width: 1400px; }
#bv-app [hidden], .bv-hop [hidden] { display: none !important; }
.bv-dau { align-items: flex-start; }

/* Danh sách bảng */
.bv-ds { display: grid; gap: 12px; margin-bottom: 14px; }
@media (min-width: 720px) { .bv-ds { grid-template-columns: 1fr 1fr; } }
.bv-ds__o { margin: 0; }
.bv-ds__ten { margin: 0 0 4px; font-size: 1.1rem; color: var(--c-dam); }
.bv-ds__mo { margin: 0 0 6px; }
.bv-ds__so { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 6px; }
.bv-ds__chu { margin: 0; }

/* Nhãn (màu chữ đậm trên nền nhạt, tương phản ≥ 4.5:1) */
.bv-nhan { display: inline-block; padding: 1px 8px; border-radius: 6px; font-size: .75rem; font-weight: 700; line-height: 1.6; background: #e8eff9; color: #0f3a73; }
.bv-nhan--la { background: #e3f3e7; color: #17622d; }
.bv-nhan--vang { background: #fbf0cf; color: #6d4c05; }
.bv-nhan--cam { background: #fde6d6; color: #8a3a0b; }
.bv-nhan--do { background: #fbe3e1; color: #9b1c12; }
.bv-nhan--tim { background: #efe5f8; color: #5b2a86; }
.bv-nhan--xam { background: #eceeed; color: #444f51; }
.bv-nhan-ds { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.bv-nhan-ds li { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.bv-moi .field { max-width: 420px; }

/* Bộ lọc + chọn cột */
.bv-loc { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; margin: 0 0 12px; }
.bv-loc__o { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: .9375rem; }
.bv-loc__o input { width: 20px; height: 20px; accent-color: var(--c); }
.bv-loc__o select { min-height: 40px; padding: 6px 10px; border: 1px solid #cfd6d1; border-radius: var(--r-nho); font: inherit; background: #fff; }
.bv-chon-cot { display: flex; gap: 6px; margin: 0 0 12px; }
.bv-chon-cot__n { flex: 1; min-height: 44px; padding: 6px 8px; border-radius: 999px; border: 1px solid var(--vien); background: var(--the); color: var(--chu);
  font: inherit; font-weight: 700; font-size: .875rem; cursor: pointer; }
.bv-chon-cot__n[aria-pressed="true"] { background: var(--c-dam); border-color: var(--c-dam); color: #fff; }

/* Cột */
.bv-cac-cot { display: grid; gap: 14px; align-items: start; }
.bv-cot { display: none; background: #eef1ee; border-radius: var(--r); padding: 12px; border-top: 4px solid var(--c-vien); }
.bv-cot--mo { display: block; }
.bv-cot--dang { border-top-color: var(--nhan); }
.bv-cot--xong { border-top-color: #7fbf92; }
@media (min-width: 900px) {
  .bv-chon-cot { display: none; }
  .bv-cac-cot { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bv-cot { display: block; }
}
.bv-cot__dau { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.bv-cot__dau h2 { margin: 0; font-size: 1.05rem; }
.bv-cot__so { min-width: 28px; padding: 1px 8px; border-radius: 999px; background: var(--the); font-weight: 800; font-size: .875rem; text-align: center; }
.bv-cot__rong { color: var(--phu); font-size: .875rem; text-align: center; margin: 8px 0; }
.bv-cot__them { margin-top: 8px; background: var(--the); }
.bv-the-ds { list-style: none; margin: 0; padding: 0; min-height: 40px; display: flex; flex-direction: column; gap: 8px; }

/* Thẻ việc */
.bv-the { position: relative; background: var(--the); border: 1px solid var(--vien); border-radius: var(--r-nho); padding: 10px 10px 8px 12px;
  box-shadow: 0 1px 2px rgba(20,40,40,.06); cursor: grab; touch-action: manipulation; }
.bv-the:hover { border-color: var(--c-vien); }
.bv-the--xong .bv-the__mo, .bv-the--xong .bv-the__ten { color: var(--phu); text-decoration: line-through; text-decoration-color: #9aa5a6; }
.bv-the--bong { opacity: .45; }
.bv-the--chon { box-shadow: 0 6px 18px rgba(20,40,40,.18); }
.bv-the__nhan { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.bv-the__mo { display: block; width: 100%; padding: 0; border: 0; background: none; text-align: left; font: inherit; font-weight: 700; color: var(--chu); cursor: pointer;
  overflow-wrap: anywhere; }
.bv-the__mo::after { content: ""; position: absolute; inset: 0; }        /* cả thẻ bấm được */
.bv-the__mo:focus-visible { outline: none; }
.bv-the__mo:focus-visible::after { outline: 3px solid color-mix(in srgb, var(--c) 55%, #fff); border-radius: var(--r-nho); }
.bv-the__ten { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.bv-the__mota { margin: 4px 0 0; font-size: .875rem; color: var(--phu); white-space: pre-line; overflow-wrap: anywhere; }
.bv-the__phu { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 6px 0 0; font-size: .8125rem; color: var(--phu); }
.bv-han { font-weight: 600; }
.bv-han--qua { color: var(--do); }
.bv-han--nay { color: var(--nhan-dam); }
.bv-pt { font-weight: 600; color: var(--c-dam); }
.bv-the__nut { position: relative; z-index: 1; display: flex; justify-content: flex-end; gap: 2px; margin: 2px -4px -4px 0; }
.bv-the__nut .nut-bt { width: 36px; height: 36px; color: var(--phu); }
.bv-bao { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 60; max-width: min(92vw, 480px); margin: 0; padding: 10px 16px;
  border-radius: var(--r-nho); background: #1d2a2c; color: #fff; font-size: .9375rem; box-shadow: var(--bong); }

/* Hộp sửa việc */
.bv-hop { width: min(620px, calc(100vw - 24px)); max-height: calc(100vh - 32px); padding: 0; border: 0; border-radius: var(--r); box-shadow: 0 20px 60px rgba(0,0,0,.25); color: var(--chu); }
.bv-hop::backdrop { background: rgba(10,25,40,.45); }
.bv-hop__form, .bv-bl { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.bv-hop__dau { display: flex; align-items: center; justify-content: space-between; }
.bv-hop__dau h2 { margin: 0; }
.bv-hop__hai { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.bv-hop__nhan { border: 0; margin: 0; padding: 0; }
.bv-hop__nhan legend { font-weight: 600; font-size: .9375rem; margin-bottom: 6px; }
.bv-hop__nhan-ds { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.bv-hop__nhan-o { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.bv-hop__nhan-o input { width: 20px; height: 20px; accent-color: var(--c); }
.bv-hop__xoa { margin-left: auto; }
.bv-hop .form-nut { margin-top: 4px; }
.bv-bl { border-top: 1px solid var(--vien); background: #f7f8f6; }
.bv-bl h3 { margin: 0; }
.bv-bl__ds { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.bv-bl__muc { display: flex; gap: 8px; align-items: flex-start; background: var(--the); border: 1px solid var(--vien); border-radius: var(--r-nho); padding: 8px 10px; }
.bv-bl__than { flex: 1; min-width: 0; }
.bv-bl__ai { margin: 0; font-size: .875rem; }
.bv-bl__chu { margin: 2px 0 0; white-space: pre-line; overflow-wrap: anywhere; }
.bv-bl__form .form-nut { margin-top: 6px; }
@media (max-width: 480px) { .bv-hop__hai { grid-template-columns: 1fr; } .bv-hop__form, .bv-bl { padding: 14px; } }
@media print { .bv-the__nut, .bv-cot__them, .bv-loc, .bv-chon-cot { display: none !important; } .bv-cot { display: block; } .bv-cac-cot { grid-template-columns: repeat(3, 1fr); } }
