/* Dashboard khối sản xuất (cập nhật 10/11/2026) — dùng lớp chung cc-* của bgd-cc.css; chỉ thêm lớp kx-* riêng */

/* ===== KXT · Hỗ trợ kỹ thuật SX (htkt) & Kỹ thuật SX – gia công (ktsx) — bố cục một màn hình 16:9 theo ảnh khách gửi ===== */
.ccd.kxt { grid-template-columns: 262px minmax(0, 1fr); grid-template-areas: "prof head" "prof r1" "prof r2" "r3 r3" "r4 r4"; align-items: start; }
.kxt > .kxt-prof { grid-area: prof; align-self: stretch; } .kxt > .kxt-head { grid-area: head; } .kxt > .kxt-r1 { grid-area: r1; } .kxt > .kxt-r2 { grid-area: r2; } .kxt > .kxt-r3 { grid-area: r3; } .kxt > .kxt-r4 { grid-area: r4; }
.kxt-r1, .kxt-r2, .kxt-r3, .kxt-r4 { display: grid; gap: 10px; min-width: 0; }
.kxt-r1 > *, .kxt-r2 > *, .kxt-r3 > *, .kxt-r4 > * { min-width: 0; }
.kxt-r1 { grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(300px, 1.55fr); }
.kxt-r1.n5 { grid-template-columns: repeat(5, minmax(0, 1fr)) minmax(286px, 1.45fr); }
.kxt-r2 { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr); }
.kxt-ktsx .kxt-r2 { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr) minmax(0, .95fr); }
.kxt-r3 { grid-template-columns: minmax(0, 1.5fr) minmax(0, .8fr) minmax(0, 1.05fr) minmax(0, .95fr); }
.kxt-ktsx .kxt-r3 { grid-template-columns: minmax(0, 1.32fr) minmax(0, 1fr) minmax(0, 1fr); }
.kxt-r4 { grid-template-columns: minmax(0, 1.32fr) minmax(0, 1fr) minmax(0, 1fr); }
.kxt .cc-card > header h3 { font-size: 16.5px; min-width: 0; }
.kxt .cc-card > header h3 > span { min-width: 0; overflow-wrap: anywhere; }
.kxt .cc-card > header h3 small { font-size: 13.5px; }
.kxt .cc-card > header h3 > .ico, .kxt .cc-card > header h3 > svg { width: 24px; height: 24px; }
.kxt-plain { border: 0; background: none; padding: 0; margin: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; display: flex; gap: 8px; align-items: flex-start; width: 100%; min-width: 0; }
.kxt-plain:hover { color: var(--bl); }
.kxt-na { color: #64748b; font-weight: 600; }
.kxt-empty { padding: 10px 2px; font-size: 13px; }
.kxt-note { display: flex; gap: 6px; align-items: flex-start; font-size: 11.5px; color: #1f4fa8; background: #eef4ff; border-radius: 8px; padding: 4px 8px; margin-top: 6px; line-height: 1.3; }
.kxt-note .ico { width: 14px; height: 14px; flex: none; margin-top: 1px; }
.kxt-emptyc { display: grid; place-items: center; text-align: center; gap: 6px; min-height: 170px; color: #64748b; font-size: 13px; padding: 10px; }
.kxt-emptyc .ico { width: 40px; height: 40px; color: #cbd5e1; }
button.kxt-emptyc { width: 100%; justify-items: center; }

/* thẻ nhân sự */
.kxt-prof { padding: 12px 14px; }
.kxt-prof .cc-pf h3 { font-size: clamp(16px, 1.25vw, 20px); overflow-wrap: anywhere; }
.kxt-prof h4 { font-size: 15.5px; }
.kxt-prof h4 small { font-size: 13.5px; font-weight: 600; }
.kxt-prof h4.kxt-h4 { margin-top: 14px; justify-content: flex-start; }
.kxt-prof .cc-chk li span { min-width: 0; overflow-wrap: anywhere; }
.kxt-hl { gap: 8px; }
.kxt-hl .kxt-plain { font-size: 14px; line-height: 1.3; color: var(--nv); }
.kxt-hl .kxt-plain span { min-width: 0; overflow-wrap: anywhere; }
.kxt-hl li .ico { width: 20px; height: 20px; color: #16a34a; stroke-width: 3; flex: none; }
.kxt-hl li.no .ico { color: #f59e0b; } .kxt-hl li.na .ico { color: #94a3b8; stroke-width: 2; }

/* đầu trang & bộ lọc */
.kxt-head { flex-wrap: wrap; }
.kxt-head .cc-ttl { min-width: 0; flex: 1 1 340px; }
.kxt-head .cc-ttl h2 { font-size: clamp(17px, 1.35vw, 21px); white-space: normal; }
.kxt-head .cc-ttl h2 small { font-size: .85em; }
.kxt-head .cc-ttl span { white-space: normal; font-size: 12.5px; }
.kxt-hd { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; min-width: 0; }
.kxt-hd .cc-flt .sel { min-width: 130px; }
.kxt-demo { font-style: normal; background: #fff1c2; color: #8a5a00; border-radius: 8px; padding: 0 6px; font-weight: 700; }

/* ô màu — chữ co theo bề rộng ô (container query), không tràn ở mọi khổ màn hình */
.ccd .kxt-tile { container-type: inline-size; min-width: 0; min-height: 100px; padding: 10px; gap: 8px; }
.ccd .kxt-tile .ic { flex: none; display: grid; place-items: center; }
.ccd .kxt-tile .ic .ico { width: clamp(28px, 18cqi, 44px); height: clamp(28px, 18cqi, 44px); }
.ccd .kxt-tile .tx { min-width: 0; flex: 1; text-align: center; justify-items: center; }
.ccd .kxt-tile .lb { font-size: clamp(11.5px, 8cqi, 15px); line-height: 1.15; overflow-wrap: anywhere; }
.ccd .kxt-tile b { font-size: clamp(16px, 12.5cqi, 27px); white-space: normal; overflow-wrap: anywhere; line-height: 1.12; }
.ccd .kxt-tile b.kxt-na { color: #fff; opacity: .92; font-size: clamp(12.5px, 8.5cqi, 16px); }
.ccd .kxt-tile small { font-size: clamp(10.5px, 7.2cqi, 12.5px); justify-content: center; flex-wrap: wrap; text-align: center; line-height: 1.2; }
.ccd .kxt-tile small span { min-width: 0; overflow-wrap: anywhere; }
.ccd .kxt-tile.c-pink { background: linear-gradient(135deg, #c8175f, #ef4f8b); }
@container (max-width: 170px) { .ccd .kxt-tile .ic { display: none; } }

/* đánh giá KPI */
.kxt-score .cc-sc { grid-template-columns: 110px 60px minmax(0, 1fr); }
.kxt-score .cc-medal { border: 0; background: none; padding: 0; cursor: pointer; }
.kxt-score .cc-grade { cursor: pointer; font: inherit; }
.kxt-score .cc-sc li { display: block; }
.kxt-score .cc-sc li .kxt-plain { gap: 5px; color: #64748b; font-size: 12px; line-height: 1.25; align-items: flex-start; }
.kxt-score .cc-sc li.ok .kxt-plain { color: var(--nv); font-weight: 500; }
.kxt-score .cc-sc li .kxt-plain span { white-space: normal; overflow-wrap: anywhere; }
.kxt-score .cc-sc li .ico { width: 14px; height: 14px; flex: none; margin-top: 1px; stroke-width: 3; color: #94a3b8; }
.kxt-score .cc-sc li.ok .ico { color: #16a34a; }

/* bảng */
.kxt-kt td.l { font-size: 12px; line-height: 1.25; white-space: normal; overflow-wrap: anywhere; min-width: 120px; }
.kxt-kt td, .kxt-kt th { padding: 4px 4px; font-size: 12.5px; }
.kxt-kt th { white-space: nowrap; }
.kxt-kt tfoot td { background: #fff1b8; }
.kxt-mt td, .kxt-mt th { padding: 4px 5px; font-size: 12.5px; }
.kxt-mt td.l { white-space: normal; overflow-wrap: anywhere; }
.kxt-mt tr.click td:first-child { display: table-cell; } /* ô bảng giữ table-cell (flex trong td làm chữ lòi / che dòng dưới) */
.kxt-mt tr.click td:first-child > .ico, .kxt-mt tr.click td:first-child > .kxt-ic { vertical-align: middle; margin-right: 5px; }
.kxt-mt tfoot tr.click td:first-child { display: table-cell; }
.kxt-ic { display: inline-grid; place-items: center; width: 22px; height: 22px; flex: none; color: var(--bl); }
.kxt-ic .ico { width: 18px; height: 18px; }
.kxt-ic.done { color: #16a34a; } .kxt-ic.wait { color: #f59e0b; } .kxt-ic.doing { color: #1f6fe0; }
.kxt-scroll { max-height: 206px; overflow: auto; }
.kxt-wt th { position: sticky; top: 0; background: #fff; z-index: 1; text-align: center; }
.kxt-wt td { font-weight: 500; text-align: center; padding: 4px 5px; font-size: 13px; }
.kxt-wt td.l { text-align: left; white-space: normal; overflow-wrap: anywhere; }
.kxt-wt td.l b { font-weight: 700; }
.kxt-or { color: #ea580c; }
.kxt-st { display: inline-flex; gap: 4px; align-items: center; font-weight: 600; font-size: 12.5px; white-space: nowrap; color: #1d4ed8; }
.kxt-st .ico { width: 15px; height: 15px; flex: none; }
.kxt-st.ok { color: #15803d; } .kxt-st.bad { color: #c81e1e; } .kxt-st.wait, .kxt-st.fix { color: #c2410c; } .kxt-st.plan { color: #b45309; }
.kxt-pill { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 700; white-space: nowrap; color: #fff; background: #1f6fe0; }
.kxt-pill.ok { background: #16a34a; } .kxt-pill.bad { background: #e11d2e; } .kxt-pill.run { background: #f59e0b; } .kxt-pill.plan { background: #64748b; }
.kxt-bar { width: 70px; height: 11px; border-radius: 6px; background: #e2e8f0; overflow: hidden; display: inline-block; vertical-align: middle; margin-right: 6px; }
.kxt-bar i { display: block; height: 100%; background: linear-gradient(90deg, #3b82f6, #1d4ed8); border-radius: 6px; }
.kxt-bar.ok i { background: linear-gradient(90deg, #22c55e, #16a34a); } .kxt-bar.fix i { background: linear-gradient(90deg, #fcd34d, #f5b301); } .kxt-bar.plan i { background: #94a3b8; }
.kxt-smp td { padding: 5px 5px; font-size: 12.5px; font-weight: 500; text-align: left; }
.kxt-smp td.l { white-space: normal; overflow-wrap: anywhere; }
.kxt-smp td:last-child { white-space: nowrap; }

/* biểu đồ */
.kxt-donut { grid-template-columns: minmax(130px, 1.15fr) minmax(110px, 1fr); }
.kxt-donut .chart, .kxt .cc-donut .chart { height: 186px; }
.kxt .cc-leg .kxt-plain { gap: 6px; font-size: 11.5px; line-height: 1.25; }
.kxt .cc-leg .kxt-plain span { min-width: 0; overflow-wrap: anywhere; }
.kxt-trend .chart, .kxt-week .chart { height: 200px; }

/* luồng xử lý kỹ thuật */
.kxt-fn { padding-top: 2px; }
.kxt-fn > button span { font-size: 11.5px; min-height: 28px; overflow-wrap: anywhere; }
.kxt-fn > button b { font-size: clamp(16px, 1.4vw, 22px); }
.kxt-fn em { font-size: 11.5px; }
.kxt-fn .ar { margin-top: 30px; }

/* chất lượng */
.kxt-q > button { padding: 6px 3px; }
.kxt-q span { font-size: 12px; overflow-wrap: anywhere; }
.kxt-q b { font-size: clamp(16px, 1.3vw, 21px); }
.kxt-q b.pos { color: #16a34a; } .kxt-q b.neg { color: #e11d2e; }

/* cảnh báo */
.kxt-alerts .cc-risk a { font-size: 13.5px; }
.kxt-alerts .cc-risk a .ico { width: 24px; height: 24px; }
.kxt-alerts .cc-risk { max-height: 200px; overflow: auto; }

/* danh sách cải tiến / việc tiếp theo */
.kxt-imp, .kxt-next { max-height: 200px; }
.kxt-imp a, .kxt-next a { font-size: 13.5px; white-space: normal; overflow-wrap: anywhere; line-height: 1.3; }
.kxt-imp .due { color: #16a34a; font-size: 12.5px; }

/* chỉ số kỹ thuật & chất lượng (Khải) */
.kxt-ind { list-style: none; margin: 0; padding: 0; display: grid; }
.kxt-ind .kxt-plain { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto minmax(64px, auto); gap: 8px; align-items: center; padding: 6px 2px; border-bottom: 1px solid #eef2f8; }
.kxt-ind li:last-child .kxt-plain { border-bottom: 0; }
.kxt-ind .ico { width: 21px; height: 21px; color: var(--bl); }
.kxt-ind span { font-size: 13.5px; color: var(--nv); font-weight: 500; overflow-wrap: anywhere; }
.kxt-ind b { font-size: 15px; font-weight: 800; white-space: nowrap; }
.kxt-ind b.pos { color: #16a34a; } .kxt-ind b.neg { color: #e11d2e; }
.kxt-ind em { font-style: normal; font-size: 12.5px; color: var(--nv); text-align: right; white-space: nowrap; }

/* công việc kỹ thuật (ô minh họa + liên kết) */
.kxt-tw { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(118px, 1fr); gap: 8px; align-items: stretch; }
.kxt-pic { display: block; border-radius: 10px; overflow: hidden; }
.kxt-harness { width: 100%; height: 100%; min-height: 120px; display: block; }
.kxt-links { display: grid; gap: 6px; align-content: start; }
.kxt-links a { display: flex; gap: 7px; align-items: center; border: 1px solid #d3e2f6; border-radius: 8px; padding: 6px 8px; color: var(--nv); font-size: 12.5px; font-weight: 600; background: #fbfdff; min-width: 0; }
.kxt-links a span { flex: 1; min-width: 0; overflow-wrap: anywhere; line-height: 1.2; }
.kxt-links a .ico { width: 18px; height: 18px; color: var(--bl); flex: none; }
.kxt-links a em { font-style: normal; background: #1f6fe0; color: #fff; border-radius: 10px; font-size: 11px; padding: 0 6px; }
.kxt-links a:hover { border-color: var(--bl); background: #f2f7ff; }
.kxt-acts { display: flex; gap: 8px; flex-wrap: wrap; }

/* ===== co giãn theo màn hình ===== */
@media (max-width: 1500px) {
  .kxt-r1.n5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .kxt-r1.n5 > .kxt-score { grid-column: 1 / -1; }
}
@media (max-width: 1380px) {
  .ccd.kxt { grid-template-columns: 236px minmax(0, 1fr); }
  .kxt-r1 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .kxt-r1 > .kxt-score { grid-column: 1 / -1; }
  .kxt-r2, .kxt-ktsx .kxt-r2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .kxt-r2 > :first-child { grid-column: 1 / -1; }
  .kxt-r3, .kxt-ktsx .kxt-r3, .kxt-r4 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .kxt-r3 > :first-child, .kxt-ktsx .kxt-r3 > :first-child, .kxt-r4 > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 1180px) {
  .ccd.kxt { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "prof" "r1" "r2" "r3" "r4"; }
  .kxt-r1, .kxt-r1.n5 { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
}
@media (max-width: 900px) {
  .kxt-r2, .kxt-ktsx .kxt-r2, .kxt-r3, .kxt-ktsx .kxt-r3, .kxt-r4 { grid-template-columns: minmax(0, 1fr); }
  .kxt-r2 > :first-child, .kxt-r3 > :first-child, .kxt-ktsx .kxt-r3 > :first-child, .kxt-r4 > :first-child { grid-column: auto; }
  .kxt-hd { justify-content: flex-start; }
}
@media (max-width: 560px) {
  .kxt-r1, .kxt-r1.n5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kxt-r1 > .kxt-score { grid-column: 1 / -1; }
  .ccd .kxt-tile { min-height: 92px; padding: 8px; }
  .kxt-score .cc-sc { grid-template-columns: 104px 60px; } .kxt-score .cc-sc ul { grid-column: 1 / -1; }
  .kxt-donut { grid-template-columns: minmax(0, 1fr); }
  .kxt-fn { flex-wrap: wrap; } .kxt-fn > button { flex: 1 0 30%; } .kxt-fn .ar { display: none; }
  .kxt-tw { grid-template-columns: minmax(0, 1fr); }
  .kxt-ind .kxt-plain { grid-template-columns: 22px minmax(0, 1fr) auto; } .kxt-ind em { grid-column: 2 / -1; text-align: left; }
  .kxt-hd .cc-flt { width: 100%; }
}

/* vòng chỉnh 1 — khít một màn hình 16:9 như ảnh */
.kxt-b0 { border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; }
button.cc-medal.kxt-b0 { background: none; }
.kxt .cc-card { padding: 7px 12px 8px; }
.kxt .cc-card > header { margin-bottom: 3px; }
.kxt .cc-card > header h3 { font-size: 15.5px; gap: 6px; }
.kxt .cc-card > header h3 small { font-size: 12.5px; }
.kxt .cc-card > header h3 > .ico, .kxt .cc-card > header h3 > svg { width: 22px; height: 22px; }
.kxt .bg-more { font-size: 12.5px; }
.kxt-badge { display: inline-flex; gap: 3px; align-items: center; font-size: 11px; font-weight: 700; color: #1f4fa8; background: #eef4ff; border: 1px solid #cfe0fb; border-radius: 10px; padding: 1px 7px; white-space: nowrap; cursor: help; }
.kxt-badge .ico { width: 12px; height: 12px; } .kxt-badge.ok { color: #15803d; background: #ecfdf3; border-color: #bbf7d0; }
.kxt-kt td, .kxt-kt th { padding: 3px 4px; font-size: 12px; }
.kxt-kt td.l { font-size: 11.5px; line-height: 1.18; min-width: 110px; }
.kxt-kt tbody td { height: 27px; }
.kxt-donut { grid-template-columns: minmax(140px, 1.3fr) minmax(112px, 1fr); }
.kxt .cc-donut .chart, .kxt-donut .chart { height: 178px; }
.kxt-trend .chart, .kxt-week .chart { height: 186px; }
.kxt-fn > button { gap: 2px; }
.kxt-fn > button .ico { width: 24px; height: 24px; }
.kxt-fn > button span { font-size: 11px; min-height: 26px; line-height: 1.15; }
.kxt-fn .ar { margin-top: 26px; }
.kxt-mt td, .kxt-mt th { padding: 3px 5px; font-size: 12px; }
.kxt-q > button { padding: 4px 3px; }
.kxt-q .ico { width: 26px !important; height: 26px !important; }
.kxt-scroll { max-height: 168px; }
.kxt-alerts .cc-risk, .kxt-imp, .kxt-next { max-height: 168px; }
.kxt-r1 .cc-score { padding: 6px 10px; }
.ccd .kxt-tile { min-height: 96px; }
.kxt-head { padding: 6px 12px; }
.kxt-head .cc-ttl > .ico { width: 36px; height: 36px; }
/* vòng chỉnh 2 */
.kxt-r1 { grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(330px, 1.8fr); }
.kxt-r1.n5 { grid-template-columns: repeat(5, minmax(0, 1fr)) minmax(318px, 1.7fr); }
.kxt-score > header h3 { font-size: 14px !important; white-space: nowrap; }
.kxt-score > header h3 > span { overflow: hidden; text-overflow: ellipsis; }
.kxt-score > header h3 > .ico { width: 20px !important; height: 20px !important; }
.kxt-score .cc-sc { grid-template-columns: 104px 58px minmax(0, 1fr); gap: 6px; }
.kxt-score .cc-medal { width: 104px; height: 82px; }
.kxt-score .cc-medal b { font-size: 16px; }
.kxt-score .cc-sc ul { gap: 3px; }
.kxt-score .cc-sc li .kxt-plain { font-size: 11px; line-height: 1.2; }
.kxt-score .cc-grade { padding: 4px 2px; } .kxt-score .cc-grade b { font-size: 28px; }
.kxt-r2 { grid-template-columns: minmax(0, 1.38fr) minmax(0, 1fr) minmax(0, .92fr); }
.kxt-kt td.l { font-size: 11px; min-width: 0; }
.kxt-kt tbody td { height: 25px; }
.kxt-scroll { max-height: 150px; }
.kxt-alerts .cc-risk, .kxt-imp, .kxt-next { max-height: 150px; }
.kxt-alerts .cc-risk li { padding: 3px 0; }
.kxt .cc-tk li { padding: 3px 0; }
.kxt-imp a, .kxt-next a { font-size: 13px; }
.ccd .kxt-tile .lb { font-size: clamp(11.5px, 8.6cqi, 15px); }
.ccd .kxt-tile b { font-size: clamp(16px, 14.5cqi, 28px); }
.ccd .kxt-tile small { font-size: clamp(10.5px, 7.4cqi, 13px); }
.kxt-imp li.done a { text-decoration: none; color: var(--nv); }
.kxt-imp li.done .ck { color: #16a34a; }
.kxt-mt th { white-space: nowrap; }
.kxt-mt td.l { font-size: 11.5px; line-height: 1.2; }
.kxt-db .kxt-mt td, .kxt-sup .kxt-mt td { height: 26px; }
.kxt-prof .cc-pf { padding-right: 24px; }
.kxt-r1.n5 { grid-template-columns: repeat(5, minmax(0, 1fr)) minmax(328px, 1.75fr); }
.ccd .kxt-tile .lb { font-size: clamp(12px, 9cqi, 15px); }
.kxt-smp td.l:first-child { font-size: 12px; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; border-bottom: 0; }
.kxt-smp tr td { vertical-align: middle; }
.kxt-smp tr { border-bottom: 1px solid #eef2f8; }
.kxt-smp td.l:first-child { padding-bottom: 2px; }
.kxt-donut { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
.kxt .cc-leg li { min-width: 0; }

/* ===== co giãn theo màn hình (cuối tệp để thắng các quy tắc máy tính phía trên) ===== */
@media (max-width: 1500px) {
  .kxt-r1.n5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .kxt-r1.n5 > .kxt-score { grid-column: 1 / -1; }
}
@media (max-width: 1380px) {
  .ccd.kxt { grid-template-columns: 236px minmax(0, 1fr); }
  .kxt-r1 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .kxt-r1 > .kxt-score { grid-column: 1 / -1; }
  .kxt-r2, .kxt-ktsx .kxt-r2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .kxt-r2 > :first-child { grid-column: 1 / -1; }
  .kxt-r3, .kxt-ktsx .kxt-r3, .kxt-r4 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .kxt-r3 > :first-child, .kxt-ktsx .kxt-r3 > :first-child, .kxt-r4 > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 1180px) {
  .ccd.kxt { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "prof" "r1" "r2" "r3" "r4"; }
  .kxt-r1, .kxt-r1.n5 { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
}
@media (max-width: 900px) {
  .kxt-r2, .kxt-ktsx .kxt-r2, .kxt-r3, .kxt-ktsx .kxt-r3, .kxt-r4 { grid-template-columns: minmax(0, 1fr); }
  .kxt-r2 > :first-child, .kxt-r3 > :first-child, .kxt-ktsx .kxt-r3 > :first-child, .kxt-r4 > :first-child { grid-column: auto; }
}
@media (max-width: 560px) {
  .kxt-r1, .kxt-r1.n5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kxt-r1 > .kxt-score { grid-column: 1 / -1; }
  .kxt-score .cc-sc { grid-template-columns: 104px 60px; } .kxt-score .cc-sc ul { grid-column: 1 / -1; }
  .kxt-donut { grid-template-columns: minmax(0, 1fr); }
}
.ccd .kxt-tile small { flex-wrap: nowrap; } .ccd .kxt-tile small span { white-space: normal; }

/* ====================== KXP · Điều độ SX & Công nhân (cập nhật 10/11/2026 — chỉ lớp .kxp-*) ====================== */
.kxp { --nv: #0b2a5b; --bl: #1f6fe0; color: var(--nv); }
.kxp .kxp-card { min-width: 0; padding: 8px 12px 9px; }
.kxp .kxp-card > header { margin-bottom: 5px; flex-wrap: wrap; }
.kxp .kxp-card > header h3 { font-size: clamp(14px, 1.05vw, 17px); min-width: 0; }
.kxp .kxp-card > header h3 > span { min-width: 0; overflow-wrap: anywhere; }
.kxp .kxp-card > header h3 small { font-size: .86em; }
.kxp .kxp-card > header h3 .ico { width: 24px; height: 24px; }
.kxp .muted { color: #64748b; }
.kxp-demo { display: inline-block; margin-top: 6px; font-size: 11px; font-weight: 700; color: #92400e; background: #fef3c7; border: 1px solid #fcd34d; border-radius: 10px; padding: 1px 8px; }
.kxp-note { display: flex; gap: 6px; align-items: flex-start; font-size: 12px; color: #1f4fa8; margin: 6px 0 0; overflow-wrap: anywhere; }
.kxp-note .ico { width: 14px; height: 14px; flex: none; margin-top: 1px; }
.kxp-empty { color: #64748b; font-size: 13.5px; padding: 12px 4px; margin: 0; }
.kxp-hd { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.kxp-mini { width: 24px; height: 24px; border: 1px solid #d3e2f6; border-radius: 6px; background: #fff; display: inline-grid; place-items: center; color: var(--bl); padding: 0; vertical-align: middle; }
.kxp-mini .ico { width: 14px; height: 14px; }
.kxp-who select { max-width: 220px; }

/* ---- lưới một màn hình 16:9 (ảnh fs2) ---- */
.kxp-dd { display: grid; gap: 9px; grid-template-columns: 250px repeat(12, minmax(0, 1fr));
  grid-template-areas: "prof ov ov ov ov ov ov ov ov ov ov ov ov" "prof sh sh sh sh tr tr tr tr gc gc gc gc" "ord ord ord ord ord ord ord qc qc qc cap cap cap" "kpi kpi kpi kpi kpi kpi al al al al tk tk tk"; }
.kxp-dd > .kxp-prof { grid-area: prof; } .kxp-dd > .kxp-ov { grid-area: ov; } .kxp-dd > .kxp-share { grid-area: sh; } .kxp-dd > .kxp-trend { grid-area: tr; } .kxp-dd > .kxp-gc { grid-area: gc; }
.kxp-dd > .kxp-ord { grid-area: ord; } .kxp-dd > .kxp-qc { grid-area: qc; } .kxp-dd > .kxp-cap { grid-area: cap; } .kxp-dd > .kxp-kpi { grid-area: kpi; } .kxp-dd > .kxp-alert { grid-area: al; } .kxp-dd > .kxp-tasks { grid-area: tk; }
/* ---- lưới công nhân (ảnh bg3) ---- */
.kxp-cn { display: grid; gap: 9px; grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-areas: "prof prof prof ov ov ov ov ov ov ov ov ov" "inc inc inc inc inc res res res res sk sk sk" "dly dly dly dly wk wk wk wk rt rt rt rt" "dly dly dly dly rl rl rl rl rw rw rw rw"; }
.kxp-cn > .kxp-prof { grid-area: prof; } .kxp-cn > .kxp-ov { grid-area: ov; } .kxp-cn > .kxp-inc { grid-area: inc; } .kxp-cn > .kxp-res { grid-area: res; } .kxp-cn > .kxp-skill { grid-area: sk; }
.kxp-cn > .kxp-daily { grid-area: dly; } .kxp-cn > .kxp-week { grid-area: wk; } .kxp-cn > .kxp-rate { grid-area: rt; } .kxp-cn > .kxp-rules { grid-area: rl; } .kxp-cn > .kxp-rew { grid-area: rw; }

/* ---- hồ sơ ---- */
.kxp-pf { display: flex; gap: 12px; align-items: center; min-width: 0; }
.kxp-pf > div { min-width: 0; }
.kxp-pf h3 { margin: 0; font-size: clamp(17px, 1.35vw, 22px); font-weight: 800; color: var(--nv); line-height: 1.15; overflow-wrap: anywhere; }
.kxp-pf h3 + span { display: block; color: var(--bl); font-size: 14px; font-weight: 600; }
.kxp-ava { border-radius: 50%; object-fit: cover; flex: none; border: 3px solid #fff; box-shadow: 0 3px 10px rgba(20, 60, 140, .25); }
.kxp-ava.ini { display: inline-grid; place-items: center; background: linear-gradient(135deg, #1f6fe0, #4f46e5); color: #fff; font-weight: 800; font-size: 24px; }
.kxp-prof h4 { display: flex; align-items: center; gap: 6px; margin: 10px 0 4px; font-size: 14.5px; font-weight: 800; color: #1d4ed8; }
.kxp-prof h4 .ico { width: 18px; height: 18px; }
.kxp-prof h4.kxp-tc { color: var(--nv); }
.kxp-chk { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.kxp-chk li { display: flex; gap: 7px; align-items: flex-start; font-size: 13.5px; line-height: 1.25; min-width: 0; }
.kxp-chk li span { min-width: 0; overflow-wrap: anywhere; }
.kxp-chk li .ico { width: 17px; height: 17px; color: #16a34a; stroke-width: 3; flex: none; margin-top: 1px; }
.kxp-chk.goal li.bad .ico { color: #e11d2e; } .kxp-chk.goal li.na .ico { color: #94a3b8; stroke-width: 2; }
.kxp-kv { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 2px; }
.kxp-kv li { display: flex; gap: 6px; align-items: center; font-size: 13px; min-width: 0; }
.kxp-kv li span { min-width: 0; overflow-wrap: anywhere; }
.kxp-kv .ico { width: 15px; height: 15px; color: var(--bl); flex: none; }
.kxp-skb { display: inline-block; margin-top: 6px; font-size: 12px; font-weight: 700; color: #fff; background: #64748b; border-radius: 10px; padding: 2px 10px; max-width: 100%; overflow-wrap: anywhere; }
.kxp-skb.ok { background: linear-gradient(90deg, #16a34a, #22c55e); }

/* ---- tổng quan + bộ lọc ---- */
.kxp-ovh { display: flex; align-items: center; justify-content: space-between; gap: 6px 12px; flex-wrap: wrap; margin-bottom: 6px; }
.kxp-ovh h3 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: clamp(14px, 1.1vw, 18px); font-weight: 800; min-width: 0; }
.kxp-ovh h3 > span { min-width: 0; overflow-wrap: anywhere; }
.kxp-ovh h3 .ico { width: 26px; height: 26px; color: var(--bl); flex: none; }
.kxp-ovh h3 small { font-weight: 500; font-size: .86em; }
.kxp-ovs { font-size: 12px; color: #1f4fa8; display: inline-flex; gap: 5px; align-items: center; min-width: 0; overflow-wrap: anywhere; }
.kxp-ovs .ico { width: 14px; height: 14px; flex: none; }
.kxp-flt { display: flex; align-items: center; gap: 6px 14px; flex-wrap: wrap; }
.kxp-flt label { display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: 14px; white-space: nowrap; }
.kxp-flt .sel { height: 34px; min-width: 130px; border: 1px solid #b9cdea; border-radius: 8px; font-size: 14px; color: var(--nv); background-color: #fff; padding: 0 28px 0 10px; }
.kxp-rf { width: 38px; height: 34px; border: 1px solid #b9cdea !important; border-radius: 8px; color: var(--bl); background: #fff; }

/* ---- ô màu: co theo bề rộng ô (container query) — chữ không lòi khỏi ô ---- */
.kxp-tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.kxp-tile { container-type: inline-size; position: relative; overflow: hidden; display: flex; gap: 6%; align-items: center; min-width: 0; min-height: 84px; border: 0; border-radius: 10px; padding: 8px 9px; color: #fff; text-align: left; cursor: pointer; box-shadow: 0 6px 14px rgba(20, 60, 140, .2); transition: transform .15s; text-decoration: none; }
.kxp-tile:hover { transform: translateY(-2px); color: #fff; }
.kxp-tile::after { content: ''; position: absolute; inset: 0; background: radial-gradient(120% 90% at 100% 0%, rgba(255, 255, 255, .2), transparent 58%); pointer-events: none; }
.kxp-tile .ic { flex: none; display: grid; place-items: center; }
.kxp-tile .ic .ico { width: clamp(22px, 17cqi, 44px); height: clamp(22px, 17cqi, 44px); stroke-width: 1.4; }
.kxp-tile .tx { display: grid; gap: 1px; min-width: 0; flex: 1; position: relative; z-index: 1; text-align: center; justify-items: center; }
.kxp-tile .lb { font-size: clamp(11px, 7.2cqi, 15px); line-height: 1.15; overflow-wrap: anywhere; max-width: 100%; }
.kxp-tile b { font-size: clamp(13px, 12.5cqi, 28px); font-weight: 800; line-height: 1.15; white-space: nowrap; letter-spacing: -.01em; max-width: 100%; }
.kxp-tile.long b { font-size: clamp(12px, 9.6cqi, 24px); }
.kxp-tile small { font-size: clamp(9.5px, 6cqi, 13px); font-weight: 600; line-height: 1.2; display: block; overflow-wrap: anywhere; max-width: 100%; }
.kxp-tile small .ico { width: 1em; height: 1em; stroke-width: 3; vertical-align: -2px; }
.kxp-tile small.gd .ico, .kxp-tile small.gd b { color: #bbf7d0; } .kxp-tile small.bd .ico, .kxp-tile small.bd b { color: #fde68a; }
.kxp-tile small b { font-size: inherit; white-space: normal; }
.kxp-tile.c-blue { background: linear-gradient(135deg, #1544c4, #2f7cf6); } .kxp-tile.c-green { background: linear-gradient(135deg, #12893b, #2cc25f); }
.kxp-tile.c-violet { background: linear-gradient(135deg, #47209f, #7b4ddc); } .kxp-tile.c-orange { background: linear-gradient(135deg, #ef640d, #ff9f35); }
.kxp-tile.c-pink { background: linear-gradient(135deg, #d0103f, #f43f6e); }

/* ---- tỷ trọng, biểu đồ ---- */
.kxp-tabs2 { display: flex; gap: 4px; background: #f1f5fb; border-radius: 8px; padding: 3px; margin-bottom: 2px; }
.kxp-tabs2 button { flex: 1; border: 0; background: transparent; border-radius: 6px; padding: 4px 6px; font-size: 12.5px; font-weight: 700; color: var(--nv); min-width: 0; overflow-wrap: anywhere; }
.kxp-tabs2 button.on { background: linear-gradient(90deg, #2b7bf3, #1d63dc); color: #fff; }
.kxp-donut { display: grid; grid-template-columns: minmax(130px, 1.05fr) minmax(0, 1fr); align-items: center; gap: 4px; }
.kxp-donut .chart { height: 152px; min-width: 0; }
.kxp-leg { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; font-size: 12px; line-height: 1.25; min-width: 0; }
.kxp-leg li { display: flex; gap: 6px; cursor: pointer; min-width: 0; } .kxp-leg li span { min-width: 0; overflow-wrap: anywhere; } .kxp-leg li em { display: block; font-style: normal; color: #15803d; font-size: 11.5px; }
.kxp-leg i { width: 11px; height: 11px; border-radius: 50%; margin-top: 2px; flex: none; }
.kxp-trend .chart { height: 164px; }
.kxp-week .chart { height: 172px; }

/* ---- danh sách số liệu ---- */
.kxp-dl { display: grid; margin: 0; }
.kxp-dl a { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 4px 4px; color: inherit; border-bottom: 1px solid #eef2f8; border-radius: 4px; min-width: 0; }
.kxp-dl a:last-child { border-bottom: 0; } .kxp-dl a:hover { background: #f2f7ff; }
.kxp-dl dt { font-size: 13.5px; font-weight: 600; display: flex; align-items: center; gap: 8px; min-width: 0; overflow-wrap: anywhere; }
.kxp-dl dt span { min-width: 0; }
.kxp-dl dt em { font-style: normal; font-weight: 500; color: #64748b; font-size: 12px; }
.kxp-dl dt .ico { width: 19px; height: 19px; color: var(--bl); flex: none; }
.kxp-dl dd { margin: 0; font-size: 15px; font-weight: 800; color: #16a34a; white-space: nowrap; display: inline-flex; gap: 4px; align-items: center; }
.kxp-dl dd.neg { color: #e11d2e; } .kxp-dl dd .ico { width: 16px; height: 16px; }
.kxp-dl.r dd { color: #15803d; } .kxp-dl.rw dd { color: var(--nv); white-space: normal; text-align: right; font-size: 13px; min-width: 0; overflow-wrap: anywhere; }
.kxp-pill { display: inline-block; border-radius: 12px; padding: 2px 10px; font-weight: 800; background: #eef2f7; color: #475569; font-size: 13px; }
.kxp-pill.ok { background: linear-gradient(90deg, #16a34a, #22c55e); color: #fff; } .kxp-pill.na { background: #fef3c7; color: #92400e; }

/* ---- bảng ---- */
.kxp .cc-t th, .kxp .cc-t td { padding: 3px 5px; }
.kxp-dd .cc-t td { line-height: 1.2; }
.kxp-dd .kxp-kt td, .kxp-dd .kxp-kt th { padding-top: 2px; padding-bottom: 2px; }
.kxp .cc-t td { font-size: 13px; }
.kxp-ot td.l.kxp-prod { white-space: normal; overflow-wrap: anywhere; max-width: 220px; }
.kxp-ot td:nth-child(2) { white-space: nowrap; }
.kxp-st { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11.5px; font-weight: 700; white-space: nowrap; color: #fff; background: #16a34a; }
.kxp-st.st-warn { background: #f5b301; color: #4a3200; } .kxp-st.st-crit { background: #e11d2e; }
.kxp-mt td.l { display: flex; gap: 6px; align-items: center; white-space: normal; }
.kxp-mt td.l span { min-width: 0; overflow-wrap: anywhere; }
.kxp-ok, .kxp-no, .kxp-na { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; flex: none; }
.kxp-ok { color: #16a34a; } .kxp-no { color: #e11d2e; } .kxp-na { color: #94a3b8; }
.kxp-ok .ico, .kxp-no .ico, .kxp-na .ico { width: 17px; height: 17px; stroke-width: 3; }
.kxp-kt td.l { white-space: normal; overflow-wrap: anywhere; }
.kxp-kt tfoot td { background: #fff3c4; }
.kxp-np { font-style: normal; font-size: 10.5px; color: #1f4fa8; background: #e6f0ff; border-radius: 8px; padding: 0 5px; }
.kxp-ach { display: flex; flex-wrap: wrap; gap: 3px 5px; margin-top: 5px; align-items: center; }
.kxp-tasks > header h3, .kxp-alert > header h3 { font-size: clamp(13.5px, .95vw, 16px) !important; }
.kxp-chip { display: inline-flex; gap: 4px; align-items: center; font-size: 11.5px; font-weight: 600; border-radius: 10px; padding: 1px 8px; background: #f1f5f9; color: #475569; max-width: 100%; overflow-wrap: anywhere; }
.kxp-chip .ico { width: 13px; height: 13px; flex: none; } .kxp-chip.ok { background: #dcfce7; color: #15803d; } .kxp-chip.na { background: #f8fafc; color: #94a3b8; }
.kxp-grade { font-size: 12px; font-weight: 700; padding: 1px 10px; border-radius: 10px; background: #e0e7ff; color: #3730a3; }
.kxp-grade.g-A { background: #dcfce7; color: #15803d; } .kxp-grade.g-D { background: #fde0e0; color: #c81e1e; }

/* ---- cảnh báo & công việc ---- */
.kxp-risk { list-style: none; margin: 0; padding: 0; display: grid; }
.kxp-risk li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 6px; align-items: center; padding: 4px 0; border-bottom: 1px solid #eef2f8; }
.kxp-risk li:last-child { border-bottom: 0; }
.kxp-risk a { display: flex; gap: 8px; align-items: center; color: var(--nv); font-size: 13px; font-weight: 500; min-width: 0; }
.kxp-risk a span { min-width: 0; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kxp-tri { width: 24px; height: 24px; flex: none; }
.kxp-risk li.l-vh .kxp-tri path { fill: #e11d2e; stroke: #e11d2e; }
.kxp .bg-lv { min-width: 0; padding: 3px 8px; font-size: 12px; white-space: nowrap; }
.kxp-tk { list-style: none; margin: 0; padding: 0; display: grid; }
.kxp-tk li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 4px 0; border-bottom: 1px solid #eef2f8; }
.kxp-tk li:last-child { border-bottom: 0; }
.kxp-tk .ck { border: 0; background: none; padding: 0; color: var(--bl); display: grid; place-items: center; }
.kxp-tk .ck .ico { width: 20px; height: 20px; }
.kxp-tk a { color: var(--nv); font-size: 13.5px; min-width: 0; overflow-wrap: anywhere; }
.kxp-tk li.done a { color: #64748b; } .kxp-tk li.od a { color: #c81e1e; }
.kxp-tk .due { font-size: 13px; color: var(--bl); text-decoration: underline; white-space: nowrap; }

/* ---- công nhân ---- */
.kxp-incb { display: grid; grid-template-columns: minmax(150px, .9fr) minmax(0, 1.3fr); gap: 6px; align-items: center; }
.kxp-incb .chart { height: 176px; min-width: 0; }
.kxp-it td.l { display: flex; gap: 6px; align-items: flex-start; white-space: normal; }
.kxp-it td.l span { min-width: 0; overflow-wrap: anywhere; font-weight: 700; }
.kxp-it td.l small { display: block; font-weight: 500; font-size: 10.5px; color: #64748b; }
.kxp-it tfoot td { background: #fff3c4; }
.kxp-dot { width: 11px; height: 11px; border-radius: 50%; flex: none; margin-top: 3px; background: #1f6fe0; }
.kxp-dot.k-output { background: #16a34a; } .kxp-dot.k-quality { background: #f59e0b; } .kxp-dot.k-skill { background: #7c3aed; } .kxp-dot.k-bonus { background: #e11d74; }
.kxp-sk { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.kxp-sk a { display: flex; gap: 8px; align-items: center; color: var(--nv); padding: 4px 2px; border-bottom: 1px solid #eef2f8; font-size: 13.5px; min-width: 0; }
.kxp-sk a span { flex: 1; min-width: 0; overflow-wrap: anywhere; } .kxp-sk a > .ico { width: 17px; height: 17px; color: #16a34a; stroke-width: 3; flex: none; }
.kxp-sk em { font-style: normal; font-weight: 700; color: #64748b; font-size: 12.5px; display: inline-flex; gap: 3px; align-items: center; min-width: 0; overflow-wrap: anywhere; }
.kxp-sk em.ok { color: #16a34a; } .kxp-sk em .ico { width: 14px; height: 14px; stroke-width: 3; flex: none; }
.kxp-allow { display: flex; gap: 10px; align-items: center; margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: linear-gradient(135deg, #ede9fe, #e0e7ff); color: #3730a3; font-size: 13.5px; min-width: 0; }
.kxp-allow > .ico { width: 36px; height: 36px; flex: none; color: #6d28d9; } .kxp-allow span { min-width: 0; overflow-wrap: anywhere; }
.kxp-dscroll { max-height: 214px; overflow-y: auto; }
.kxp-dt2 td.l { white-space: nowrap; }
.kxp-okp { color: #16a34a; font-weight: 700; display: inline-flex; gap: 3px; align-items: center; white-space: nowrap; } .kxp-nop { color: #b45309; font-weight: 700; display: inline-flex; gap: 3px; align-items: center; white-space: nowrap; }
.kxp-okp .ico, .kxp-nop .ico { width: 15px; height: 15px; }
.kxp-sum { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: 6px; align-items: center; margin-top: 6px; background: #fff3c4; border-radius: 8px; padding: 6px 10px; font-weight: 800; font-size: 14px; }
.kxp-sum b { text-align: right; white-space: nowrap; } .kxp-sum span { min-width: 0; overflow-wrap: anywhere; }
.kxp-rt { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: center; color: var(--nv); }
.kxp-medal { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; font-size: 40px; font-weight: 900; color: #b91c1c; background: radial-gradient(circle at 35% 30%, #fff7c2, #fbbf24 55%, #d97706); box-shadow: 0 0 0 5px #fde68a, 0 6px 14px rgba(180, 100, 0, .35); }
.kxp-medal.g-B { color: #1d4ed8; } .kxp-medal.g-C { color: #475569; background: radial-gradient(circle at 35% 30%, #fff, #cbd5e1 55%, #94a3b8); box-shadow: 0 0 0 5px #e2e8f0; }
.kxp-rt > span { display: grid; gap: 2px; min-width: 0; } .kxp-rt b { font-size: 15px; overflow-wrap: anywhere; } .kxp-rt .kxp-gl { color: #15803d; font-size: 17px; }
.kxp-rt ul { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 2px; }
.kxp-rt li { display: flex; gap: 6px; font-size: 12.5px; align-items: flex-start; } .kxp-rt li span { min-width: 0; overflow-wrap: anywhere; }
.kxp-rt li .ico { width: 15px; height: 15px; color: #16a34a; stroke-width: 3; flex: none; } .kxp-rt li.bad .ico { color: #e11d2e; } .kxp-rt li.na .ico { color: #94a3b8; }
.kxp-rl { display: grid; margin: 0; }
.kxp-rl a { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.3fr); gap: 8px; padding: 4px 2px; border-bottom: 1px solid #eef2f8; color: var(--nv); }
.kxp-rl dt { font-weight: 700; font-size: 13px; display: flex; gap: 6px; align-items: flex-start; min-width: 0; overflow-wrap: anywhere; } .kxp-rl dt .ico { width: 16px; height: 16px; color: var(--bl); flex: none; }
.kxp-rl dd { margin: 0; font-size: 12px; min-width: 0; overflow-wrap: anywhere; } .kxp-rl dd small { color: #64748b; }

/* ---- trang phụ ---- */
.kxp-page { display: grid; gap: 10px; }
.kxp-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.kxp-tabs a { padding: 6px 12px; border-radius: 8px; background: #fff; border: 1px solid #d3e2f6; color: var(--nv); font-weight: 700; font-size: 13.5px; }
.kxp-tabs a.on { background: linear-gradient(90deg, #2b7bf3, #1d63dc); color: #fff; border-color: transparent; }
.kxp-kpis { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 4px 0 8px; font-size: 14px; }
.kxp-kpis b { color: var(--bl); }
.kxp-h4 { margin: 12px 0 6px; font-size: 14.5px; }
.kxp-crit { list-style: none; padding: 0; display: grid; gap: 3px; } .kxp-crit li.ok { color: #15803d; } .kxp-crit li.bad { color: #c81e1e; }
.kxp-me td { background: #eef4ff; font-weight: 700; }
.kxp-pick { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; } .kxp-pick label { display: grid; gap: 4px; font-weight: 700; font-size: 13px; flex: 1 1 420px; min-width: 0; } .kxp-pick .sel { width: 100%; }
.kxp-shinfo { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13.5px; margin-bottom: 8px; padding: 8px 10px; background: #f2f7ff; border-radius: 8px; align-items: center; }
.kxp-grid .in, .kxp-grid .sel { width: 100%; min-width: 64px; height: 32px; }
.kxp-grid td:first-child .sel { min-width: 200px; } .kxp-grid td:nth-child(2) .sel, .kxp-grid td:nth-child(9) .sel { min-width: 118px; } .kxp-grid td:nth-child(n+3):nth-child(-n+8) .in { min-width: 58px; } .kxp-grid tr.conf td { background: #f0fdf4; }
.kxp-hint { display: block; font-size: 11px; color: #1f4fa8; } .kxp-hint .ico { width: 12px; height: 12px; }
.kxp-gsum { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 8px 0; font-size: 13px; }
.kxp-gact { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; } .kxp-gact .sp { flex: 1; }
.kxp-rbox h4 { margin: 10px 0 6px; } .kxp-rbox td:first-child { width: 190px; font-weight: 700; }
.kxp-text { font-size: 14px; line-height: 1.6; }
.kxp-mx th, .kxp-mx td { white-space: nowrap; }
.kxp-lv { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; font-weight: 700; }
.kxp-lv.kp { background: #dcfce7; color: #15803d; } .kxp-lv.kb { background: #e0e7ff; color: #3730a3; } .kxp-lv.kl { background: #fef3c7; color: #92400e; } .kxp-lv.pend { outline: 1px dashed #f59e0b; }
.kxp-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.kxp-links a { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border: 1px solid #d3e2f6; border-radius: 10px; color: var(--nv); font-weight: 600; background: #fbfdff; }
.kxp-links a:hover { border-color: var(--bl); } .kxp-links .ico { width: 20px; height: 20px; color: var(--bl); flex: none; }
.kxp-dt td { white-space: nowrap; }

/* ---- màn hình nhỏ hơn ảnh mẫu ---- */
@media (max-width: 1500px) {
  .kxp-dd { grid-template-columns: 230px repeat(12, minmax(0, 1fr)); }
  .kxp .cc-t td { font-size: 12.5px; } .kxp .cc-t th { font-size: 11px; }
}
@media (max-width: 1400px) {
  .kxp-dd { grid-template-columns: 220px repeat(12, minmax(0, 1fr));
    grid-template-areas: "prof ov ov ov ov ov ov ov ov ov ov ov ov" "prof sh sh sh sh sh sh tr tr tr tr tr tr" "gc gc gc gc gc qc qc qc qc cap cap cap cap" "ord ord ord ord ord ord ord ord ord ord ord ord ord" "kpi kpi kpi kpi kpi kpi kpi al al al al al al" "tk tk tk tk tk tk tk al al al al al al"; }
  .kxp-tiles { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
  .kxp-cn { grid-template-areas: "prof prof prof prof ov ov ov ov ov ov ov ov" "inc inc inc inc inc inc res res res res res res" "sk sk sk sk sk sk wk wk wk wk wk wk" "dly dly dly dly dly dly rt rt rt rt rt rt" "dly dly dly dly dly dly rw rw rw rw rw rw" "rl rl rl rl rl rl rl rl rl rl rl rl"; }
}
@media (max-width: 1100px) {
  .kxp-dd { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "prof prof" "ov ov" "sh tr" "gc qc" "cap cap" "ord ord" "kpi kpi" "al tk"; }
  .kxp-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kxp-cn { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "prof prof" "ov ov" "inc inc" "res sk" "wk rt" "dly dly" "rl rw"; }
}
@media (max-width: 760px) {
  .kxp-dd, .kxp-cn { grid-template-columns: minmax(0, 1fr); grid-template-areas: none; }
  .kxp-dd > *, .kxp-cn > * { grid-area: auto !important; }
  .kxp-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kxp-tiles > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  .kxp-donut, .kxp-incb { grid-template-columns: minmax(0, 1fr); }
  .kxp-flt { width: 100%; } .kxp-flt label { flex: 1 1 100%; justify-content: space-between; } .kxp-flt .sel { flex: 1; min-width: 0; }
  .kxp-rl a { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .kxp-sum { grid-template-columns: minmax(0, 1fr) repeat(3, auto); font-size: 13px; }
  .kxp-ot td:nth-child(3), .kxp-ot th:nth-child(3) { display: none; }
  .kxp-ot { min-width: 520px; } .kxp-ot td.l.kxp-prod { min-width: 130px; overflow-wrap: normal; }
  .kxp-kt { min-width: 470px; }
  .kxp-who select { max-width: 150px; }
}
/* danh sách trống (vd “Chưa có đề xuất cải tiến.”) chiếm cả dòng — không bị bóp vào cột ô tích */
.kxt-imp li.kxt-empty, .cc-tk li.kxt-empty { display: block; grid-column: 1 / -1; width: 100%; white-space: normal; }
