:root{
  --navy:#0000ff; --purple:#7b2ff7; --magenta:#d2008c; --blue:#0000ff; --amber:#ff8a00; --yellow:#ffb800; --red:#b42318;
  --green:#067647; --ink:#1a2b3c; --muted:#5b6b7a; --line:#dfe3f0; --bg:#f4f5fb;
  --card:#ffffff; --soft:#eef0ff; --a:#067647; --b:#0000ff; --c:#b42318;
}
*{box-sizing:border-box}
/* Bản am (13/11/2026): khóa kéo ngang toàn trang trên điện thoại — trang phải
   fit đúng màn hình, không lệch/kéo qua kéo lại. overflow-x:clip giữ sticky
   hoạt động (hidden có thể phá sticky ở một số trình duyệt); dòng hidden phía
   trước là fallback cho trình duyệt cũ chưa hỗ trợ clip. Ảnh/video không bao
   giờ được rộng hơn khung chứa. */
html, body{overflow-x:hidden;overflow-x:clip}
img, video{max-width:100%;height:auto}
input[type="file"]{max-width:100%}
body{margin:0;font-family:-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;background:var(--bg);color:var(--ink);font-size:15px;line-height:1.5}
.wrap{max-width:1180px;margin:0 auto;padding:0 16px;padding-left:max(16px, env(safe-area-inset-left));padding-right:max(16px, env(safe-area-inset-right))}
.topbar{background:#fff;color:var(--ink);padding:26px 0 20px;padding-top:max(26px, env(safe-area-inset-top));border-bottom:1px solid var(--line)}
.topbar h1{margin:0;font-size:26px;line-height:1.25;color:var(--navy)}
.subtitle{margin:6px 0 0;color:var(--muted)}
.badges{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}
.badge{display:inline-block;padding:5px 10px;border-radius:999px;font-size:12.5px;font-weight:600}
.badge.ok{background:#d3f8e3;color:#054d2e}
.badge.warn{background:#fdeecd;color:#7a3c06}
.card{background:var(--card);border:1px solid var(--line);border-radius:14px;padding:18px 20px;margin:16px 0;box-shadow:0 1px 3px rgba(16,42,67,.06)}
.filters{display:flex;flex-wrap:wrap;gap:18px;align-items:flex-end}
.filter-group{display:flex;flex-direction:column;gap:6px;min-width:0}
.filter-group.grow{flex:1;min-width:220px}
.filter-label{font-size:12.5px;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.04em}
.seg{display:flex;gap:0;border:1px solid var(--line);border-radius:9px;overflow-x:auto;overflow-y:hidden;max-width:100%}
.seg button{border:0;background:#fff;padding:8px 14px;cursor:pointer;font-size:14px;color:var(--ink);white-space:nowrap;flex:none}
.seg button+button{border-left:1px solid var(--line)}
.seg button.active{background:var(--navy);color:#fff;font-weight:700}
#searchBox{padding:9px 12px;border:1px solid var(--line);border-radius:9px;font-size:14px;width:100%}
.scope-chip{display:inline-flex;align-items:center;gap:8px;margin-top:6px;padding:6px 10px;border-radius:999px;background:#eef;color:#0000cc;font-size:13px;font-weight:600}
.scope-chip button{border:0;background:#0000ff;color:#fff;width:20px;height:20px;border-radius:50%;cursor:pointer;font-size:12px;line-height:1;padding:0}
#quarterSel{padding:9px 12px;border:1px solid var(--line);border-radius:9px;font-size:14px;background:#fff;min-width:170px}
/* Nút gạt Hiện/Ẩn (trang Quản trị — mục Hiển thị trên dashboard công khai) */
.switch{position:relative;display:inline-block;width:40px;height:22px;vertical-align:middle;flex:none}
.switch input{opacity:0;width:0;height:0}
.switch .slider{position:absolute;inset:0;background:#cbd5e1;border-radius:999px;cursor:pointer;transition:.15s}
.switch .slider:before{content:"";position:absolute;width:16px;height:16px;left:3px;top:3px;background:#fff;border-radius:50%;transition:.15s}
.switch input:checked + .slider{background:var(--navy)}
.switch input:checked + .slider:before{transform:translateX(18px)}
.filter-note{flex-basis:100%;margin:0;color:var(--muted);font-size:13.5px}
.tabs{display:flex;gap:8px;flex-wrap:wrap;margin:4px 0 0}
.tabs button{border:1px solid var(--line);background:#fff;border-radius:999px;padding:9px 18px;font-size:14.5px;cursor:pointer;color:var(--ink)}
.tabs button.active{background:var(--navy);color:#fff;font-weight:700;border-color:var(--navy)}
.direct-tabs{margin:0 0 14px;position:sticky;top:0;top:env(safe-area-inset-top, 0px);z-index:110;background:var(--bg);padding:8px 0;flex-wrap:nowrap;border-bottom:1px solid var(--line)}
.direct-tabs .tab-key{font-size:11px;opacity:.65;margin-left:4px}
.direct-tabs .count-badge{font-weight:700}
.direct-tabs button.active .tab-key{opacity:.85}
@media (max-width:560px){.direct-tabs .tab-key{display:none}.direct-tabs button{padding:9px 12px;font-size:13.5px}.seg{flex-wrap:wrap}.seg button{padding:8px 10px;font-size:13px}}
@media (max-width:400px){.seg button{padding:8px 8px}}
.tabpage{display:none}
.tabpage.active{display:block}
h2{font-size:19px;margin:0 0 4px;color:var(--navy)}
h3{font-size:16px;margin:0 0 8px;color:var(--navy)}
.section-note{color:var(--muted);font-size:13.5px;margin:0 0 14px}
.kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px;margin:14px 0}
.kpi{background:var(--soft);border-radius:12px;padding:14px 16px}
.kpi .k-label{font-size:12.5px;color:var(--muted);font-weight:700;text-transform:uppercase;letter-spacing:.03em}
.kpi .k-value{font-size:28px;font-weight:800;color:var(--navy);line-height:1.15;margin-top:2px}
.kpi .k-value.sm{font-size:20px}
.kpi .k-sub{font-size:13px;color:var(--muted)}
.kpi.clickable{cursor:pointer;transition:box-shadow .2s ease,border-color .2s ease}
.kpi.clickable:hover{box-shadow:0 4px 16px rgba(210,0,140,.18);border-color:#d2008c}
.export-bar{display:flex;flex-wrap:wrap;align-items:center;gap:10px;background:var(--soft);border:1px solid var(--line);border-radius:12px;padding:10px 14px;margin:0 0 14px}
.export-bar .export-label{font-size:13.5px;font-weight:700;color:var(--navy)}
.export-bar .btn{cursor:pointer}
.kpi .k-value.good{color:var(--green)} .kpi .k-value.bad{color:var(--red)}
.delta-up{color:var(--green);font-weight:700}.delta-down{color:var(--red);font-weight:700}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:16px}
@media(max-width:820px){.grid2{grid-template-columns:1fr}.topbar h1{font-size:21px}}
.panel{background:#fff;border:1px solid var(--line);border-radius:12px;padding:16px 18px}
.panel h3{margin-bottom:2px}
.bar-row{display:grid;grid-template-columns:minmax(140px,220px) 1fr 64px;gap:10px;align-items:center;margin:9px 0;font-size:14px}
.bar-row .bar-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bar-track{background:#e8eef3;border-radius:6px;height:18px;overflow:hidden;transition:box-shadow .2s ease}
.bar-fill{height:100%;border-radius:6px;background:linear-gradient(90deg,#0000ff 0%,#7b2ff7 25%,#d2008c 50%,#ff8a00 68%,#ffb800 76%);transition:filter .2s ease}
/* Tat ca cac thanh deu dung gradient Vikki day du (mac dinh .bar-fill) — khong con mau rieng tung loai. */
.bar-val{text-align:right;font-weight:700;font-variant-numeric:tabular-nums;transition:transform .2s ease,color .2s ease}
.bar-row:hover .bar-fill{filter:brightness(1.15) saturate(1.3)}
.bar-row:hover .bar-track{box-shadow:0 0 0 2px rgba(210,0,140,.28),0 4px 16px rgba(210,0,140,.35)}
.bar-row:hover .bar-val{color:var(--navy);transform:scale(1.15)}
.bar-row.clickable{cursor:pointer}
.bar-row.clickable:hover .bar-label{text-decoration:underline}
.legend{font-size:13px;color:var(--muted);margin-top:8px}
.donut-wrap{display:flex;gap:20px;align-items:center;flex-wrap:wrap}
.donut-wrap svg .donut-seg{transition:opacity .25s ease,stroke-width .25s ease;cursor:pointer}
.donut-wrap svg:hover .donut-seg{opacity:.3}
.donut-wrap svg .donut-seg:hover{opacity:1;stroke-width:34}
.donut-legend .clickable{cursor:pointer}
.donut-legend .clickable:hover{text-decoration:underline}
.donut-legend{font-size:14px}
.donut-legend div{margin:5px 0}
.dot{display:inline-block;width:11px;height:11px;border-radius:3px;margin-right:7px}
table.data{width:100%;border-collapse:collapse;font-size:14px}
table.data th,table.data td{padding:8px 10px;border-bottom:1px solid var(--line);text-align:left}
table.data th{background:var(--soft);position:sticky;top:0;font-size:13px}
table.data td.num,table.data th.num{text-align:right;font-variant-numeric:tabular-nums}
.table-scroll{max-height:480px;overflow:auto;border:1px solid var(--line);border-radius:10px}
.pill{display:inline-block;padding:2px 9px;border-radius:999px;font-size:12.5px;font-weight:700}
.pill.A{background:#e0e0ff;color:#0000cc}.pill.B{background:#ffedd5;color:#9a3412}
.pill.C{background:#fbe3f1;color:#8a0050}.pill.Aplus{background:#ffb800;color:#3d2b00}
.empty{background:#fff8e6;border:1px solid #f2d492;border-radius:12px;padding:18px 20px;margin:14px 0}
.empty h3{color:#7a4a06}
.btn{display:inline-block;border:1px solid var(--navy);background:#fff;color:var(--navy);border-radius:9px;padding:8px 14px;font-size:14px;cursor:pointer;font-weight:600}
.btn:hover{background:var(--navy);color:#fff}
.toolbar{display:flex;gap:10px;align-items:center;justify-content:space-between;flex-wrap:wrap;margin:10px 0}
.count{color:var(--muted);font-size:13.5px}
.foot h2{margin-top:18px}
.foot ul{margin:6px 0;padding-left:20px;font-size:14px}
.foot-note{color:var(--muted);font-size:13.5px}
code{background:#eef0ff;padding:1px 5px;border-radius:5px;font-size:13px}
.voc-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px;margin:14px 0}
.voc-card{background:var(--soft);border-radius:12px;padding:14px 16px}
.voc-card .big{font-size:24px;font-weight:800;color:var(--navy)}

/* ---- v2: logo, menu tách kênh, xem chi tiết, trang Quản trị ---- */
.topbar-inner{display:flex;align-items:center;gap:18px}
.brand-logo{height:54px;width:auto;flex-shrink:0}
.brand-link{display:inline-flex;flex-shrink:0;line-height:0}
.brand-link:focus-visible{outline:2px solid var(--navy);outline-offset:4px;border-radius:8px}
.menu-grid[hidden],.menu-card[hidden]{display:none}
/* bz32 (21/11/2026, vụ 9998): .btn{display:inline-block} đè thuộc tính hidden
   (author style thắng UA style) nên nút Gửi vẫn hiện với cộng tác viên dù
   applySharedSubmitUI đã đặt btn.hidden=true — cộng tác viên bấm là gửi được.
   Quy tắc này bắt hidden thắng lại. */
.btn[hidden]{display:none}
@media(max-width:820px){.brand-logo{height:40px}}
.snaps{display:flex;flex-direction:column;gap:14px}
.snap{background:var(--soft);border:1px solid var(--line);border-radius:12px;padding:16px 18px}
.snap h3{margin-bottom:6px}
.snap .kpis{margin:10px 0}
table.data tr.clickable{cursor:pointer}
table.data tr.clickable:hover td{background:#eef0ff}
.detail-panel{background:#fdf2f8;border:1px solid #f0b8dc;border-radius:12px;padding:16px 18px}
.detail-head{display:flex;gap:12px;align-items:flex-start;justify-content:space-between;flex-wrap:wrap}
.detail-head h3{margin-bottom:2px}
.detail-panel .table-scroll{max-height:420px}
#tab-admin input[type="file"]{font-size:14px}
#tab-admin h3{margin-top:0}

/* ---- Trang Quản trị riêng (admin.html) ---- */
.mini-foot{margin:24px 0 0;text-align:center;color:#fff;font-size:14px;font-weight:600;background:linear-gradient(120deg,#0000ff 0%,#0000ff 50%,#7b2ff7 65%,#d2008c 80%,#ff8a00 90%,#ffb800 100%);padding:26px 16px;padding-bottom:max(26px, env(safe-area-inset-bottom));padding-left:max(16px, env(safe-area-inset-left));padding-right:max(16px, env(safe-area-inset-right))}
.mini-foot a{color:#fff;font-weight:600}
.admin-num{width:76px;padding:6px 8px;border:1px solid var(--line);border-radius:7px;font-size:14px}
.admin-text{width:100%;padding:6px 8px;border:1px solid var(--line);border-radius:7px;font-size:14px}
.editor-note{background:#fff8e6;border:1px solid #f2d492;border-radius:10px;padding:10px 14px;font-size:13.5px;margin:10px 0}

/* ---- Trang chủ menu + đăng nhập (Tân, 12/11/2026 12:28) ---- */
.utilbar{background:#eef0ff;border-bottom:1px solid var(--line)}
.utilbar-inner{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 0;flex-wrap:wrap}
.util-home{font-weight:700;color:var(--navy);text-decoration:none;font-size:14px}
.util-home:hover{text-decoration:underline}
.util-user{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.util-left{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
#topAdminLink a{display:inline-block;padding:4px 12px;border-radius:999px;background:var(--navy);color:#fff;font-weight:700;font-size:13px;text-decoration:none;white-space:nowrap}
#topAdminLink a:hover{filter:brightness(1.15)}
.badge-draft{display:inline-block;padding:1px 9px;border-radius:999px;background:#fff3cd;color:#7a5b00;border:1px solid #e0b800;font-weight:700;font-size:12px;white-space:nowrap}
.admin-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:14px 0 4px}
.admin-tab{padding:8px 14px;border-radius:10px;border:1px solid var(--line);background:#fff;font-weight:700;color:var(--navy);text-decoration:none;font-size:14px}
.admin-tab:hover{border-color:var(--navy)}
.admin-tab.active{background:var(--navy);color:#fff;border-color:var(--navy)}
.qlcl-who{font-size:13.5px;color:var(--ink)}
.qlcl-mini{padding:5px 10px;font-size:13px}
.menu-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin:24px 0 12px}
@media(max-width:820px){.menu-grid{grid-template-columns:1fr}}
.menu-card{display:flex;flex-direction:column;gap:10px;background:#fff;border:1px solid var(--line);border-radius:16px;padding:26px 24px;text-decoration:none;color:var(--ink);box-shadow:0 1px 3px rgba(16,42,67,.06);transition:box-shadow .2s ease,border-color .2s ease,transform .2s ease}
.menu-card:hover{box-shadow:0 8px 28px rgba(210,0,140,.18);border-color:#d2008c;transform:translateY(-2px)}
.menu-icon{font-size:40px;line-height:1}
.menu-title{font-size:21px;font-weight:800;color:var(--navy)}
.menu-desc{font-size:14.5px;color:var(--muted)}
.menu-go{font-weight:700;color:var(--navy)}
.menu-note{text-align:center;color:var(--muted);font-size:13.5px;margin:8px 0 24px}

/* ---- Hộp đăng nhập / đổi mật khẩu ---- */
.qlcl-overlay{position:fixed;inset:0;background:rgba(16,42,67,.55);display:flex;align-items:center;justify-content:center;z-index:10000;padding:16px;padding-left:max(16px, env(safe-area-inset-left));padding-right:max(16px, env(safe-area-inset-right))}
.qlcl-card{background:#fff;border-radius:16px;padding:24px 26px;max-width:430px;width:100%;box-shadow:0 12px 40px rgba(0,0,0,.25)}
.qlcl-card h2{margin-bottom:6px}
.qlcl-label{display:block;font-size:14px;font-weight:600;margin:12px 0 4px}
.qlcl-label input{width:100%;padding:10px 12px;border:1px solid var(--line);border-radius:9px;font-size:15px;margin-top:4px}
.qlcl-name{margin:8px 0 0;color:var(--navy);font-size:14.5px}
.qlcl-err{color:var(--red);font-size:13.5px;margin:10px 0 0}
.qlcl-ok{color:var(--green);font-size:13.5px;margin:10px 0 0}
.qlcl-actions{display:flex;gap:10px;margin-top:16px}
.qlcl-ghost{border-color:var(--line);color:var(--muted)}
.qlcl-back{display:inline-block;margin-top:14px;color:var(--navy);font-weight:600;text-decoration:none;font-size:14px}

/* ---- Phiếu đánh giá trực tiếp ---- */
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}
@media(max-width:820px){.form-grid{grid-template-columns:1fr}}
/* bz41: ô "Ngày ký" (input date, chữ tiếng Việt dài "ngày 22 thg 11, 2026")
   lòi ra ngoài thẻ trên điện thoại — grid item mặc định min-width:auto nên
   cột không co lại được dưới bề rộng tối thiểu của ô ngày. Ép min-width:0
   để ô nằm gọn trong thẻ như ô "Đánh giá viên". */
.form-grid>*{min-width:0}
.fld input[type="date"]{min-width:0;max-width:100%}
.fld{display:block;font-size:14px;font-weight:600}
.fld.wide{grid-column:1/-1}
.fld input,.fld select,.fld textarea{width:100%;padding:9px 12px;border:1px solid var(--line);border-radius:9px;font-size:14.5px;margin-top:5px;font-family:inherit}
.fld input[readonly]{background:#f4f5fb;color:var(--muted)}
/* bz31 (21/11/2026): "Người chấm cùng" dạng dropdown + nút ＋/× (thay checkbox);
   "Thời gian/CBNV đánh giá" chỉ hiển thị nên hiện dạng text đậm, không viền,
   không nền xám (không trông như ô nhập liệu hỏng). */
.collab-row{display:flex;gap:8px;align-items:center;margin-bottom:8px}
.collab-row select{flex:1;min-width:0;padding:9px 12px;border:1px solid var(--line);border-radius:9px;font-size:14.5px;font-family:inherit;background:#fff}
.collab-del{flex:0 0 auto;width:36px;height:38px;border:1px solid var(--line);border-radius:9px;background:#fff;color:#b42318;font-size:20px;line-height:1;cursor:pointer}
.collab-del:hover{background:#fdecea}
#collabAddBtn{padding:8px 14px;border:1px dashed var(--line);border-radius:9px;background:#fff;font-size:14px;font-weight:600;cursor:pointer;color:var(--navy)}
#collabAddBtn:disabled{opacity:.45;cursor:default}
#fDate,#fEvaluator{background:transparent;border-color:transparent;color:var(--ink);font-weight:700;padding:4px 2px}
.collab-locked-list{list-style:none;margin:0;padding:0}
.collab-locked-list li{padding:7px 0;border-bottom:1px solid var(--line);font-size:14.5px}
.collab-locked-list li:last-child{border-bottom:0}
.collab-role{color:var(--muted);font-size:13px}
.req{color:var(--red)}
.summary-bar{position:sticky;top:60px;top:calc(60px + env(safe-area-inset-top, 0px));z-index:100;background:var(--soft);border:1px solid var(--line);border-radius:12px;padding:12px 16px;margin:16px 0;font-size:14.5px}
.crit{border:1px solid var(--line);border-radius:12px;padding:14px 16px;margin:12px 0}
.crit.missing{border-color:var(--red);background:#fff5f5}
/* bz51 (4): mục bị khoá thì nhãn nút ảnh bằng chứng cũng mờ + không bấm được
   (input file đã disabled nhưng <label> bọc ngoài vẫn hiện dạng bấm được).
   Chỉ .crit-photos — không đụng nhãn ảnh góp ý trong .gopy-box. */
.crit-locked .crit-photos label.btn{opacity:.45;pointer-events:none}
.crit-head{display:flex;gap:10px;align-items:flex-start}
.crit-tt{flex:none;width:28px;height:28px;border-radius:50%;background:var(--navy);color:#fff;font-weight:800;display:flex;align-items:center;justify-content:center;font-size:14px}
.crit-name{font-weight:700;font-size:15px}
.crit-parent{font-size:13px;font-weight:700;color:var(--navy);margin-bottom:4px}
.crit-rules,.crit-guide{margin:10px 0 0}
.crit-rules summary,.crit-guide summary{cursor:pointer;color:var(--navy);font-weight:600;font-size:14px}
.preline{white-space:pre-line;font-size:14px;color:var(--ink);margin-top:6px}
.crit-res{display:flex;gap:16px;flex-wrap:wrap;margin:12px 0 4px}
.crit-res label{font-weight:600;font-size:14.5px;cursor:pointer}
.crit-res input{accent-color:var(--navy);width:16px;height:16px;vertical-align:-2px}
.script-box summary{cursor:pointer;font-size:15px}
.script-box h3{margin:16px 0 6px}
.script-box ol{margin:6px 0;padding-left:22px}
.script-box li{margin:8px 0;font-size:14.5px}
.action-bar{margin-bottom:0}
.action-row{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.btn-primary{background:var(--navy);color:#fff}
.btn-primary:hover{background:#0000cc}

/* ---- Xem phiếu + lịch sử chỉnh sửa (Tân, 12/11/2026 12:40) ---- */
.dview-overlay{position:fixed;inset:0;background:rgba(16,42,67,.55);display:flex;align-items:flex-start;justify-content:center;z-index:10000;padding:24px 16px;padding-left:max(16px, env(safe-area-inset-left));padding-right:max(16px, env(safe-area-inset-right));overflow:auto}
.dview-card{position:relative;background:#fff;border-radius:16px;padding:24px 26px;max-width:920px;width:100%;box-shadow:0 12px 40px rgba(0,0,0,.25)}
.dview-card h2{margin-bottom:6px;padding-right:36px}
/* Nút ✕ góc trên bên phải của modal + lightbox xem ảnh (Tân, 16/11/2026):
   bấm ✕ / nút Đóng / bấm ra ngoài đều đóng và về lại chỗ đang xem. */
.dview-close{position:absolute;top:10px;right:12px;width:32px;height:32px;border-radius:50%;border:1px solid var(--line);background:#fff;color:var(--ink);font-size:16px;line-height:1;cursor:pointer;padding:0;z-index:2}
.dview-close:hover{background:#eef0ff}
/* Lightbox: lớp phủ riêng chồng lên modal phiếu nên đóng là về lại phiếu. */
.dview-lightbox{z-index:10001}
.dview-card img.dview-photo{max-width:100%;max-height:calc(100vh - 200px);object-fit:contain;display:block;margin:8px auto}
.dview-card h3{margin:18px 0 8px}
.hist-list{margin:6px 0;padding-left:22px}
.hist-list>li{margin:10px 0;font-size:14px}
.hist-list ul{margin:4px 0;padding-left:20px}
#editReasonWrap{margin-bottom:12px}
#editReasonWrap textarea{width:100%;padding:9px 12px;border:1px solid var(--line);border-radius:9px;font-size:14.5px;margin-top:5px;font-family:inherit}
.btn:disabled{opacity:.45;cursor:not-allowed}

/* ---- Hình ảnh lỗi từng tiêu chí (Tân, 12/11/2026 13:02) ---- */
.crit-photos{margin-top:10px}
.photo-label{font-weight:600;font-size:13.5px;margin-bottom:6px}
.photo-actions{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:8px}
.photo-thumbs{display:flex;gap:8px;flex-wrap:wrap}
.photo-thumb{position:relative;display:inline-block}
.photo-thumb img{width:96px;height:96px;object-fit:cover;border-radius:8px;border:1px solid var(--line);cursor:zoom-in}
.photo-del{position:absolute;top:-6px;right:-6px;width:20px;height:20px;border-radius:50%;border:1px solid #c00;background:#fff;color:#c00;font-size:12px;line-height:1;cursor:pointer;padding:0}
.view-photo{width:120px;height:auto;max-height:160px;object-fit:contain;border-radius:8px;border:1px solid var(--line);margin:2px;vertical-align:top}
/* Đợt 1(b): ảnh bị máy chủ từ chối (không có quyền xem) — hiện rõ chữ thay vì ảnh vỡ. */
.photo-view-denied{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-width:96px;min-height:64px;padding:6px 8px;border:1px dashed #b00;border-radius:8px;background:#fdf0f0;color:#8a1f1f;font-size:12px;line-height:1.4;text-align:center}
.remedy-thumbs .photo-view-denied{width:100%;min-width:0;min-height:64px}
.gopy-photos .photo-view-denied{width:96px;height:96px}

/* Nút Lưu nháp nổi theo màn hình ở trang Đánh giá trực tiếp (Tân, 12/11/2026):
   phiếu dài, kéo xuống xa nút cuối form nên cần nút nhỏ luôn thấy được. */
.fab-draft{position:fixed;right:16px;bottom:16px;bottom:max(16px, env(safe-area-inset-bottom));z-index:200;width:52px;height:52px;border-radius:50%;padding:0;display:flex;align-items:center;justify-content:center;font-size:24px;line-height:1;box-shadow:0 4px 14px rgba(0,0,0,.28);background:var(--navy);color:#fff;border:1px solid var(--navy)}
.fab-draft:hover{background:#0000cc;color:#fff}
/* Nút "↓ Cuối trang" nổi (Tân, 18/11/2026): cuộn mượt xuống thanh thao tác
   cuối form (chứa nút Gửi đánh giá) — thay thế đúng vị trí nút Lưu nhanh
   đã bỏ (bottom 80px). Chỉ còn 2 nút nổi: ↓ ở 80px và
   💾 Lưu nháp (fab-draft) ở 16px. */
.fab-bottom{position:fixed;right:16px;bottom:80px;bottom:max(80px, calc(env(safe-area-inset-bottom) + 80px));z-index:200;width:52px;height:52px;border-radius:50%;padding:0;display:flex;align-items:center;justify-content:center;font-size:24px;line-height:1;box-shadow:0 4px 14px rgba(0,0,0,.28);background:#fff;color:var(--navy);border:1px solid var(--navy)}
.fab-bottom:hover{background:#eef0ff;color:var(--navy)}

/* ---- Đánh giá camera (danhgiacamera.html, Tân 13/11/2026) ---- */
.cam-sub{margin:18px 0 4px}
.cam-sub:first-child{margin-top:0}
.crit-max{color:var(--muted);font-weight:600;font-size:13px;white-space:nowrap}
.crit-note{margin-top:10px}

/* ---- Góp ý của Cấp quản lý (CQL) — bản ba, Tân 16/11/2026 ----
   Class dùng chung cho cả trang trực tiếp lẫn camera (camera chỉ reuse,
   không sửa file này): khung góp ý dưới từng tiêu chí / ô chung cuối phiếu,
   luồng trả lời + tick hoàn thành của người đánh giá. */
.gopy-box{margin-top:12px;border:1px solid var(--line);border-radius:10px;padding:12px 14px;background:#fbfcff}
.gopy-box:empty{display:none}
.gopy-box>h4{margin:0 0 8px;font-size:14px;color:var(--navy)}
.gopy-item{border-top:1px solid var(--line);padding:10px 0}
.gopy-item:first-child{border-top:0;padding-top:0}
.gopy-head{font-size:13.5px;color:var(--muted);margin-bottom:4px}
.gopy-head b{color:var(--ink)}
.gopy-text{font-size:14.5px;white-space:pre-line}
.gopy-photos{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}
.gopy-photos img{width:96px;height:96px;object-fit:cover;border-radius:8px;border:1px solid var(--line);cursor:zoom-in}
.gopy-reply{margin:8px 0 0 18px;padding:8px 10px;border-left:3px solid var(--navy);background:#eef0ff;border-radius:0 8px 8px 0}
.gopy-done{opacity:.62}
.gopy-done .gopy-text{text-decoration:none}
.gopy-done-badge{display:inline-block;padding:1px 9px;border-radius:999px;background:#d3f8e3;color:#054d2e;font-weight:700;font-size:12px;white-space:nowrap}
.gopy-open-count{display:inline-block;min-width:22px;text-align:center;padding:1px 8px;border-radius:999px;background:#fdeecd;color:#7a3c06;font-weight:700;font-size:12.5px}
.gopy-open-count:empty{display:none}
.gopy-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}
.gopy-composer{margin-top:10px}
.gopy-composer textarea{width:100%;padding:9px 12px;border:1px solid var(--line);border-radius:9px;font-size:14.5px;margin-top:5px;font-family:inherit}
.gopy-composer .photo-actions{margin-top:8px}
.review-list-row td{vertical-align:top}

/* Thanh tải xuống dự phòng (xlsx-print.js, 17/11/2026): iOS chặn download tự
   động ngoài user gesture nên hiện link thật để user tự bấm tải. */
.qlcl-dl-fallback{position:fixed;left:12px;right:12px;bottom:12px;z-index:10001;background:#0000cc;color:#fff;padding:12px 14px;border-radius:10px;font-size:14px;box-shadow:0 4px 18px rgba(0,0,0,.35)}
.qlcl-dl-fallback a{color:#fff;text-decoration:underline;word-break:break-all}
.qlcl-dl-fallback button{float:right;background:transparent;border:0;color:#fff;font-size:16px;cursor:pointer;padding:0 4px}

/* ===== Bảng Theo dõi khắc phục — làm lại bz14 (18/11/2026, đặc tả mục 3.1) =====
   14 cột (bz20 bỏ Đơn vị theo dõi, thêm Ngày ĐVKD phản hồi sau Ngày đánh giá):
   STT 44px · Tiêu chí 220px · Nội dung lỗi 290px (cắt ngắn … + title đủ chữ,
   bz21 mục 1, thu từ 400px bz20) · Khu vực 150px · Hình thực trạng 200px ·
   Hình nghiệm thu 220px · Tiến độ 190px · Ngày đánh giá 110px · Ngày ĐVKD
   phản hồi 130px · Ghi chú 280px · Đơn vị hỗ trợ 170px · Đầu mối 220px ·
   Nghiệm thu 110px. Tổng cột cố định 2340px. Cột Chuẩn hoá (170px) đã bỏ
   hẳn ở bz21 (chỉ giữ trường std trong dữ liệu nội bộ). Bảng cuộn ngang
   trên màn hình hẹp. */
.remedy-table{table-layout:fixed;width:100%;min-width:2170px}
.remedy-table th,.remedy-table td{vertical-align:top}
.remedy-table select,.remedy-table input[type="text"],.remedy-table input[type="date"]{width:100%;box-sizing:border-box}
.remedy-table select:disabled,.remedy-table input:disabled{opacity:.55;cursor:not-allowed;background:#f2f2f2}
.remedy-c-stt{width:44px}
.remedy-c-group{width:52px;text-align:center}
.remedy-c-crit{width:220px}
/* bz21 (19/11/2026 — mục 1): Nội dung lỗi thu hẹp 400px -> 290px ("vừa
   thôi", vẫn đọc được ý chính). bz44 (B44-4): KHÔNG cắt ngắn nữa — chữ
   xuống hàng đầy đủ trong đúng độ rộng cột; File xuất Excel/PDF vẫn ghi
   đủ chữ. */
.remedy-c-note{width:290px;min-width:290px}
/* bz44 (B44-4): Nội dung lỗi XUỐNG HÀNG đầy đủ trong đúng độ rộng cột
   (không cắt "…" như trước); giữ title để rê chuột vẫn thấy đủ chữ. */
.remedy-note-wrap{display:block;white-space:normal;overflow-wrap:break-word}
.remedy-c-kv{width:150px}
/* bz21: cột Chuẩn hoá (170px) đã bỏ hẳn khỏi bảng + xuất
   file — không còn rule rộng cột này. */
.remedy-c-real{width:200px}
.remedy-c-acc{width:220px}
.remedy-c-status{width:190px}
.remedy-c-date{width:110px}
.remedy-c-reply{width:130px}
.remedy-c-note2{width:280px}
.remedy-c-support{width:170px}
.remedy-c-verified{width:110px}
/* bz44 (B44-1): cột STT ở ô "Phiếu đã hoàn tất" hẹp lại + căn giữa.
   bz44 (B44-6): cột Nhóm ở ô done (I–VI, title = tên nhóm đầy đủ).
   bz44 (B44-5): dòng "Đầu mối: ..." dưới tiêu đề nhóm. */
.remedy-done-c-stt{width:36px;text-align:center}
.remedy-done-c-group{width:52px;text-align:center}
.remedy-contact-line{font-size:13px;color:#444;margin:2px 0 8px}
.remedy-contact-list{font-size:13px;color:#444;margin:2px 0 8px;padding-left:20px}
.remedy-contact-list li{margin:2px 0}
/* Dãy thumbnail nhiều ảnh trong 1 ô: lưới 3 ảnh/hàng (bz20, mục 2) — grid
   3 cột cố định thay cho flex (flex + padding ô chỉ vừa 2 ảnh/hàng). */
.remedy-thumbs{display:grid;grid-template-columns:repeat(3,1fr);gap:4px}
.remedy-thumb{width:100%;height:64px;object-fit:cover;border:1px solid #bbb;border-radius:6px;cursor:pointer;background:#f7f8ff}
.remedy-thumb-wrap{position:relative;display:block}
.remedy-thumb-del{position:absolute;top:-6px;right:-6px;width:20px;height:20px;border-radius:50%;border:1px solid #999;background:#fff;color:#c00;font-size:12px;line-height:1;cursor:pointer;padding:0}
/* Nút Chọn/Chụp/Dán ảnh nghiệm thu trong ô. */
.remedy-photo-btns{display:flex;flex-wrap:wrap;gap:4px;margin-top:4px}
/* bz21 (mục 4a): bộ lọc Nghiệm thu gọn vừa nội dung — dropdown select mặc
   định rộng bằng lựa chọn dài nhất ("Chưa nghiệm thu") nên quanh giá trị
   ngắn ("Đang làm") thừa nhiều khoảng trắng. Khóa rộng 150px vừa đủ hiện
   trọn giá trị dài nhất (kèm padding + mũi tên); danh sách xổ ra vẫn hiện
   đủ chữ từng lựa chọn. */
#remedyFilterVerified{width:150px}
/* Slot xuất file theo đơn vị trong tiêu đề nhóm + thanh gửi phiếu. */
.remedy-export-slot{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin:4px 0 8px}
.remedy-submit-bar{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin:8px 0 18px;padding:10px 12px;background:#f7f8ff;border:1px solid #dfe3ff;border-radius:8px}
.remedy-submit-bar .fld{margin:0}
/* bz41: tên file đã xuất cắt ngắn bằng ellipsis, rê chuột thấy tên đầy đủ (title). */
