
/* V419 - Tổng phụ cấp mở chi tiết + bảng lương đã chốt */
.v419-closed-payroll{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-bottom:12px;
  padding:13px 14px;
  border:1px solid var(--border);
  border-radius:10px;
  background:var(--muted);
}
.v419-closed-payroll>div{min-width:0}
.v419-closed-payroll strong{
  display:block;
  font-size:13.5px;
  line-height:1.35;
  color:var(--foreground);
}
.v419-closed-payroll span{
  display:block;
  margin-top:3px;
  font-size:11px;
  color:var(--foreground);
}
.v419-closed-payroll small{
  display:block;
  margin-top:4px;
  font-size:10px;
  line-height:1.4;
  color:var(--muted-foreground);
}
.v419-download-closed{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:none;
  min-height:40px;
  padding:0 13px;
  border:1px solid var(--foreground);
  border-radius:8px;
  background:var(--foreground);
  color:var(--background)!important;
  text-decoration:none!important;
  font-size:11.5px;
  font-weight:650;
}

/* Tổng phụ cấp chỉ chiếm 1 cột; chi tiết mở tại chỗ */
.v419-allowance-cell{
  min-width:0;
  position:relative;
}
.v419-allowance-cell summary{
  list-style:none;
  cursor:pointer;
  padding:8px 9px;
  border:1px solid var(--border);
  border-radius:8px;
  background:var(--card);
}
.v419-allowance-cell summary::-webkit-details-marker{display:none}
.v419-allowance-cell summary span{
  display:block;
  font-size:9.5px;
  color:var(--muted-foreground);
}
.v419-allowance-cell summary strong{
  display:block;
  margin-top:4px;
  font-size:12px;
  line-height:1.25;
  color:var(--foreground);
  font-variant-numeric:tabular-nums;
  white-space:nowrap;
}
.v419-allowance-cell summary small{
  display:block;
  margin-top:4px;
  font-size:9px;
  font-weight:600;
  color:var(--muted-foreground);
}
.v419-allowance-cell[open] summary{
  border-bottom-left-radius:0;
  border-bottom-right-radius:0;
}
.v419-allowance-detail{
  position:absolute;
  z-index:30;
  top:100%;
  right:0;
  width:220px;
  padding:7px 10px;
  border:1px solid var(--border);
  border-top:0;
  border-radius:0 0 8px 8px;
  background:var(--card);
  box-shadow:0 8px 20px rgba(0,0,0,.08);
}
.v419-allowance-detail>div{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:6px 0;
  border-bottom:1px solid var(--border);
}
.v419-allowance-detail>div:last-child{border-bottom:0}
.v419-allowance-detail span{
  font-size:10px;
  color:var(--muted-foreground);
}
.v419-allowance-detail b{
  font-size:10.5px;
  font-weight:650;
  color:var(--foreground);
  white-space:nowrap;
  font-variant-numeric:tabular-nums;
}

/* thêm một cột tổng phụ cấp */
@media(min-width:1281px){
  .v413-payroll-row{
    grid-template-columns:minmax(180px,1.45fr) minmax(135px,1fr) minmax(105px,.75fr) minmax(105px,.75fr) repeat(4,minmax(90px,.68fr)) auto!important;
  }
}
@media(max-width:1280px) and (min-width:641px){
  .v413-payroll-row{
    grid-template-columns:minmax(170px,1.25fr) minmax(135px,1fr) repeat(4,minmax(92px,.72fr)) auto!important;
  }
  .v413-payroll-row>.v413-money:nth-of-type(5),
  .v413-payroll-row>.v413-money:nth-of-type(6){display:none!important}
}
@media(max-width:720px){
  .v419-closed-payroll{
    align-items:stretch;
    flex-direction:column;
    gap:10px;
  }
  .v419-download-closed{width:100%}
}
@media(max-width:640px){
  .v419-allowance-cell{
    grid-column:1/-1;
  }
  .v419-allowance-cell summary{
    min-height:54px;
    padding:9px 10px;
  }
  .v419-allowance-cell summary span{font-size:10px}
  .v419-allowance-cell summary strong{font-size:13px}
  .v419-allowance-detail{
    position:static;
    width:100%;
    box-shadow:none;
  }
  .v419-allowance-detail span{font-size:10.5px}
  .v419-allowance-detail b{font-size:11px}
}
