/* R78-HF186: high-density Master-Detail maintenance UI.
   Scoped to project/person maintenance pages only. Loaded last. */
body #page-projects.hf186-page>.card,
body #page-people.hf186-page>.card{min-height:0!important;overflow:hidden!important}
body #page-projects [data-hf186-legacy="1"],
body #page-people [data-hf186-legacy="1"]{display:none!important}
body #page-projects .cardhead .toolbar,
body #page-people .cardhead .toolbar{flex-wrap:wrap;gap:8px}
body #page-projects .cardhead .toolbar>select,
body #page-people .cardhead .toolbar>select{height:42px;min-width:112px}
body #page-projects .cardhead .search,
body #page-people .cardhead .search{min-width:260px;flex:1 1 320px;max-width:430px}

.hf186-master-detail{
 height:calc(100vh - 230px);min-height:500px;max-height:820px;display:grid;grid-template-columns:minmax(0,1.12fr) minmax(0,.88fr);
 border-top:1px solid #e5edf6;background:#fff;overflow:hidden
}
.hf186-list-pane,.hf186-detail-pane{min-width:0;min-height:0}
.hf186-list-pane{display:flex;flex-direction:column;border-right:1px solid #dfe8f2;background:#fbfdff}
.hf186-detail-pane{display:flex;flex-direction:column;background:#fff;overflow:hidden}
.hf186-list-header{flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:9px 12px;border-bottom:1px solid #e4ebf3;background:#f8fbff;color:#30445b;font-size:12px}
.hf186-list-header>div{display:flex;align-items:center;gap:8px;min-width:0}.hf186-list-header b{font-size:13px}.hf186-list-header span{color:#718096;font-size:10.5px;white-space:nowrap}
.hf186-record-list{flex:1 1 auto;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;background:#fff}
.hf186-record-row{
 width:100%;min-height:54px;border:0;border-bottom:1px solid #edf2f7;background:#fff;color:#26384d;text-align:left;
 display:grid;align-items:center;gap:8px;padding:7px 10px;cursor:pointer;font:inherit;transition:background .12s,border-color .12s,box-shadow .12s
}
.hf186-record-row:hover{background:#f7fbff}.hf186-record-row.is-selected{background:#ecf8ff;box-shadow:inset 3px 0 0 #13a8a0}
.hf186-record-row>*{min-width:0}.hf186-record-row b{font-size:11.5px;line-height:1.25}.hf186-record-row small,.hf186-record-row em{display:block;color:#718096;font-size:9.8px;line-height:1.3;font-style:normal;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hf186-project-row{grid-template-columns:72px minmax(150px,1fr) 54px minmax(88px,.55fr) minmax(112px,.7fr)}
.hf186-people-row{grid-template-columns:minmax(145px,1fr) minmax(80px,.45fr) minmax(105px,.75fr) 44px 52px}
.hf186-code{font-size:10.5px;font-weight:900;color:#087e9b;white-space:nowrap}.hf186-main b{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.hf186-main em{margin-top:2px}
.hf186-owner b,.hf186-updated b{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.hf186-updated b{font-size:9.8px;font-variant-numeric:tabular-nums}
.hf186-dept{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:10.5px}.hf186-groups{overflow:hidden;max-height:38px}.hf186-count{text-align:center}.hf186-count b{display:block;font-size:13px}.hf186-count small{display:block}
.hf186-stage{display:inline-flex;align-items:center;justify-content:center;padding:3px 6px;border-radius:999px;background:#f0ecff;color:#6d4bc3;font-size:9.5px;font-weight:900;white-space:nowrap}
.hf186-active,.hf186-inactive{display:inline-flex;padding:3px 7px;border-radius:999px;font-size:9.5px;font-weight:900;white-space:nowrap}.hf186-active{background:#e7f9f1;color:#11835f}.hf186-inactive{background:#f3f4f6;color:#6b7280}
.hf186-pill{display:inline-flex;align-items:center;max-width:100%;margin:1px 2px 1px 0;padding:2px 6px;border-radius:999px;background:#eef2ff;color:#4f46c8;font-size:9.3px;font-weight:800;line-height:1.25;white-space:normal;overflow-wrap:anywhere}.hf186-pill.hf186-group{background:#f1f5f9;color:#475569}.hf186-pill.hf186-supplier{background:#dff5ff;color:#08708c}.hf186-pill.hf186-case{background:#eff6ff;color:#3265a8}.hf186-pill.hf186-fn{background:#f5f3ff;color:#6d45bc}
.hf186-pager{flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 10px;border-top:1px solid #e4ebf3;background:#f8fafc;font-size:10.5px;color:#64748b}.hf186-pager-actions{display:flex;gap:4px}.hf186-mini-btn{width:29px;height:27px;border:1px solid #d7e2ed;border-radius:7px;background:#fff;color:#334155;cursor:pointer;font-weight:900}.hf186-mini-btn:disabled{opacity:.35;cursor:default}
.hf186-empty-list,.hf186-empty-detail{height:100%;min-height:180px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;padding:24px;text-align:center;color:#8290a0}.hf186-empty-list b,.hf186-empty-detail b{color:#526174}.hf186-empty-list span,.hf186-empty-detail span{font-size:11px}

.hf186-detail-sticky{flex:0 0 auto;border-bottom:1px solid #e2e8f0;background:#fbfdff;padding:10px 12px;z-index:3}.hf186-detail-title{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}.hf186-detail-title>div{min-width:0}.hf186-detail-title h3{margin:4px 0 2px;font-size:15px;line-height:1.3;color:#203449;white-space:normal;overflow-wrap:anywhere}.hf186-detail-title small{display:block;color:#718096;font-size:10px;line-height:1.35}.hf186-code-chip{display:inline-flex;padding:3px 7px;border-radius:999px;background:#e1f5ff;color:#087a9c;font-size:9.8px;font-weight:900;white-space:nowrap}
.hf186-save-state{flex:0 0 auto;padding:4px 8px;border-radius:999px;background:#f1f5f9;color:#64748b;font-size:9.7px;font-weight:800;white-space:nowrap}.hf186-save-state[data-state="saving"]{background:#fff7db;color:#9a6a00}.hf186-save-state[data-state="ok"]{background:#e8f8f0;color:#16845f}.hf186-save-state[data-state="error"]{background:#feecec;color:#b42318;white-space:normal;max-width:210px}
.hf186-detail-actions{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px}.hf186-detail-actions .btn{min-height:30px;padding:5px 9px;font-size:10.5px}
.hf186-detail-scroll{flex:1 1 auto;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding:10px 12px 18px;background:#fff}
.hf186-section{border:1px solid #e4ebf3;border-radius:10px;background:#fff;margin:0 0 9px;overflow:hidden}.hf186-section>h4{margin:0;padding:7px 9px;border-bottom:1px solid #edf2f7;background:#f8fafc;color:#35485e;font-size:11.5px}.hf186-section>h4 small{margin-left:6px;color:#8a98a8;font-size:9.5px;font-weight:600}.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:9px}
.hf186-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.hf186-field{min-width:0}.hf186-field.hf186-span-2{grid-column:1/-1}.hf186-field>label{display:block;margin:0 0 4px;color:#64748b;font-size:9.7px;font-weight:900}.hf186-field>small{display:block;margin-top:3px;color:#8795a6;font-size:9px;line-height:1.35}.hf186-field input,.hf186-field select,.hf186-field textarea{width:100%;min-width:0;box-sizing:border-box;border:1px solid #d9e3ee;border-radius:7px;background:#fff;color:#23374d;font:inherit;font-size:11px;padding:7px 8px;outline:none}.hf186-field input,.hf186-field select{height:34px}.hf186-field textarea{resize:vertical;min-height:68px;line-height:1.45}.hf186-field input:focus,.hf186-field select:focus,.hf186-field textarea:focus{border-color:#58bfc3;box-shadow:0 0 0 2px rgba(20,170,165,.1)}.hf186-field select:disabled{background:#f3f4f6;color:#64748b}
.hf186-check-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;max-height:150px;overflow:auto;padding:2px}.hf186-check{display:flex;align-items:flex-start;gap:5px;min-width:0;padding:5px 6px;border:1px solid #e6edf4;border-radius:7px;background:#fbfdff;color:#40546a;font-size:10px;cursor:pointer}.hf186-check:hover{background:#f3f9ff}.hf186-check input{width:auto!important;height:auto!important;margin:2px 0 0;flex:0 0 auto}.hf186-check span{min-width:0;overflow-wrap:anywhere}.hf186-check span>b{font-size:10px}.hf186-check span>small{display:block;color:#8996a6;font-size:8.5px}.hf186-check.is-locked{opacity:.55;cursor:not-allowed}.hf186-group-grid{max-height:190px}
.hf186-support-editor{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}.hf186-support-custom{grid-column:1/-1;width:100%;box-sizing:border-box;height:34px;border:1px solid #d9e3ee;border-radius:7px;padding:7px 8px;font-size:11px}
.hf186-current-tags{padding-bottom:3px;border-bottom:1px dashed #e5eaf0}
.hf186-info-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.hf186-info-line{min-width:0;border:1px solid #edf2f7;border-radius:8px;padding:7px;background:#fbfdff}.hf186-info-line>span:first-child{display:block;color:#7a8898;font-size:9px;font-weight:800;margin-bottom:3px}.hf186-info-line>b{display:block;color:#31465d;font-size:10.3px;line-height:1.4;font-weight:700;overflow-wrap:anywhere}.hf186-info-line b>span{font-weight:700}.hf186-muted{color:#8b98a7;font-size:10.5px}.hf186-note{margin:8px 9px 9px;padding:7px 8px;border-radius:7px;background:#fff9e8;color:#7a6330;font-size:9.5px;line-height:1.45}.hf186-yes{color:#138460}.hf186-no{color:#64748b}
.hf186-project-ref-list{display:grid;gap:4px}.hf186-project-ref-list button{width:100%;border:1px solid #e5ebf2;border-radius:7px;background:#fbfdff;padding:6px 8px;text-align:left;cursor:pointer;color:#33485e}.hf186-project-ref-list button:hover{background:#eef8ff}.hf186-project-ref-list button b{display:inline-block;min-width:70px;font-size:9.8px;color:#087d9b}.hf186-project-ref-list button span{font-size:10px}

/* HF185 was intentionally replaced by HF186, so old card/grid presentation must never leak through. */
body #page-projects .hf185-project-list,body #page-projects .hf185-project-card{display:none!important}

@media(max-width:1260px){
 .hf186-master-detail{grid-template-columns:minmax(0,1fr) minmax(0,.92fr)}
 .hf186-project-row{grid-template-columns:68px minmax(135px,1fr) 50px minmax(82px,.55fr) minmax(95px,.65fr)}
 .hf186-record-row{gap:6px;padding-left:8px;padding-right:8px}
 .hf186-form-grid,.hf186-info-grid{grid-template-columns:1fr}
 .hf186-field.hf186-span-2{grid-column:1}
}
@media(max-width:980px){
 .hf186-master-detail{grid-template-columns:minmax(0,.96fr) minmax(0,1.04fr)}
 .hf186-project-row{grid-template-columns:66px minmax(120px,1fr) 50px 88px}.hf186-project-row>.hf186-updated{display:none}
 .hf186-people-row{grid-template-columns:minmax(125px,1fr) minmax(72px,.45fr) minmax(90px,.7fr) 48px}.hf186-people-row>.hf186-count{display:none}
 .hf186-list-header span{display:none}
 .hf186-check-grid,.hf186-support-editor{grid-template-columns:1fr}
}
@media(max-width:760px){
 .hf186-master-detail{display:flex;flex-direction:column;overflow:auto}.hf186-list-pane{flex:0 0 42vh;border-right:0;border-bottom:1px solid #dfe8f2}.hf186-detail-pane{flex:1 1 58vh;min-height:420px}
 .hf186-project-row{grid-template-columns:62px minmax(120px,1fr) 48px}.hf186-project-row>.hf186-owner,.hf186-project-row>.hf186-updated{display:none}
 .hf186-people-row{grid-template-columns:minmax(130px,1fr) minmax(76px,.5fr) 50px}.hf186-people-row>.hf186-groups,.hf186-people-row>.hf186-count{display:none}
}
