/* 100,146–100,149: visually enhanced category picker; native select still submits. */
.dim-cat-control{display:block;position:relative;min-width:0;max-width:100%}
.dim-cat-control>select[data-dim-category-picker="1"]{position:absolute!important;width:1px!important;height:1px!important;opacity:0!important;pointer-events:none!important;overflow:hidden!important;top:50%;left:1px;z-index:-1}
.dim-cat-trigger{display:block;width:100%;min-height:43px;max-width:100%;padding:9px 34px 9px 12px;border:1px solid #d5dfd5;border-radius:12px;background:#fff;color:#2c3c36;font:inherit;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;position:relative;cursor:pointer}
.dim-cat-trigger:after{content:'⌄';position:absolute;right:13px;top:50%;transform:translateY(-54%);font-size:20px;color:#536259}
.dim-cat-trigger:focus-visible{outline:3px solid #7baea0;outline-offset:2px}
.dim-cat-popover{position:fixed;z-index:2147483000;box-sizing:border-box;padding:12px;border:1px solid #d5dfd5;border-radius:15px;box-shadow:0 10px 30px rgba(22,38,30,.22);background:#fff;color:#26392f;display:flex;flex-direction:column;gap:10px;overflow:hidden;font-size:15px}
.dim-cat-top{display:flex;align-items:center;justify-content:space-between;gap:8px}
.dim-cat-close{font-size:25px;line-height:30px;border:0;background:transparent;color:#45554b;cursor:pointer}
.dim-cat-search{width:100%!important;min-width:0!important;box-sizing:border-box!important;padding:10px 12px!important;border:1px solid #b7c6ba!important;border-radius:10px!important;font:inherit!important;background:#fff!important;color:#26392f!important}
.dim-cat-results{overflow-y:auto;min-height:0;overscroll-behavior:contain;flex:1;padding-bottom:3px}
.dim-cat-heading{font-weight:700;font-size:12px;color:#607568;padding:12px 3px 6px}
.dim-cat-recents{display:flex;flex-wrap:wrap;gap:6px}
.dim-cat-chip{background:#eaf3ed;border:1px solid #b4d0bc;border-radius:12px;padding:7px 10px;color:#294a37;text-align:left;cursor:pointer;font:inherit;font-size:13px;max-width:100%}
.dim-cat-group{border:1px solid #e0e6df;border-radius:10px;margin:5px 0;overflow:hidden;background:#fff}
.dim-cat-group>summary{cursor:pointer;font-weight:650;padding:12px;background:#f5f8f5;list-style-position:inside}
.dim-cat-option{display:block;width:100%;border:0;border-top:1px solid #edf0ec;background:#fff;text-align:left;padding:11px 13px;color:#273c30;font:inherit;cursor:pointer;overflow-wrap:anywhere}
.dim-cat-option:hover,.dim-cat-option:focus-visible,.dim-cat-option.is-selected{background:#e9f3eb}
.dim-cat-option.is-selected:after{content:' ✓';color:#24723f;font-weight:700}
.dim-cat-empty{padding:16px 8px;color:#6d776d}
@media(max-width:639px){.dim-cat-popover{font-size:16px}.dim-cat-trigger{min-height:48px}.dim-cat-option{min-height:44px}.dim-cat-results{padding-bottom:8px}}

/* 100,156: inline finance category creation */
.dim-cat-create-top,.dim-cat-group-plus{border:1px solid #a5c7ad;background:#eaf3ed;color:#245e37;border-radius:9px;cursor:pointer;font:inherit;font-weight:650;padding:6px 11px;white-space:nowrap}
.dim-cat-group-row{display:flex;align-items:center;background:#f5f8f5}
.dim-cat-group-row>.dim-cat-group-toggle{flex:1;cursor:pointer;font-weight:650;padding:12px;list-style:none;min-width:0}
.dim-cat-group-row>.dim-cat-group-toggle:before{content:'▸ ';font-size:12px}
.dim-cat-group[open] .dim-cat-group-row>.dim-cat-group-toggle:before{content:'▾ '}
.dim-cat-group-plus{margin-right:9px;min-width:35px;font-size:20px;line-height:22px;padding:4px 7px}
.dim-cat-create{display:flex;flex-direction:column;gap:12px;min-height:0;overflow-y:auto;padding:3px 2px 10px}
.dim-cat-create label{display:flex;flex-direction:column;gap:5px;font-size:13px;font-weight:650;color:#52665b}
.dim-cat-create input,.dim-cat-create select{width:100%;min-width:0;max-width:100%;font:inherit;font-size:15px;padding:10px;border:1px solid #bccfc2;border-radius:9px;background:#fff;color:#203a2e;box-sizing:border-box}
.dim-cat-create-actions{display:flex;flex-wrap:wrap;gap:8px}
.dim-cat-create-save,.dim-cat-create-cancel{padding:10px 13px;border:1px solid #a5c7ad;border-radius:9px;background:#eaf3ed;color:#245e37;font:inherit;cursor:pointer}
.dim-cat-create-save{background:#226543;border-color:#226543;color:#fff}
.dim-cat-create-save:disabled{opacity:.6}
.dim-cat-create-error{color:#a03232;font-size:13px}

.dim-cat-group-toggle{border:0;background:transparent;font:inherit;color:inherit;text-align:left;cursor:pointer}

/* 100,157: a native direct-child summary prevents browsers generating a "Details" label. */
.dim-cat-group>summary.dim-cat-group-row{display:flex;align-items:center;gap:8px;list-style:none;list-style-type:none;padding:0;background:#f5f8f5;cursor:pointer;min-height:46px}
.dim-cat-group>summary.dim-cat-group-row::-webkit-details-marker{display:none}
.dim-cat-group>summary.dim-cat-group-row::marker{content:''}
.dim-cat-group-label{display:block;flex:1;min-width:0;font-weight:650;padding:12px;overflow-wrap:anywhere}
.dim-cat-group-label::before{content:'▸';display:inline-block;margin-right:8px;font-size:12px}
.dim-cat-group[open]>.dim-cat-group-row>.dim-cat-group-label::before{content:'▾'}
.dim-cat-group>summary.dim-cat-group-row .dim-cat-group-plus{flex:none;margin:0 9px 0 0;position:relative;z-index:1}

/* 100,158: tree-based inline category creation; sort follows parent IDs, not insertion order. */
.dim-cat-create-tree{display:flex;flex-direction:column;gap:8px;min-height:0;overflow-y:auto;max-height:52vh;border:1px solid #e0e8e0;border-radius:10px;padding:8px}
.dim-cat-create-root{border:1px solid #a5c7ad;border-radius:8px;background:#eaf3ed;color:#235d38;font:inherit;font-weight:600;padding:10px;text-align:left;cursor:pointer}
.dim-cat-tree-roots,.dim-cat-tree-children{display:flex;flex-direction:column;gap:3px;min-width:0}
.dim-cat-tree-children .dim-cat-tree-children{margin-left:17px;border-left:1px solid #e4eae4;padding-left:6px}
.dim-cat-tree-line{display:flex;gap:7px;align-items:center;padding:4px 5px;min-height:39px;border:1px solid #edf1ed;border-radius:8px;background:#f8faf8}
.dim-cat-tree-expand,.dim-cat-tree-add{flex:none;cursor:pointer;border:1px solid #c6d7c9;border-radius:7px;background:white;color:#245e37;font:inherit;width:31px;height:31px;padding:0}
.dim-cat-tree-spacer{flex:none;width:31px}
.dim-cat-tree-title{flex:1;min-width:0;font-size:14px;overflow-wrap:anywhere}
.dim-cat-tree-add{font-weight:700;font-size:20px;background:#eaf3ed}
.dim-cat-create-fields{display:flex;flex-direction:column;gap:12px}
.dim-cat-create-fields[hidden],.dim-cat-create-tree[hidden],.dim-cat-results[hidden],.dim-cat-search[hidden]{display:none!important}
.dim-cat-create-placement{background:#f2f7f2;padding:10px;border-radius:9px;font-size:14px;font-weight:600;overflow-wrap:anywhere}
@media(max-width:639px){.dim-cat-create-tree{max-height:46vh}.dim-cat-tree-line{min-height:43px}}
