/* PRODUCTION HUB V26.70 — Global table readability.
   Center all table headers, enlarge table text, and never hide/crop table text. */

/* Generic + all specialized table headers. */
.table thead th,
.plan-table thead th,
.v26-table thead th,
.v269-journal-table thead th,
.record-list-panel .table thead th,
.r13-pivot-table thead th,
.r22-table thead th,
.pvt-table thead th,
.ops-matrix thead th,
.lsx-excel thead th {
  text-align:center!important;
  vertical-align:middle!important;
  font-size:12.5px!important;
  line-height:1.35!important;
  font-weight:800!important;
  letter-spacing:.15px!important;
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
  overflow-wrap:anywhere!important;
  word-break:normal!important;
  height:auto!important;
  min-height:42px;
}

/* Headers with filter button: center label without allowing it to be clipped. */
.table thead th .xl-filter-header,
.plan-table thead th .xl-filter-header,
.v26-table thead th .xl-filter-header,
.v269-journal-table thead th .xl-filter-header,
.record-list-panel .table thead th .xl-filter-header {
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  text-align:center!important;
  gap:6px!important;
  min-width:0!important;
  white-space:normal!important;
  overflow:visible!important;
}
.table thead th .xl-filter-header>span,
.plan-table thead th .xl-filter-header>span,
.v26-table thead th .xl-filter-header>span,
.v269-journal-table thead th .xl-filter-header>span,
.record-list-panel .table thead th .xl-filter-header>span {
  flex:1 1 auto!important;
  min-width:0!important;
  text-align:center!important;
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
  overflow-wrap:anywhere!important;
}
/* Body text: one step larger and always fully visible. */
.table td,
.plan-table td,
.v26-table td,
.v269-journal-table td,
.record-list-panel .table td,
.r13-pivot-table td,
.r22-table td,
.pvt-table td,
.ops-matrix td,
.lsx-excel td {
  font-size:12.5px!important;
  line-height:1.42!important;
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
  overflow-wrap:anywhere!important;
  word-break:normal!important;
  vertical-align:middle!important;
  height:auto!important;
  max-height:none!important;
}

/* PLAN / WARNINGS: remove fixed-height and line-clamp cropping. */
.plan-root .plan-table tbody tr.plan-item,
.plan-root .plan-table tbody tr.plan-item>td {
  height:auto!important;
  min-height:76px!important;
  max-height:none!important;
  overflow:visible!important;
}
.plan-root .plan-table tbody tr.plan-item .ph29-warning-cell .ph29-warning,
.plan-root .plan-table .ph29-warning {
  display:block!important;
  -webkit-line-clamp:unset!important;
  -webkit-box-orient:initial!important;
  overflow:visible!important;
  white-space:normal!important;
  text-overflow:clip!important;
  font-size:11.5px!important;
  line-height:1.45!important;
}
.plan-root .plan-table th,
.plan-root .plan-table td {font-size:12px!important;line-height:1.42!important}
.plan-root .plan-table th {font-size:12.5px!important;text-align:center!important}

/* KHUNG / NỆM / ĐÓNG GÓI: status and stage text must not be ellipsized. */
.v26-table thead th{overflow:visible!important}
.v26-table .v26-table-row{height:auto!important;max-height:none!important}
.v26-table .v26-table-row td{height:auto!important;max-height:none!important;overflow:visible!important}
.v26-table .v268-stages,
.v26-table .ph29-status-list,
.v26-table td .v26-cellmetric {overflow:visible!important;max-height:none!important}
.v269-stage-name,
.v269-stage-data,
.v269-stage-pct,
.ph28-status-list>span,
.v26-table .ph29-status-item,
.v26-table .ph29-status-item>span:last-child {
  font-size:11.5px!important;
  line-height:1.35!important;
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
  max-width:none!important;
  height:auto!important;
  min-height:22px!important;
}
.v26-table .ph29-status-item{align-items:flex-start!important}
.v26-table .ph29-status-item b{min-width:52px!important;flex:0 0 auto!important}
.v268-stagebar{height:auto!important;min-height:25px!important}

/* REPORT / PIVOT / DASHBOARD matrices: headers centered; long content wraps. */
.r13-pivot-table th,.r13-pivot-table td,
.r22-table th,.r22-table td,
.pvt-table th,.pvt-table td,
.ops-matrix th,.ops-matrix td {
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
  overflow-wrap:anywhere!important;
}
.r13-pivot-table th:first-child,
.r22-table th:first-child,
.pvt-table th:first-child,
.ops-matrix th:first-child {text-align:center!important}

/* Keep horizontal scroll for wide tables rather than hiding text. */
.record-list-panel,
.plan-table-wrap,
.r13-matrix-scroll,
.pvt-table-scroll,
.ops-matrix-scroll {overflow-x:auto!important}

@media(max-width:1250px){
  .table thead th,.plan-table thead th,.v26-table thead th,.v269-journal-table thead th,
  .record-list-panel .table thead th,.r13-pivot-table thead th,.r22-table thead th,.pvt-table thead th,
  .ops-matrix thead th,.lsx-excel thead th{font-size:12px!important}
  .table td,.plan-table td,.v26-table td,.v269-journal-table td,.record-list-panel .table td,
  .r13-pivot-table td,.r22-table td,.pvt-table td,.ops-matrix td,.lsx-excel td{font-size:12px!important}
}


/* V26.74 — final alignment fixes. This file loads last, so these rules are authoritative. */
/* Users: every cell centered, including the inner flex action wrapper. */
.users-table{table-layout:fixed!important;width:100%!important}
.users-table th,.users-table td{text-align:center!important;vertical-align:middle!important}
.users-table tbody tr{min-height:58px!important}
.users-table tbody td{height:58px!important;padding:12px 14px!important}
.users-table .user-actions{width:100%!important;justify-content:center!important;align-items:center!important;text-align:center!important}
.users-table .user-actions .btn,.users-table .user-actions .muted{margin:0!important}

/* Stage detail/status rows: one shared row rhythm, no text collision, dots vertically centered. */
.v26-table .v268-stages,.v26-table .ph29-status-list{display:flex!important;flex-direction:column!important;gap:4px!important;overflow:visible!important}
.v26-table .v268-stagebar,.v26-table .ph29-status-item{height:30px!important;min-height:30px!important;max-height:30px!important;box-sizing:border-box!important;align-items:center!important}
.v26-table .v268-stagebar{display:grid!important;grid-template-columns:minmax(58px,76px) minmax(45px,1fr) 48px 68px!important;column-gap:6px!important;padding:3px 4px!important}
.v26-table .v269-stage-name,.v26-table .v269-stage-data,.v26-table .v269-stage-pct{font-size:11.5px!important;line-height:1.2!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;min-height:0!important;height:auto!important;align-self:center!important}
.v26-table .ph29-status-item{display:grid!important;grid-template-columns:10px minmax(42px,max-content) minmax(0,1fr)!important;column-gap:7px!important;padding:0 2px!important;font-size:11.5px!important;line-height:1.2!important;white-space:nowrap!important}
.v26-table .ph29-status-dot{width:8px!important;height:8px!important;min-width:8px!important;margin:0!important;padding:0!important;align-self:center!important;justify-self:center!important;display:block!important}
.v26-table .ph29-status-item b,.v26-table .ph29-status-item>span:last-child{font-size:11.5px!important;line-height:1.2!important;white-space:nowrap!important;min-height:0!important;height:auto!important;align-self:center!important;margin:0!important;padding:0!important}
.v26-table .ph29-status-item b{min-width:42px!important;max-width:none!important;overflow:visible!important;text-overflow:clip!important}
.v26-table .ph29-status-item>span:last-child{min-width:0!important;overflow:hidden!important;text-overflow:ellipsis!important}
.v26-table td.ph28-stage-cell,.v26-table td.ph28-status-cell{padding-top:8px!important;padding-bottom:8px!important;vertical-align:middle!important}

/* Progress overview: top row and progress row have exactly the same height. */
.mon-po-head{height:96px!important;min-height:96px!important;max-height:96px!important}
.mon-po-head .mon-col{height:96px!important;min-height:96px!important;max-height:96px!important;padding:12px 10px!important;display:flex!important;align-items:center!important;justify-content:center!important;text-align:center!important;overflow:visible!important}
.mon-po-bars{height:96px!important;min-height:96px!important;max-height:96px!important;display:grid!important;align-items:stretch!important;margin:0 12px 10px!important;border-top:1px solid #dbe5f1!important}
.mon-summary{height:96px!important;min-height:96px!important;max-height:96px!important;display:flex!important;align-items:center!important;justify-content:center!important;padding:0 16px!important}
.mon-mini{height:96px!important;min-height:96px!important;display:grid!important;grid-template-columns:78px minmax(0,1fr) 64px!important;gap:12px!important;align-items:center!important;width:100%!important;padding:0!important}
.mon-mini .mon-mini-label{font-size:14px!important;line-height:1.2!important;align-self:center!important;margin:0!important}
.mon-mini .mon-track{grid-column:2!important;align-self:center!important;width:100%!important;height:8px!important;margin:0!important}
.mon-mini .mon-mini-pct{grid-column:3!important;align-self:center!important;justify-self:end!important;display:flex!important;align-items:center!important;justify-content:flex-end!important;height:auto!important;min-height:0!important;margin:0!important;font-size:18px!important;line-height:1!important;text-align:right!important}
.mon-col-product strong{font-size:14px!important;line-height:1.3!important;max-height:54px!important;overflow:hidden!important}
.mon-col-product small{font-size:11.5px!important;line-height:1.25!important;margin-top:4px!important}
@media(max-width:1250px){
 .mon-po-head,.mon-po-head .mon-col,.mon-po-bars,.mon-summary,.mon-mini{height:92px!important;min-height:92px!important;max-height:92px!important}
 .mon-mini{grid-template-columns:68px minmax(0,1fr) 58px!important;gap:9px!important}
 .mon-mini .mon-mini-pct{font-size:17px!important}
}

/* V26.74b — long stage names stay readable without colliding with neighboring rows. */
.v26-table .v268-stagebar,.v26-table .ph29-status-item{height:34px!important;min-height:34px!important;max-height:34px!important}
.v26-table .v268-stagebar{grid-template-columns:minmax(88px,104px) minmax(40px,1fr) 48px 68px!important}
.v26-table .v269-stage-name{white-space:nowrap!important;overflow:visible!important;text-overflow:clip!important;max-width:none!important}
.v26-table .ph29-status-item{grid-template-columns:10px minmax(88px,max-content) minmax(0,1fr)!important}
.v26-table .ph29-status-item b{min-width:88px!important}


/* V26.75 — PACKING TABLE ONLY: keep progress and status inside their own columns. */
.v26-table-pack .v26-table-row td:nth-child(8),
.v26-table-pack .v26-table-row td:nth-child(9){
  overflow:hidden!important;
}
.v26-table-pack .v268-stages,
.v26-table-pack .ph29-status-list{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  overflow:hidden!important;
}
.v26-table-pack .v268-stagebar{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) 44px 66px!important;
  grid-template-areas:
    "name pct data"
    "track track track"!important;
  column-gap:6px!important;
  row-gap:5px!important;
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  height:auto!important;
  min-height:48px!important;
  max-height:none!important;
  padding:5px 4px!important;
  box-sizing:border-box!important;
  align-items:center!important;
}
.v26-table-pack .v268-stagebar .v269-stage-name{
  grid-area:name!important;
  min-width:0!important;
  max-width:100%!important;
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
  overflow-wrap:anywhere!important;
  line-height:1.2!important;
  text-align:left!important;
}
.v26-table-pack .v268-stagebar .v268-stagebar-track{
  grid-area:track!important;
  width:100%!important;
  min-width:0!important;
  margin:0!important;
}
.v26-table-pack .v268-stagebar .v269-stage-pct{
  grid-area:pct!important;
  min-width:0!important;
  width:auto!important;
  white-space:nowrap!important;
  overflow:visible!important;
  text-overflow:clip!important;
  text-align:right!important;
}
.v26-table-pack .v268-stagebar .v269-stage-data{
  grid-area:data!important;
  min-width:0!important;
  width:auto!important;
  white-space:nowrap!important;
  overflow:visible!important;
  text-overflow:clip!important;
  text-align:right!important;
}
.v26-table-pack .ph29-status-item{
  display:grid!important;
  grid-template-columns:10px minmax(0,1fr)!important;
  column-gap:7px!important;
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  height:auto!important;
  min-height:48px!important;
  max-height:none!important;
  padding:5px 4px!important;
  align-items:center!important;
  box-sizing:border-box!important;
}
.v26-table-pack .ph29-status-item b{
  display:none!important;
}
.v26-table-pack .ph29-status-dot{
  align-self:center!important;
  justify-self:center!important;
}
.v26-table-pack .ph29-status-item>span:last-child{
  min-width:0!important;
  max-width:100%!important;
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
  overflow-wrap:anywhere!important;
  text-align:center!important;
  line-height:1.25!important;
}


/* V26.76 — remove redundant Pack progress summary column and keep LSX on one line. */
.v26-table thead th:first-child .xl-filter-header>span,
.mon-table-head .mon-head-cell:first-child>span{
  white-space:nowrap!important;
  font-size:11px!important;
  letter-spacing:0!important;
}
.v26-table-pack .v26-table-row td:nth-child(8),
.v26-table-pack .v26-table-row td:nth-child(9){
  vertical-align:middle!important;
}

/* V26.77 — bỏ tên công đoạn ở cột trạng thái để nhường chỗ cho cột chi tiết các khâu */
.v26-table td.ph28-status-cell{padding-left:10px!important;padding-right:10px!important}
.v26-table .ph29-status-list{width:100%!important;min-width:0!important}
.v26-table .ph29-status-item{justify-content:flex-start!important;align-items:center!important}
