/* 4.3.12 unified viewport shell and confirmed supervisor feedback. */
html,body{width:100%;height:100%;overflow:hidden!important}
body{min-height:0!important}
#app{width:100%;height:100dvh;min-height:0;overflow:hidden}
.sidebar{height:100dvh;max-height:100dvh;overflow:hidden}
.main-content{height:100dvh!important;min-height:0!important;overflow:hidden!important;box-sizing:border-box;display:block}
.main-content>div{height:100%;min-height:0;max-width:100%;overflow:auto;box-sizing:border-box;scrollbar-width:none}
.main-content>div::-webkit-scrollbar{width:0;height:0}

/* 見積・排程は操作部を固定し、表だけが残り高さを使用する。 */
.schedule-workbench-v41{height:100%;min-height:0;overflow:hidden;box-sizing:border-box}
.schedule-workbench-v41>.page-heading{flex:0 0 auto}
.schedule-sheet-card{flex:1 1 auto;min-height:0!important;margin-bottom:0!important;display:flex;flex-direction:column;overflow:hidden}
.schedule-sheet-toolbar,.schedule-control-row{flex:0 0 auto}
.schedule-sheet-scroll{flex:1 1 auto!important;height:auto!important;min-height:0!important;max-height:none!important;overflow-y:auto!important;overflow-x:hidden!important;scrollbar-gutter:stable}
.schedule-sheet{table-layout:fixed!important;width:100%!important;min-width:0!important}
.schedule-sheet th:nth-child(1){width:4.5%}.schedule-sheet th:nth-child(2){width:7.2%}.schedule-sheet th:nth-child(3){width:11%}.schedule-sheet th:nth-child(4){width:5%}.schedule-sheet th:nth-child(5){width:5%}.schedule-sheet th:nth-child(6){width:10%}.schedule-sheet th:nth-child(7){width:4%}.schedule-sheet th:nth-child(8){width:4.5%}
.schedule-sheet th:nth-child(n+9):nth-child(-n+13){width:6.3%}
.schedule-sheet th:nth-child(14),.schedule-sheet th:nth-child(15){width:6%}.schedule-sheet th:nth-child(16){width:6.3%}
.schedule-sheet .schedule-hours-input::-webkit-inner-spin-button,.schedule-sheet .schedule-hours-input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
.schedule-sheet .schedule-hours-input{appearance:textfield;-moz-appearance:textfield}
.site-col,.site-cell{text-align:center}.site-choice{display:flex;justify-content:center;gap:2px}.site-option{min-width:25px;height:21px;padding:0 3px;border:1px solid #b8c4cf;border-radius:5px;background:#fff;color:#7a8996;font-size:11px;font-weight:800;line-height:19px;cursor:pointer}.site-option.sh.active{border-color:#315889;background:#dceafb;color:#234d80}.site-option.jx.active{border-color:#b47a16;background:#ffe7a8;color:#7a4d00}.site-option:disabled{cursor:default;opacity:.58}.site-option.active:disabled{opacity:1}
.schedule-day-col{position:sticky!important}.date-window-head{display:flex;align-items:center;justify-content:center;gap:3px;min-width:0}.date-window-label{display:flex;min-width:0;flex-direction:column;align-items:center;line-height:1.05}.date-window-label b,.date-window-label small{white-space:nowrap}.date-window-arrow{position:static;flex:0 0 18px;width:18px;height:22px;padding:0;border:1px solid #9dafc0;border-radius:4px;background:#fff;color:#315889;font-size:18px;line-height:18px;cursor:pointer}
.staff-site-group{margin-top:10px}.staff-site-group h4{margin:0 0 5px;padding-bottom:3px;border-bottom:1px solid #dbe3eb;color:#315889;font-size:12px}
.staff-site-group>b{display:block;margin:0 0 5px;padding-bottom:3px;border-bottom:1px solid #dbe3eb;color:#315889;font-size:12px}
/* ES roster: row-major, 12 columns on supervisor desktop, equal button widths. */
.modal.staff-modal,.modal.personnel-modal{max-width:1040px;width:calc(100vw - 40px);box-sizing:border-box}
.staff-site-group .staff-chip-grid{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:5px;margin-bottom:10px}
.staff-site-group .staff-chip-grid button{box-sizing:border-box;width:100%;min-width:0;min-height:28px;padding:4px 2px;border:1px solid #bccbdc;border-radius:4px;background:#fff;color:#315889;font-family:inherit;font-size:11px;white-space:nowrap;cursor:pointer}
.staff-site-group .staff-chip-grid button:focus-visible{outline:2px solid #315889;outline-offset:1px}
.progress-page-v41 .progress-staff-children{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:5px}
.progress-page-v41 .progress-staff-children>.progress-filter-label{grid-column:1 / -1}
.progress-page-v41 .progress-staff-children>.progress-filter-btn{width:100%;min-width:0;padding:5px 2px;white-space:nowrap}
@media(max-width:1100px){.staff-site-group .staff-chip-grid,.progress-page-v41 .progress-staff-children{grid-template-columns:repeat(8,minmax(0,1fr))}}
@media(max-width:700px){.staff-site-group .staff-chip-grid,.progress-page-v41 .progress-staff-children{grid-template-columns:repeat(4,minmax(0,1fr))}}
.personnel-name{display:inline-block;border:0;background:transparent;padding:0;color:inherit;font:inherit}
.personnel-actions{display:flex;gap:.35rem;align-items:center;white-space:nowrap}
.progress-staff-children{padding-left:1.25rem;border-left:3px solid #dbe7f4}
.pending-business-filters{display:flex;gap:5px;align-items:center}.pending-business-filters .filter-chip{padding:4px 10px}
.progress-site-chip{display:inline-flex;min-width:28px;justify-content:center;padding:2px 5px;border:1px solid #c8d2dc;border-radius:10px;color:#718092;font-weight:800}.progress-site-chip.sh{border-color:#8fb3dc;background:#e7f1fc;color:#315f91}.progress-site-chip.jx{border-color:#d1a34c;background:#fff0c4;color:#875700}
.workload-time-reference{display:grid;grid-template-columns:repeat(2,minmax(120px,1fr));gap:10px;margin:10px 0 14px}.workload-time-reference>div{padding:10px 14px;border:1px solid #b9cbe0;border-radius:7px;background:#eef5fd}.workload-time-reference small{display:block;color:#62768c}.workload-time-reference b{display:block;margin-top:2px;color:#214e82;font-size:20px;font-variant-numeric:tabular-nums}.workload-group-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;max-height:min(62vh,620px);overflow-y:auto;padding-right:4px}.workload-group{padding:10px;border:1px solid #d6e0ea;border-radius:8px;background:#fbfcfe}.workload-group h4{margin:0 0 9px;color:#214e82;font-size:14px}.workload-group .fw-workload-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}

/* 人員分配・進捗・Preview も視口残高を一覧内部へ渡す。 */
.personnel-v41,.progress-page-v41,.delivery-preview-page{height:100%;min-height:0;overflow:hidden;box-sizing:border-box;display:flex;flex-direction:column}
.personnel-v41>.page-heading,.personnel-v41>.personnel-filter,.progress-page-v41>.page-heading,.delivery-preview-page>.page-heading{flex:0 0 auto}
.personnel-list-section,.delivery-preview-card{flex:1 1 auto;min-height:0!important;margin-bottom:0!important;display:flex;flex-direction:column;overflow:hidden}
.personnel-table-scroll,.delivery-preview-scroll{flex:1 1 auto!important;height:auto!important;min-height:0!important;max-height:none!important;overflow-y:auto!important;overflow-x:hidden!important}
.progress-page-v41>.progress-title,.progress-page-v41>.progress-subtitle,.progress-page-v41>.workflow-alert,.progress-page-v41>.progress-filter-card{flex:0 0 auto}.progress-board-shell{flex:1 1 auto;min-height:0;margin-bottom:0!important;display:flex;flex-direction:column}.progress-board-scroll{flex:1 1 auto;min-height:0;max-height:none!important;overflow-y:auto!important}

/* Modal/API errors must remain visible instead of looking like a dead button. */
.form-error{margin:8px 0;padding:7px 9px;border:1px solid #d88b83;border-radius:5px;background:#fff1ef;color:#9b3027;font-weight:700}
.received-at-correction{width:82px;min-width:0;padding:3px;border:1px solid transparent;background:transparent;text-align:center}.received-at-correction:focus{border-color:#315889;background:#fff;outline:0}

@media(max-height:700px){.main-content{padding-top:5px!important;padding-bottom:5px!important}.page-heading.compact-heading{min-height:26px;margin-bottom:4px!important}.schedule-control-row{gap:4px}.schedule-sheet th,.schedule-sheet td{height:30px!important}}
@media(max-width:1200px){.workload-group-list{grid-template-columns:1fr}.workload-group .fw-workload-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* 4.3.21: 作業内容別の入力項目は維持し、既存画面と同じコンパクト密度へ揃える。 */
.workload-entry-modal{width:min(860px,calc(100vw - 32px));max-width:860px!important;padding:0 14px 10px!important}
.workload-entry-modal.single-group{width:min(620px,calc(100vw - 32px));max-width:620px!important}
.workload-entry-modal .modal-header{margin:0 -14px 7px;padding:8px 14px 6px;border-bottom:1px solid #e1e7ee}
.workload-entry-modal .modal-title{font-size:13px;line-height:1.35}
.workload-entry-modal .modal-close{font-size:16px;padding:2px 5px}
.workload-entry-modal .fw-note{margin:7px 0;padding:7px 9px;font-size:10px;line-height:1.45}
.workload-entry-modal .workload-time-reference{gap:7px;margin:7px 0 8px}
.workload-entry-modal .workload-time-reference>div{padding:6px 9px;border-radius:5px}
.workload-entry-modal .workload-time-reference small{font-size:9px}
.workload-entry-modal .workload-time-reference b{margin-top:0;font-size:14px;line-height:1.25}
.workload-entry-modal .workload-group-list{gap:8px;max-height:min(58vh,500px);padding-right:2px}
.workload-entry-modal.single-group .workload-group-list{grid-template-columns:1fr}
.workload-entry-modal .workload-group{padding:7px 9px;border-radius:6px}
.workload-entry-modal .workload-group h4{margin:0 0 6px;padding-left:1px;font-size:12px;line-height:1.3}
.workload-entry-modal .workload-group .fw-workload-grid{gap:5px 7px}
.workload-entry-modal .fw-workload-grid label{font-size:10px;line-height:1.25}
.workload-entry-modal .fw-workload-grid input,.workload-entry-modal .fw-workload-grid select{height:29px;margin-top:2px;padding:3px 6px;border-radius:4px;font-size:11px}
.workload-entry-modal .edit-actions{margin-top:5px;padding:5px 0 0;gap:5px}
.workload-entry-modal .edit-actions .btn{min-height:27px;padding:4px 9px;font-size:10px}
@media(max-width:700px){.workload-entry-modal .workload-group .fw-workload-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
