/* The native select keeps its value, form participation and change events. */
select.category-picker-native{position:absolute!important;width:1px!important;height:1px!important;min-width:0!important;padding:0!important;margin:0!important;border:0!important;opacity:0;pointer-events:none}
.category-picker{position:relative;display:grid;grid-template-columns:minmax(0,1fr);align-items:center;min-width:0;width:100%;margin-top:8px;color:#263e32}
.category-picker .category-picker-input{grid-area:1/1;box-sizing:border-box;min-width:0;width:100%;margin:0;padding-right:60px;text-overflow:ellipsis;color:#263e32;background:#fff}
.category-picker-input:focus{outline:2px solid #78aa90;outline-offset:1px;border-color:#5b9776}
.category-picker-input:disabled{color:#68766e;background:#f0f3f1;cursor:default;opacity:1}
.category-picker-input:invalid{border-color:#bb5c4f}
.category-picker>.category-picker-toggle{grid-area:1/1;position:relative;justify-self:end;align-self:stretch;box-sizing:border-box;width:52px;height:auto;min-height:0;max-height:none;margin:0;padding:0;border:0;border-radius:8px;background:transparent;color:#466654;line-height:1;transform:none;z-index:1}
.category-picker>.category-picker-toggle::before{content:"";position:absolute;inset:4px 10px;max-width:32px;max-height:32px;margin:auto;border-radius:6px;background:rgba(22,107,80,.09);opacity:0;pointer-events:none}
.category-picker>.category-picker-toggle:is(:hover,:active,:focus-visible):not(:disabled)::before{opacity:1}
.category-picker>.category-picker-toggle>svg{position:relative}
.category-picker>.category-picker-toggle:is(:hover,:active,:focus){background:transparent;box-shadow:none}
.category-picker>.category-picker-toggle:hover:not(:disabled){color:#1f5039}
.category-picker-toggle{display:flex;align-items:center;justify-content:center}
.category-picker-list{position:absolute;box-sizing:border-box;top:100%;left:0;min-width:0;width:100%;max-width:calc(100vw - 16px);max-height:320px;overflow:auto;overscroll-behavior:contain;margin:0;padding:5px;border:1px solid #aebfb3;border-radius:9px;background:#fff;color:#263e32;box-shadow:0 8px 24px #19372826;z-index:50;text-align:left;white-space:normal;font-size:12px;font-weight:400}
.category-picker-list[popover]{position:fixed;inset:auto;min-width:0;margin:0}
.category-picker-list:not([popover]).category-picker-above{top:auto;bottom:100%}
.category-picker-option{--category-depth:0;position:relative;padding:7px 25px 7px calc(9px + var(--category-depth,0)*14px);border-radius:5px;cursor:pointer;line-height:1.4;overflow-wrap:anywhere}
.category-picker-option.active{background:#e4efe8;color:#173d2a;outline:1px solid #c0d7c8;outline-offset:-1px}
.category-picker-option.selected::after{position:absolute;right:8px;top:8px;content:'✓';color:#166b50;font-weight:700}
.category-picker-option[aria-disabled=true]{color:#87948b;cursor:default}
.category-picker-name{display:block;font-weight:500}
.category-picker-path{display:block;color:#62796b;font-size:10px;line-height:1.5;margin-top:1px}
.category-picker-ancestor .category-picker-name{color:#5f7568;font-weight:400}
.category-picker-group{padding:8px 9px 5px;color:#3c6350;border-top:1px solid #e3ebe5;margin-top:4px;font-size:10px;font-weight:700;letter-spacing:.2px}
.category-picker-group:first-child{border-top:0;margin-top:0}
.category-picker-list mark{color:#1e392b;background:#f7df93;border-radius:2px;padding:0}
.category-picker-empty{padding:15px 9px;color:#586e61;font-size:12px;line-height:1.5}
.category-picker-pending{margin:0;padding:5px 9px;color:#586e61;font-size:10px;line-height:1.5}
.category-picker[data-search-busy]::after{content:"";position:absolute;right:60px;top:calc(50% - 7px);width:14px;height:14px;box-sizing:border-box;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;pointer-events:none;animation:category-picker-wait .7s linear infinite}
.category-picker[data-search-busy] .category-picker-input{padding-right:84px}
@keyframes category-picker-wait{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.category-picker[data-search-busy]::after{animation:none}}
.category-picker-create .category-picker-name{color:#17634f;font-weight:650}
.category-picker-status{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.category-picker-host{position:relative}
.category-picker-quick{margin:0}
.loan-field .category-picker{margin:0}
#quick-entry .quick-priority .category-picker-input{margin-top:0}
.category-picker-quick .category-picker-list{min-width:0}
.table-filters .category-picker{margin-top:4px}
.table-filters .category-picker-input{height:29px;padding:6px 60px 6px 8px;font-size:11px;background:#f8faf8}
.filters .category-picker{margin:0;min-width:130px}
.filters .category-picker-input{height:28px;margin:0;padding:5px 60px 5px 7px;font-size:10px}
.plan-table .category-picker{margin:0;min-width:160px}
.plan-table .category-picker-input{width:100%;height:31px;margin:0;padding:7px 60px 7px 7px;font-size:11px}
#preview-body .category-picker,#bank-preview-body .category-picker{margin:0;min-width:135px;max-width:200px}
/* Keep the editable CSV category readable; other import cells retain their sizing. */
#preview-body .category-picker{min-width:320px;max-width:400px}
#preview-body .category-picker-input,#bank-preview-body .category-picker-input{margin:0;font-size:11px;padding:7px 60px 7px 7px}
@media(max-width:700px){.category-picker-list{font-size:12px}.category-picker-option{padding-top:9px;padding-bottom:9px}.category-picker-path{font-size:10px}.filters .category-picker{min-width:100px}.table-filters .category-picker-input{font-size:10px}}

.category-picker-toggle svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;transform-origin:center;pointer-events:none}
.category-picker-toggle[aria-expanded=true] svg{transform:rotate(180deg)}

/* Opt-in choose-first presentation; existing forms keep editable search by default. */
.category-picker-choice{grid-area:1/1;box-sizing:border-box;display:block;min-width:0;width:100%;min-height:44px;margin:0;padding:10px 60px 10px 12px;border:1px solid #adbbb3;border-radius:8px;background:#fff;color:#263e32;font:inherit;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer}
.category-picker-choice:focus-visible{outline:2px solid #24856b;outline-offset:2px}
.category-picker-choice:disabled{background:#e9eeeb;color:#6c7972;cursor:default;opacity:1}
.category-picker-choice-empty{color:#6c7972}
.category-picker-choosing-open .category-picker-choice{padding-right:104px}
.category-picker-search{grid-area:1/1;position:relative;justify-self:end;align-self:stretch;width:44px;min-height:44px;margin:0 52px 0 0;padding:11px;border:0;border-radius:8px;background:transparent;color:#466654;z-index:1;display:flex;align-items:center;justify-content:center}
.category-picker-search::before{content:"";position:absolute;inset:4px;border-radius:6px;background:#eaf3ee;opacity:0;pointer-events:none}
.category-picker-search:is(:hover,:focus-visible):not(:disabled){background:transparent}
.category-picker-search:is(:hover,:focus-visible):not(:disabled)::before{opacity:1}
.category-picker-search svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
.category-picker-search>svg{position:relative;flex:none}

/* Keep every remote result in the DOM; defer offscreen layout where supported. */
.category-picker-remote>.category-picker-option{content-visibility:auto;contain-intrinsic-block-size:auto 60px}

.category-picker-remote>.category-picker-option.active{content-visibility:visible}

/* Only the operation-history popup: retain the cabinet's existing palette and form. */
.category-picker-list.gc-operation-history[role=listbox] .category-picker-option{padding-top:7px;padding-bottom:7px;min-height:44px;line-height:1.4}
.gc-operation-history .category-picker-primary{display:flex;align-items:baseline;gap:12px;min-width:0}
.gc-operation-history .category-picker-primary>.category-picker-name{flex:1;min-width:0}
.gc-operation-history .category-picker-amount{flex:none;white-space:nowrap;font-weight:650;font-variant-numeric:tabular-nums}
.gc-operation-history .category-picker-path .gc-category-icon{width:12px;height:12px;min-width:12px;vertical-align:-2px}
.gc-operation-history.gc-history-unloaded[aria-busy=true]:not([data-search-wait-note]){visibility:hidden;pointer-events:none}
.gc-operation-history.gc-history-unloaded[aria-busy=true]>.category-picker-empty{visibility:hidden}
.category-picker-wait-note{position:absolute;inset:auto 5px 5px;margin:0;background:inherit;pointer-events:none}
@media(max-width:700px){.category-picker-list.gc-operation-history[role=listbox] .category-picker-option{padding-top:9px;padding-bottom:9px}}
