/* HF151: daily entry and maintenance each have a single bounded scrolling area. */
body #appView .content:has(>#page-daily.active),body #appView .content:has(>#page-projects.active){padding-bottom:8px!important}
body #page-daily.active,body #page-projects.active{display:flex!important;flex-direction:column!important;height:var(--hf140-workspace-height,calc(100dvh - 120px))!important;min-height:0!important;min-width:0!important;overflow:hidden!important;box-sizing:border-box}
body #page-daily>.hero,body #page-projects>.hero{flex:0 0 auto!important}
body #page-daily>.daily-entry-card,body #page-projects>.card{display:flex!important;flex-direction:column!important;flex:1 1 auto!important;min-height:0!important;min-width:0!important;overflow:hidden!important;box-sizing:border-box;margin-bottom:0!important}
body #page-daily .daily-entry-body{display:flex!important;flex-direction:column!important;flex:1 1 0!important;min-height:0!important;overflow:hidden!important;padding:8px 12px!important}
body #page-daily .daily-entry-card>.cardhead{flex:0 0 auto;padding:8px 12px!important;min-height:0!important}
body #page-daily .entry-top{grid-template-columns:minmax(180px,1.1fr) minmax(160px,.75fr) minmax(220px,1.15fr)!important;gap:10px!important;margin:0!important;flex:none!important}
body #page-daily .entry-top input,body #page-daily .entry-top select{min-height:34px!important;padding:6px 9px!important;font-size:13px!important;box-sizing:border-box}
body #page-daily .daily-entry-scroll{flex:1 1 0!important;min-height:0!important;height:auto!important;max-height:none!important;margin:8px 0 0!important;padding:0!important;overflow:auto!important;box-sizing:border-box;scrollbar-gutter:stable;overscroll-behavior:contain}
body #page-daily .entry-table{width:100%!important;min-width:960px!important;max-width:none!important;table-layout:fixed!important}
body #page-daily .entry-table th,body #page-daily .entry-table td{width:auto!important;min-width:0!important;max-width:none!important;box-sizing:border-box;padding:7px!important;vertical-align:top!important;white-space:normal!important;overflow-wrap:anywhere}
body #page-daily .entry-table th{position:sticky!important;top:0!important;z-index:6!important;font-size:12px!important;background:#f8fafc!important}
body #page-daily .case-search-combo,body #page-daily .entry-table input,body #page-daily .entry-table select,body #page-daily .entry-table textarea{width:100%!important;min-width:0!important;max-width:100%!important;min-height:34px!important;padding:6px 8px!important;font-size:13px!important;box-sizing:border-box!important}
body #page-daily .entry-table textarea.eDesc{height:38px!important;min-height:38px!important;resize:vertical;line-height:20px!important}
body #page-daily .eProjectSelected{white-space:normal!important;overflow-wrap:anywhere;line-height:1.4!important;font-size:11px!important}
body #page-daily .hoursbox{width:100%!important;text-align:center}
body #page-daily .daily-entry-actions{flex:0 0 auto!important;margin-top:8px!important;gap:8px!important}
body #page-projects>.card>.tablewrap{flex:1 1 0!important;min-height:0!important;height:auto!important;max-height:none!important;overflow:auto!important}
body #page-projects #hf150ProjectScrollTools{flex:0 0 auto!important;margin:0!important;border-top:1px solid #cbd5e1;border-bottom:0;padding:4px 10px!important;min-height:32px;box-sizing:border-box}
/* All Gantt controls share the same row as its workspace heading and edit button. */
body #page-tasks .hf151-gantt-toolbar{display:flex!important;align-items:center!important;flex-direction:row!important;flex-wrap:nowrap!important;justify-content:flex-start!important;gap:8px!important;width:100%!important;min-width:0!important;max-width:100%!important;overflow-x:auto!important;overflow-y:hidden!important;padding:6px 8px!important;box-sizing:border-box}
body #page-tasks .hf151-gantt-toolbar>div{flex:0 0 auto!important;width:auto!important;min-width:0!important;margin:0!important}
body #page-tasks .hf151-gantt-toolbar .cardtitle{font-size:13px!important;white-space:nowrap!important}
body #page-tasks .hf151-gantt-toolbar .cardsub{display:none!important}
body #page-tasks .hf151-gantt-toolbar .hf144-editor-toolbar{display:contents!important;border:0!important;padding:0!important}
body #page-tasks .hf151-gantt-toolbar .hf144-editor-toolbar>button:last-child{display:none!important}
body #page-tasks .hf151-gantt-toolbar .project-io-toolbar,body #page-tasks .hf151-gantt-toolbar .project-gantt-controls,body #page-tasks .hf151-gantt-toolbar .project-shared-view-controls{display:flex!important;flex-wrap:nowrap!important;flex-direction:row!important;align-items:center!important;gap:6px!important;flex:0 0 auto!important;max-width:none!important;padding:0!important}
body #page-tasks .hf151-gantt-toolbar label,body #page-tasks .hf151-gantt-toolbar .btn{white-space:nowrap!important;font-size:11px!important;flex:0 0 auto!important}
body #page-tasks .hf151-gantt-toolbar .btn,body #page-tasks .hf151-gantt-toolbar select{height:30px!important;min-height:30px!important;padding:4px 6px!important;font-size:11px!important}
body #page-tasks .hf151-gantt-toolbar select{width:auto!important;max-width:165px!important}
body #page-tasks #projectSplitView.hf143-preview .gantt-pane-head{display:none!important}
body #page-tasks .hf151-gantt-toolbar .gantt-status-color-panel[popover]{position:fixed!important;right:auto!important;bottom:auto!important;margin:0!important;zoom:1!important;width:205px!important}
body #page-tasks .hf151-gantt-toolbar .gantt-status-color-panel[popover]:not(:popover-open){display:none!important}
body #page-tasks .hf151-gantt-toolbar .gantt-status-color-panel[popover] label{display:grid!important;grid-template-columns:1fr 44px!important}
/* Organization preview has two real tool rows, including the original live controls. */
body #page-orgchart #r78PreviewBar.hf151-org-tools{display:flex!important;flex-direction:column!important;flex-wrap:nowrap!important;align-items:stretch!important;width:100%!important;max-width:100%!important;min-height:0!important;max-height:none!important;overflow:visible!important;gap:5px!important;padding:0!important;margin:0!important}
body #page-orgchart #r78PreviewBar.hf151-org-tools>.r78-preview-row{display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;align-items:center!important;justify-content:flex-start!important;gap:5px!important;min-width:0!important;max-width:100%!important;overflow-x:auto!important;overflow-y:hidden!important;padding:4px 0!important;box-sizing:border-box}
body #page-orgchart #r78PreviewBar.hf151-org-tools .r79-context-row{display:contents!important}
body #page-orgchart #r78PreviewBar.hf151-org-tools .hf144-editor-toolbar{display:contents!important;padding:0!important;border:0!important}
body #page-orgchart #r78PreviewBar.hf151-org-tools .hf144-editor-toolbar>button:nth-child(2){display:none!important}
body #page-orgchart #r78PreviewBar.hf151-org-tools .btn{font-size:11px!important;min-height:30px!important;padding:5px 7px!important;white-space:nowrap!important}
body #page-orgchart #r78PreviewBar.hf151-org-tools .r79-toolbar-primary>b{font-size:13px;white-space:nowrap;flex:0 0 auto;margin-right:4px}
body #page-orgchart .r59-org-actions:has(>#r78PreviewBar.hf151-org-tools){display:block!important;min-width:0!important;margin:0!important}
body #page-orgchart .r59-org-actions:has(>#r78PreviewBar.hf151-org-tools)>small{display:none!important}
body #page-orgchart #r78PreviewBar.hf151-org-tools .field{padding:3px!important;flex-direction:row!important;flex:0 0 auto!important}
body #page-orgchart #r78PreviewBar.hf151-org-tools #r78CopyProject{max-width:190px!important}
/* Full screen editor geometry is set in viewport pixels, independent of sidebar width. */
body dialog.hf145-editor-dialog{max-width:calc(100dvw - 16px)!important;max-height:calc(100dvh - 16px)!important}
.hf151-dialog-drag-handle{cursor:move;touch-action:none;user-select:none}
.hf151-dialog-drag-handle button{cursor:pointer}
.hf151-dialog-drag-handle strong::after{content:'　拖曳標題列移動';font-size:11px;font-weight:400;color:#64748b}
.hf151-dragging{cursor:grabbing}
body #hf145OrgDialog .hf145-dialog-body{padding:8px!important}
body #hf145OrgDialog #r59OrgEditorPanel{display:flex!important;flex-direction:column!important;padding:8px!important;flex:1 1 0!important;min-height:0!important;overflow:hidden!important}
body #hf145OrgDialog #r59OrgEditor{width:100%!important;min-width:0!important;max-height:none!important;flex:1 1 0!important;min-height:0!important;overflow:auto!important}
body #hf145OrgDialog .r59-org-group-head input,body #hf145OrgDialog .r59-org-group-head select,body #hf145OrgDialog .r59-member-table input,body #hf145OrgDialog .r59-member-table select{font-size:13px!important;min-height:34px!important;padding:6px 8px!important}
@media(max-width:760px){body #page-daily .entry-top{grid-template-columns:1fr 1fr!important}body #page-daily .entry-top>.field:last-child{grid-column:1/-1}}
@media print{body #page-daily.active,body #page-projects.active{height:auto!important;max-height:none!important;overflow:visible!important}.hf151-gantt-toolbar,#r78PreviewBar.hf151-org-tools,.hf145-editor-dialog{display:none!important}}
