/* R78-HF189: focused maintenance refinements layered on the verified HF188 Master-Detail UI. */

/* People: title + actions + load/save state stay on one line on desktop. */
#hf186PeopleDetail .hf186-detail-sticky{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto auto;
  align-items:start;
  column-gap:10px;
  row-gap:0;
}
#hf186PeopleDetail .hf186-detail-title{display:contents}
#hf186PeopleDetail .hf186-detail-title>div{grid-column:1;grid-row:1;min-width:0}
#hf186PeopleDetail .hf186-detail-actions{grid-column:2;grid-row:1;margin-top:0;align-self:center;flex-wrap:nowrap}
#hf186PeopleDetail .hf186-save-state{grid-column:3;grid-row:1;align-self:start;margin-top:1px}
#hf186PeopleDetail .hf186-detail-actions .btn{white-space:nowrap}

/* Project multi-person selectors: 4-6 compact names per row depending on pane width. */
#hf186ProjectDetail .hf186-check-grid[data-hf186-project-multi]{
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:6px;
  max-height:132px;
}
#hf186ProjectDetail .hf186-check-grid[data-hf186-project-multi] .hf186-check{
  min-height:34px;
  padding:6px 7px;
  align-items:center;
  font-size:12.2px;
}
#hf186ProjectDetail .hf186-check-grid[data-hf186-project-multi] .hf186-check input{margin-top:0}
#hf186ProjectDetail .hf186-check-grid[data-hf186-project-multi] .hf186-check span{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

/* Deletion-audit access is deliberately attached to the title, not the filter toolbar. */
.hf189-title-with-audit{display:flex!important;align-items:center;gap:9px;flex-wrap:wrap}
.hf189-audit-button{
  min-height:28px;padding:4px 9px;border:1px solid #d8e3ee;border-radius:8px;background:#fff;
  color:#52657a;font-size:12px;font-weight:800;cursor:pointer
}
.hf189-audit-button:hover{background:#f5f9fd;border-color:#b8cde0}

.hf189-audit-overlay{position:fixed;inset:0;z-index:10080;background:rgba(15,23,42,.38);display:flex;align-items:center;justify-content:center;padding:22px}
.hf189-audit-dialog{width:min(1040px,96vw);max-height:min(760px,90vh);display:flex;flex-direction:column;background:#fff;border-radius:14px;box-shadow:0 24px 70px rgba(15,23,42,.28);overflow:hidden}
.hf189-audit-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px;border-bottom:1px solid #e5ebf2;background:#fbfdff}
.hf189-audit-head h3{margin:0;font-size:17px;color:#23384e}.hf189-audit-head button{border:1px solid #d8e3ee;border-radius:8px;background:#fff;width:34px;height:34px;cursor:pointer;font-size:18px}
.hf189-audit-help{padding:9px 16px;background:#f8fafc;border-bottom:1px solid #e8eef5;color:#6c7c8e;font-size:12px}
.hf189-audit-body{overflow:auto;padding:0 14px 14px}
.hf189-audit-table{width:100%;border-collapse:collapse;font-size:12.5px;table-layout:fixed}
.hf189-audit-table th{position:sticky;top:0;background:#f8fafc;color:#52657a;text-align:left;padding:9px 8px;border-bottom:1px solid #dce6f0;z-index:1}
.hf189-audit-table td{padding:9px 8px;border-bottom:1px solid #edf2f7;vertical-align:top;color:#30445b;overflow-wrap:anywhere}
.hf189-audit-table th:nth-child(1),.hf189-audit-table td:nth-child(1){width:150px}
.hf189-audit-table th:nth-child(2),.hf189-audit-table td:nth-child(2){width:190px}
.hf189-audit-table th:nth-child(3),.hf189-audit-table td:nth-child(3){width:150px}
.hf189-audit-empty{padding:36px;text-align:center;color:#7a899a}

@media(max-width:1360px){
  #hf186ProjectDetail .hf186-check-grid[data-hf186-project-multi]{grid-template-columns:repeat(5,minmax(0,1fr))}
}
@media(max-width:1120px){
  #hf186ProjectDetail .hf186-check-grid[data-hf186-project-multi]{grid-template-columns:repeat(4,minmax(0,1fr))}
}
@media(max-width:1100px){
  #hf186PeopleDetail .hf186-detail-sticky{grid-template-columns:minmax(0,1fr) auto;row-gap:7px}
  #hf186PeopleDetail .hf186-detail-title>div{grid-column:1;grid-row:1}
  #hf186PeopleDetail .hf186-save-state{grid-column:2;grid-row:1}
  #hf186PeopleDetail .hf186-detail-actions{grid-column:1/-1;grid-row:2;justify-content:flex-start}
}
@media(max-width:900px){
  #hf186ProjectDetail .hf186-check-grid[data-hf186-project-multi]{grid-template-columns:repeat(3,minmax(0,1fr))}
}
