/* R78-HF187: 14-inch readability + single-row maintenance controls.
   Pure presentation override loaded after HF186. No CRUD/RBAC/autosave/data-model logic is changed. */

/* Keep the maintenance controls on one horizontal row on notebook/desktop displays. */
body #page-projects.hf186-page>.card>.cardhead,
body #page-people.hf186-page>.card>.cardhead{
  padding:12px 16px!important;
  gap:12px!important;
  align-items:center!important;
  flex-wrap:nowrap!important;
}
body #page-projects.hf186-page>.card>.cardhead>div:first-child,
body #page-people.hf186-page>.card>.cardhead>div:first-child{min-width:145px;flex:1 1 auto}
body #page-projects.hf186-page>.card>.cardhead .cardtitle,
body #page-people.hf186-page>.card>.cardhead .cardtitle{font-size:15.5px!important;line-height:1.3}
body #page-projects.hf186-page>.card>.cardhead .cardsub,
body #page-people.hf186-page>.card>.cardhead .cardsub{display:none!important}
body #page-projects.hf186-page>.card>.cardhead .toolbar,
body #page-people.hf186-page>.card>.cardhead .toolbar{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  flex:0 1 auto!important;
  min-width:0!important;
  max-width:100%!important;
  margin-left:auto!important;
  gap:8px!important;
  row-gap:0!important;
  flex-wrap:nowrap!important;
  white-space:nowrap
}
body #page-projects.hf186-page>.card>.cardhead .search,
body #page-people.hf186-page>.card>.cardhead .search{
  flex:0 1 330px!important;
  width:330px!important;
  min-width:220px!important;
  max-width:350px!important
}
body #page-projects.hf186-page>.card>.cardhead .search input,
body #page-people.hf186-page>.card>.cardhead .search input{
  width:100%!important;
  min-width:0!important;
  height:42px!important;
  box-sizing:border-box!important;
  padding:9px 11px 9px 32px!important;
  font-size:14px!important;
  line-height:1.25!important
}
body #page-projects.hf186-page>.card>.cardhead .toolbar>select,
body #page-people.hf186-page>.card>.cardhead .toolbar>select{
  flex:0 0 auto!important;
  height:42px!important;
  min-width:110px!important;
  padding:8px 30px 8px 11px!important;
  font-size:14px!important;
  line-height:1.25!important
}
body #page-projects #projectStatus,
body #page-people #peopleStatus{min-width:118px!important}
body #page-projects #hf186ProjectSort,
body #page-people #hf186PeopleSort{min-width:124px!important}
body #page-projects #hf186ProjectPageSize,
body #page-people #hf186PeoplePageSize{min-width:104px!important}

/* Use the recovered vertical space from the one-row toolbar. */
body #page-projects .hf186-master-detail,
body #page-people .hf186-master-detail{
  height:calc(100vh - 205px);
  min-height:510px;
  max-height:none;
  grid-template-columns:minmax(0,1.06fr) minmax(0,.94fr)
}

/* Left master list: readable on a 14-inch notebook while remaining high-density. */
.hf186-list-header{padding:10px 12px;font-size:13.5px;line-height:1.35}
.hf186-list-header b{font-size:14.5px}.hf186-list-header span{font-size:12px}
.hf186-record-row{min-height:59px;gap:8px;padding:8px 10px}
.hf186-record-row b{font-size:14px;line-height:1.3}
.hf186-record-row small,.hf186-record-row em{font-size:12.2px;line-height:1.35}
.hf186-code{font-size:12.5px}
.hf186-dept{font-size:12.5px}.hf186-count b{font-size:14.5px}
.hf186-stage,.hf186-active,.hf186-inactive{font-size:11.3px;padding:4px 7px}
.hf186-pill{font-size:11px;line-height:1.3;padding:3px 7px}
.hf186-project-row{grid-template-columns:78px minmax(155px,1fr) 58px minmax(96px,.58fr) minmax(124px,.72fr)}
.hf186-people-row{grid-template-columns:minmax(150px,1fr) minmax(88px,.46fr) minmax(115px,.76fr) 48px 58px}
.hf186-updated b{font-size:12px}
.hf186-pager{padding:9px 10px;font-size:12.5px}.hf186-mini-btn{width:32px;height:30px;font-size:12px}
.hf186-empty-list span,.hf186-empty-detail span{font-size:12.5px}

/* Right detail pane: raise body/label/control sizes without reverting to oversized cards. */
.hf186-detail-sticky{padding:11px 12px}
.hf186-detail-title h3{margin:4px 0 3px;font-size:17.5px;line-height:1.35}
.hf186-detail-title small{font-size:12.5px;line-height:1.4}
.hf186-code-chip{font-size:11.5px;padding:4px 8px}
.hf186-save-state{font-size:11.5px;padding:5px 9px}
.hf186-detail-actions{gap:7px;margin-top:9px}.hf186-detail-actions .btn{min-height:34px;padding:6px 10px;font-size:12.5px}
.hf186-detail-scroll{padding:11px 12px 20px}
.hf186-section{margin-bottom:10px;border-radius:10px}
.hf186-section>h4{padding:8px 10px;font-size:13.5px;line-height:1.35}
.hf186-section>h4 small{font-size:11px}
.hf186-section>.hf186-form-grid,.hf186-section>.hf186-info-grid,.hf186-section>.hf186-support-editor,.hf186-section>.hf186-check-grid,.hf186-section>.hf186-current-tags,.hf186-section>.hf186-project-ref-list,.hf186-section>.hf186-muted{margin:10px}
.hf186-form-grid{gap:9px}
.hf186-field>label{margin-bottom:5px;font-size:12px;line-height:1.3}
.hf186-field>small{font-size:10.8px;line-height:1.4}
.hf186-field input,.hf186-field select,.hf186-field textarea{font-size:13.5px;padding:8px 9px;border-radius:8px}
.hf186-field input,.hf186-field select{height:39px}
.hf186-field textarea{min-height:76px;line-height:1.5}
.hf186-check-grid{gap:6px;max-height:170px}.hf186-group-grid{max-height:210px}
.hf186-check{gap:6px;padding:7px 8px;font-size:12.2px;line-height:1.35}
.hf186-check span>b{font-size:12.2px}.hf186-check span>small{font-size:10px}
.hf186-support-custom{height:39px;padding:8px 9px;font-size:13.5px}
.hf186-info-grid{gap:7px}.hf186-info-line{padding:8px}
.hf186-info-line>span:first-child{font-size:11px;margin-bottom:4px}
.hf186-info-line>b{font-size:12.5px;line-height:1.45}
.hf186-muted{font-size:12.2px}.hf186-note{font-size:11.3px;line-height:1.5;padding:8px 9px}
.hf186-project-ref-list button{padding:8px 9px}.hf186-project-ref-list button b{font-size:11.5px}.hf186-project-ref-list button span{font-size:12px}

/* At narrower notebook widths, keep all filter/sort/page-size controls on the same row.
   The search box is the only flexible-width item. */
@media(max-width:1260px){
  body #page-projects.hf186-page>.card>.cardhead .search,
  body #page-people.hf186-page>.card>.cardhead .search{width:270px!important;flex-basis:270px!important;min-width:190px!important}
  body #page-projects .hf186-master-detail,
  body #page-people .hf186-master-detail{grid-template-columns:minmax(0,1fr) minmax(0,.96fr)}
  .hf186-project-row{grid-template-columns:74px minmax(140px,1fr) 56px minmax(90px,.55fr) minmax(110px,.68fr)}
}
@media(max-width:1040px){
  body #page-projects.hf186-page>.card>.cardhead,
  body #page-people.hf186-page>.card>.cardhead{align-items:flex-start!important;flex-wrap:wrap!important}
  body #page-projects.hf186-page>.card>.cardhead .toolbar,
  body #page-people.hf186-page>.card>.cardhead .toolbar{width:100%!important;overflow-x:auto!important;justify-content:flex-start!important;padding-bottom:2px}
  body #page-projects.hf186-page>.card>.cardhead .search,
  body #page-people.hf186-page>.card>.cardhead .search{flex:1 1 260px!important;width:auto!important;min-width:210px!important}
  body #page-projects .hf186-master-detail,
  body #page-people .hf186-master-detail{height:calc(100vh - 250px)}
}
