/* Incremental UI for the 2026-09-03 review plan. */
.task-config-scope-editor{display:grid;grid-template-columns:minmax(150px,.8fr) minmax(220px,1.2fr);gap:8px}
.task-config-scope-editor .fsel,.task-config-scope-editor input{width:100%;height:34px;box-sizing:border-box}
.task-config-scope-editor input{padding:0 10px;border:1px solid var(--border);border-radius:6px;background:#fff;color:var(--text);font:inherit;outline:none}
.task-config-scope-editor input:focus{border-color:var(--accent);box-shadow:0 0 0 2px rgba(51,112,255,.12)}
.task-config-scope-editor input[hidden]{display:none}

.shared-dept-tree-native{display:none!important}
.shared-dept-tree-select{position:relative;min-width:150px}
.shared-dept-tree-trigger{width:100%;display:flex;align-items:center;justify-content:space-between;gap:10px;text-align:left}
.shared-dept-tree-trigger svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2}
.shared-dept-tree-menu{position:absolute;z-index:180;top:calc(100% + 6px);left:0;min-width:220px;max-height:300px;padding:6px;border:1px solid var(--border);border-radius:8px;background:#fff;box-shadow:0 8px 24px rgba(31,35,41,.14);overflow:auto}
.shared-dept-tree-menu[hidden]{display:none}
.shared-dept-tree-menu button{width:100%;height:34px;display:flex;align-items:center;gap:7px;padding:0 9px;border:0;border-radius:6px;background:transparent;color:var(--text);font:inherit;font-size:13px;text-align:left;cursor:pointer}
.shared-dept-tree-menu button:hover{background:#F5F7FA}.shared-dept-tree-menu button.selected{background:#E8F3FF;color:var(--accent)}
.shared-dept-tree-menu button[data-level="1"]{padding-left:28px}.shared-dept-tree-branch{color:var(--text-3)}.shared-dept-tree-caret{color:var(--text-2)}
.shared-dept-tree-parent{display:grid;grid-template-columns:24px minmax(0,1fr);align-items:center}.shared-dept-tree-parent button{height:34px}.shared-dept-tree-expand{padding:0!important;justify-content:center!important;color:var(--text-3)!important}.shared-dept-tree-choice{padding-left:3px!important}

.budget-import-modal{width:560px}
.budget-template-row{display:flex;align-items:center;gap:12px;margin-bottom:14px;color:var(--text-3);font-size:12px}
.budget-file-drop{min-height:124px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;border:1px dashed #AAB8D0;border-radius:8px;background:#F8FAFD;color:var(--text);cursor:pointer}
.budget-file-drop:hover{border-color:var(--accent);background:#F2F6FF}.budget-file-drop input{position:absolute;width:1px;height:1px;opacity:0}.budget-file-drop b{color:var(--accent);font-size:14px}.budget-file-drop span{color:var(--text-3);font-size:12px}
.budget-import-result{min-height:42px;margin-top:14px;padding:10px 12px;border:1px solid var(--border);border-radius:7px;background:#F8F9FB;color:var(--text-2);font-size:12px;box-sizing:border-box}
.budget-import-result.success{display:flex;flex-direction:column;gap:3px;border-color:#B7E3B0;background:#F2FFF0;color:#237804}.budget-import-result.error{border-color:#F3B7B1;background:#FFF3F2;color:#C0362C}.budget-import-result.loading{color:var(--accent)}

@media(max-width:760px){
  .task-config-scope-editor{grid-template-columns:1fr}
  .shared-dept-tree-select{width:100%}
}

/* Dashboard filter popovers stay anchored under their triggers. */
html body[data-current-page="dashboard"] #page-dashboard.dashboard-flow.show #sum-global-filter-card > .card-body.dashboard-unified-filter > div.shared-dept-tree-select{
  position:relative!important;
  display:block!important;
  flex:0 0 200px!important;
  width:200px!important;
  min-width:200px!important;
  align-self:center!important;
}
html body[data-current-page="dashboard"] #page-dashboard.dashboard-flow.show #sum-global-filter-card > .card-body.dashboard-unified-filter > div.shared-dept-tree-select > .shared-dept-tree-trigger{
  width:100%!important;
  min-width:0!important;
  height:34px!important;
  box-sizing:border-box!important;
}
html body[data-current-page="dashboard"] #page-dashboard.dashboard-flow.show #sum-global-filter-card > .card-body.dashboard-unified-filter > div.shared-dept-tree-select > .shared-dept-tree-menu{
  top:calc(100% + 6px)!important;
  right:auto!important;
  bottom:auto!important;
  left:0!important;
  width:100%!important;
  min-width:100%!important;
  box-sizing:border-box!important;
}
html body[data-current-page="dashboard"] #page-dashboard.dashboard-flow.show #sum-global-filter-card > .card-body.dashboard-unified-filter > div.shared-project-filter-select .shared-project-filter-menu button{
  padding-left:9px!important;
}

/* Permission table begins 16px below the white card background. */
html body[data-current-page="deptpermissions"] #page-deptpermissions.show > .tbl-wrap > .tbl-scroll{
  padding-top:16px!important;
  box-sizing:border-box!important;
}
