/* QTTH · Vận hành · Chi phí hủy hàng — module-local additions only.
 * Layout, cards, tabs (.phf-qr-tabs), KPI grid (.phf-pa-kpis) and tables come
 * from the shared QTTH / reporting / payroll-annual stylesheets. Squared,
 * restrained, no good/bad colour judgement on Tiết kiệm / Vượt. */
.phf-waste .phf-waste-so{font-variant-numeric:tabular-nums;color:#27313d;font-weight:700}
.phf-waste .phf-waste-so.is-over::before,.phf-waste .phf-waste-so.is-save::before{display:inline-block;width:6px;height:6px;margin:0 6px 2px 0;background:#27313d;content:""}
.phf-waste .phf-waste-so.is-save::before{background:transparent;border:1px solid #27313d;width:4px;height:4px}
.phf-waste td.is-na,.phf-waste .is-na{color:#8a939d}
.phf-waste .phf-waste-table td.c-name,.phf-waste .phf-waste-trend-table td.c-name{font-weight:700}
.phf-waste .phf-waste-drill{font-weight:700;color:#1f5f8b}
.phf-waste tr.phf-waste-comp td{background:#f7f8f9;font-size:12.5px;color:#3a4150}
.phf-waste tr.phf-waste-comp td.c-name{font-weight:600}
.phf-waste .phf-waste-indent{padding-left:14px}
.phf-waste .phf-waste-sub{display:block;font-size:11px;color:#6b7480;font-weight:600}
/* two compact monthly charts: side by side on desktop, stacked when narrow */
.phf-waste .phf-waste-charts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:4px 0 12px}
.phf-waste .phf-waste-chart{margin:0;border:1px solid #e1e5e9;background:#fff;padding:8px 10px 4px}
.phf-waste .phf-waste-chart-h{font-size:12.5px;font-weight:700;color:#27313d;margin:0 0 2px}
/* The PHF shell sets .phf-hr-root svg{fill:none;stroke:currentColor;stroke-width:1.8}\n   for outline icons; inherited by chart text it drew every label twice
   (fill + outline). Charts reset it here and per element (inline style). */
.phf-waste .phf-waste-plot{position:relative}
.phf-waste .phf-waste-svg{display:block;width:100%;height:auto;max-height:200px;fill:none;stroke:none;overflow:visible}
.phf-waste .phf-waste-svg text{stroke:none!important;paint-order:normal;font-family:Arial,Helvetica,sans-serif}
.phf-waste .phf-waste-axis{font-size:10px;fill:#6b7480}
.phf-waste .phf-waste-xlab{font-size:10px;fill:#3a4150}
.phf-waste .phf-waste-svg rect[data-waste-tip]:focus{outline:none;fill:rgba(31,95,139,.06)!important}
.phf-waste .phf-waste-tip{position:absolute;top:4px;transform:translateX(-50%);min-width:150px;max-width:220px;background:#fff;border:1px solid #c9d3dc;box-shadow:0 4px 12px rgba(30,36,48,.12);padding:6px 9px;font-size:12px;line-height:1.45;color:#1e2430;pointer-events:none;z-index:2}
.phf-waste .phf-waste-tip.is-right{transform:translateX(-100%)}
.phf-waste .phf-waste-tip b,.phf-waste .phf-waste-tip span{display:block;white-space:nowrap}
.phf-waste .phf-waste-tip .is-target{color:#b42318}
.phf-waste .phf-waste-tip .is-actual{color:#1f5f8b}
.phf-waste .phf-waste-legend{display:flex;flex-wrap:wrap;gap:14px;margin:2px 0 4px;font-size:11.5px;color:#3a4150}
.phf-waste .phf-waste-legend i{display:inline-block;width:14px;height:2px;margin:0 5px 3px 0;vertical-align:middle}
.phf-waste .phf-waste-legend .is-na{color:#8a939d}
/* one button typography for the whole module (base .phf-qtth-btn values);
   purpose may change colour/border only; <a> buttons never look like links */
.phf-waste .phf-qtth-btn,.phf-waste a.phf-qtth-btn{display:inline-flex;align-items:center;justify-content:center;font-family:inherit;font-size:13.5px;font-weight:800;line-height:1.2;letter-spacing:normal;text-decoration:none;text-align:center;white-space:nowrap;min-height:38px;padding:9px 16px;box-sizing:border-box}
.phf-waste .phf-qtth-btn:disabled,.phf-waste .phf-qtth-btn[disabled]{font-family:inherit;font-size:13.5px;font-weight:800;line-height:1.2}
.phf-waste a.phf-qtth-btn:hover,.phf-waste a.phf-qtth-btn:focus,.phf-waste a.phf-qtth-btn:visited{text-decoration:none}
.phf-waste .phf-waste-notice{border:1px solid #d7dde0;border-left:3px solid #8a96a3;background:#fff;padding:10px 14px;margin:0 0 12px;font-size:13px;line-height:1.45;color:#27313d}
.phf-waste .phf-waste-notice.is-info{border-left-color:#1f5f8b;background:#f5f8fb}
.phf-waste .phf-waste-notice.is-ok{border-left-color:#075e33;background:#f5f9f6}
.phf-waste .phf-waste-notice.is-warn{border-left-color:#b4530a;background:#fdf7f1}
.phf-waste .phf-waste-notice.is-error{border-left-color:#8a1c1c;background:#fbf3f3}
.phf-waste .phf-waste-actions{display:flex;flex-wrap:wrap;align-items:flex-end;gap:10px;margin:10px 0}
.phf-waste .phf-waste-actions .phf-qtth-btn[disabled]{opacity:.5;cursor:not-allowed}
.phf-waste .phf-waste-add input{min-width:300px}
.phf-waste .phf-waste-summary{display:flex;flex-wrap:wrap;gap:14px;margin:8px 0 10px}
.phf-waste .phf-waste-sumitem b{font-variant-numeric:tabular-nums;margin-left:2px}
.phf-waste .phf-waste-chip{display:inline-block;padding:2px 7px;font-size:11.5px;font-weight:700;border:1px solid #c7ced4;background:#fff;color:#27313d;white-space:nowrap}
.phf-waste .phf-waste-chip.is-new{border-color:#1f5f8b;color:#1f5f8b}
.phf-waste .phf-waste-chip.is-update{border-color:#b4530a;color:#8a4b08}
.phf-waste .phf-waste-chip.is-unchanged{color:#6b7480}
.phf-waste .phf-waste-chip.is-invalid{border-color:#8a1c1c;color:#8a1c1c;background:#fbf3f3}
.phf-waste .phf-waste-scrollbox{max-height:420px;overflow:auto}
.phf-waste .phf-waste-pnote{font-size:12px;color:#4a5560;max-width:420px}
/* data freshness: noticeable, not a warning box */
.phf-waste .phf-waste-fresh{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 16px;border:1px solid #c9d3dc;border-left:4px solid #1f5f8b;background:#f5f8fb;padding:10px 14px;margin:0 0 12px}
.phf-waste .phf-waste-fresh-main{font-size:15px;color:#1e2430}
.phf-waste .phf-waste-fresh-main b{font-size:16px;font-variant-numeric:tabular-nums}
.phf-waste .phf-waste-fresh-sub{font-size:13px;color:#27313d}
.phf-waste .phf-waste-fresh-std{font-size:12px;color:#6b7480;margin-left:auto}
.phf-waste .phf-waste-filter{border:1px solid #d7dde0;background:#fff;padding:8px 12px;margin:0 0 12px}
.phf-waste .phf-waste-filter summary{cursor:pointer;font-weight:700;font-size:13px}
.phf-waste .phf-waste-filter .phf-qr-filters{display:flex;flex-wrap:wrap;gap:12px;margin-top:8px}
.phf-waste .phf-waste-table tr.is-over td.c-name{box-shadow:inset 3px 0 0 #8a1c1c}
.phf-waste td.phf-waste-st{font-size:12.5px;font-weight:700;white-space:nowrap}
.phf-waste td.phf-waste-st.is-over{color:#8a1c1c}
.phf-waste td.phf-waste-st.is-within{color:#075e33}
.phf-waste td.phf-waste-st.is-na{color:#8a939d;font-weight:600}
.phf-waste .phf-waste-figs{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:0 0 10px}
.phf-waste .phf-waste-fig{border:1px solid #d7dde0;background:#fff;padding:10px 12px}
.phf-waste .phf-waste-fig-l{font-size:12px;color:#5c6672;font-weight:600}
.phf-waste .phf-waste-fig-v{font-size:20px;font-weight:700;color:#1e2430;font-variant-numeric:tabular-nums;margin-top:4px}
.phf-waste .phf-waste-fig-v small{font-size:12px;font-weight:600;color:#6b7480}
.phf-waste .phf-waste-fig-v .is-na{font-size:15px;color:#6b7480}
.phf-waste .phf-waste-gap.is-over{color:#8a1c1c}
.phf-waste .phf-waste-gap.is-within{color:#075e33}
.phf-waste .phf-waste-dir{font-size:10px}
.phf-waste .phf-waste-dir.is-up{color:#8a1c1c}
.phf-waste .phf-waste-dir.is-down{color:#075e33}
.phf-waste .phf-waste-form .phf-pa-h{display:flex;justify-content:space-between;align-items:center;gap:10px}
.phf-waste .phf-waste-steps{font-size:13px;font-weight:700;color:#1f5f8b;margin:4px 0 8px}
.phf-waste .phf-waste-rules{border:1px solid #d7dde0;border-left:3px solid #b4530a;background:#fdfaf6;padding:8px 14px;font-size:13px;line-height:1.5;color:#27313d}
.phf-waste .phf-waste-rules ul{margin:4px 0 0;padding-left:18px}
.phf-waste .phf-waste-radio{display:inline-flex;gap:6px;align-items:center;margin-right:18px;font-size:13px;cursor:pointer}
.phf-waste .phf-waste-periods{border:1px solid #c9d3dc;border-left:4px solid #1f5f8b;background:#f5f8fb;padding:6px 12px;margin:6px 0 8px;font-size:13.5px;color:#1e2430}
.phf-waste .phf-waste-period+.phf-waste-period{margin-top:2px}
.phf-waste .phf-waste-periods.is-bad{border-left-color:#8a1c1c;background:#fbf3f3}
/* section 03 local filter */
.phf-waste .phf-waste-trend-bar{display:flex;flex-wrap:wrap;align-items:flex-end;gap:6px 16px;margin:0 0 6px}
.phf-waste .phf-waste-trend-bar .phf-pa-note{flex:1 1 320px;margin:0}
.phf-waste .phf-waste-trend-filter select{min-width:150px}
/* section 02: Thiết lập chỉ tiêu (Admin) */
.phf-waste .phf-waste-target-h{display:flex;justify-content:space-between;align-items:center;gap:10px}
.phf-waste .phf-waste-policy{border:1px solid #c9d3dc;border-left:4px solid #1f5f8b;background:#fbfcfd;padding:10px 14px;margin:10px 0 0}
.phf-waste .phf-waste-policy h4{margin:0 0 8px;font-size:14px;color:#1e2430}
.phf-waste .phf-waste-polform{display:flex;flex-wrap:wrap;gap:10px 16px;align-items:flex-end}
.phf-waste .phf-waste-polform input[type=text]{width:120px}
.phf-waste .phf-waste-polreason{flex:1 1 260px}
.phf-waste .phf-waste-polform .phf-waste-polreason input{width:100%}
.phf-waste .phf-waste-polto{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px}
/* the shared .phf-qtth-field input box style must not reach the radios */
.phf-waste .phf-qtth-field .phf-waste-polto input[type=radio]{appearance:auto;-webkit-appearance:radio;width:14px;height:14px;min-height:0;min-width:0;padding:0;margin:0;border:0;box-shadow:none;background:none;flex:0 0 auto}
.phf-waste .phf-waste-polscope{display:inline-block;padding:7px 0;font-size:13px}
.phf-waste .phf-waste-pols{list-style:none;margin:6px 0 0;padding:0}
.phf-waste .phf-waste-pol{display:flex;flex-wrap:wrap;align-items:baseline;gap:2px 12px;padding:6px 0;border-top:1px solid #eceff2;font-size:13px}
.phf-waste .phf-waste-pol-main{font-variant-numeric:tabular-nums}
.phf-waste .phf-waste-pol.is-current .phf-waste-pol-st{color:#075e33;font-weight:700}
.phf-waste .phf-waste-pol.is-future .phf-waste-pol-st{color:#1f5f8b;font-weight:700}
.phf-waste .phf-waste-pol.is-expired .phf-waste-pol-st,.phf-waste .phf-waste-pol.is-superseded,.phf-waste .phf-waste-pol.is-voided{color:#6b7480}
.phf-waste .phf-waste-pol-voidbtn{margin-left:auto;font-size:12.5px}
.phf-waste .phf-waste-pol-void{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin-left:auto}
.phf-waste .phf-waste-pol-void input{min-width:220px}
.phf-waste .phf-waste-pol-audit{margin-top:6px;font-size:12.5px}
.phf-waste .phf-waste-pol-audit summary{cursor:pointer;color:#3a4150;font-weight:600}
.phf-waste .phf-waste-chip.is-warning{border-color:#b4530a;color:#8a4b08;background:#fdf7f1}
@media (max-width:860px){
  .phf-waste .phf-waste-charts{grid-template-columns:1fr}
  .phf-waste .phf-waste-figs{grid-template-columns:1fr}
  .phf-waste .phf-waste-fresh-std{margin-left:0}
  .phf-waste .phf-waste-add input{min-width:0;width:100%}
  .phf-waste .phf-waste-pol-void input,.phf-waste .phf-waste-polform input[type=text]{min-width:0;width:100%}
  .phf-waste .phf-waste-polform>*{flex:1 1 100%}
}
