/* Petty Cash toolbar only: one desktop card with three deliberate rows. */
.custody-toolbar{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:16px;margin:18px 0!important;padding:18px!important;border:1px solid #e3e9f2!important;border-radius:10px;background:#fff;direction:rtl;container-type:inline-size}
.custody-toolbar-actions{display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:10px;min-height:44px}
.custody-toolbar .primary-btn,.custody-toolbar .custody-export-group .secondary-btn{box-sizing:border-box!important;height:44px!important;white-space:nowrap}
.custody-toolbar .primary-btn{min-width:142px}
.custody-export-group{display:flex!important;align-items:center;gap:10px}
.custody-toolbar .custody-export-group .secondary-btn{display:inline-flex;align-items:center;justify-content:center;min-width:122px;padding-inline:16px}
.custody-toolbar .custody-main-filters{display:grid;grid-template-columns:minmax(250px,2fr) minmax(120px,.8fr) minmax(145px,1fr) minmax(150px,1fr);gap:12px;align-items:center;min-width:0}
.custody-toolbar .custody-search,.custody-toolbar .custody-main-filters select,.custody-category-trigger{box-sizing:border-box;width:100%;height:44px!important;min-width:0;border:1px solid #dce3ed;border-radius:7px;background:#fff;color:#34425f;font:13px plex}
.custody-toolbar .custody-search{padding-inline:13px}
.custody-toolbar .custody-main-filters select{padding-inline:12px}
.custody-category-picker{position:relative;min-width:0}
.custody-category-trigger{display:flex;align-items:center;justify-content:space-between;gap:10px;padding-inline:12px;cursor:pointer;text-align:right}
.custody-category-trigger:hover,.custody-category-trigger[aria-expanded="true"]{border-color:#bca6ff;background:#fcfbff}
.custody-category-trigger[aria-expanded="true"]{box-shadow:0 0 0 3px #6c3bea12}
.custody-category-menu{position:absolute;z-index:30;top:calc(100% + 7px);right:0;left:0;max-height:248px;overflow-y:auto;padding:7px;border:1px solid #dce3ed;border-radius:8px;background:#fff;box-shadow:0 12px 26px #1520411c}
.custody-category-menu[hidden]{display:none}
.custody-category-option{display:flex;align-items:center;gap:9px;min-height:34px;padding:5px 7px;border-radius:6px;color:#34425f;font:13px plex;cursor:pointer}
.custody-category-option:hover{background:#f7f4ff}
.custody-page .custody-toolbar .custody-category-option input{inline-size:16px!important;block-size:16px!important;min-width:16px!important;height:16px!important;margin:0!important;padding:0!important;accent-color:#6731df}
.custody-date-row{display:flex;align-items:center;justify-content:flex-start;gap:22px;min-width:0;padding-top:1px}
.custody-date-range{display:grid!important;grid-template-columns:auto 210px 18px 210px;align-items:center;gap:10px;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;min-width:0}
.custody-date-range-label{color:#556681;font:800 12px plex;white-space:nowrap}
.custody-date-range label{display:grid!important;grid-template-columns:auto minmax(0,1fr)!important;align-items:center;gap:7px;min-width:0;color:#64748b;font:700 11px plex}
.custody-date-range input{box-sizing:border-box;width:100%;height:44px!important;min-width:0;padding-inline:10px;border:1px solid #dce3ed!important;border-radius:7px!important;background:#fff!important;color:#34425f!important;direction:ltr;font:13px plex!important;outline:0}
.custody-date-range input:focus{border-color:#8a67eb!important;box-shadow:0 0 0 3px #6c3bea12}
.custody-date-range input::-webkit-calendar-picker-indicator{margin:0;opacity:.72;cursor:pointer}
.custody-date-separator{color:#7a689e;font:700 16px Arial;text-align:center}
.custody-clear-filters{box-sizing:border-box;min-width:132px;height:44px!important;padding-inline:16px;border:1px solid #d9dfeb;border-radius:7px;background:#fff;color:#596b87;font:800 12px plex;white-space:nowrap;cursor:pointer;transition:border-color .16s ease,color .16s ease,background .16s ease}
.custody-clear-filters:hover:not(:disabled){border-color:#c8b9ff;color:#5523db;background:#faf8ff}
.custody-clear-filters:disabled{border-color:#e7ebf2;background:#f8fafc;color:#a6b0c0;cursor:default}
@container (max-width:780px){.custody-toolbar .custody-main-filters{grid-template-columns:repeat(2,minmax(0,1fr))}.custody-toolbar .custody-main-filters .custody-search{grid-column:1/-1}.custody-date-row{flex-wrap:wrap;gap:12px}.custody-date-range{grid-template-columns:auto minmax(0,1fr) 18px minmax(0,1fr);flex:1 0 100%}}
@container (max-width:510px){.custody-toolbar{padding:14px!important}.custody-toolbar-actions,.custody-export-group{width:100%;flex-wrap:wrap}.custody-toolbar .primary-btn,.custody-toolbar .custody-export-group .secondary-btn{flex:1;min-width:0}.custody-toolbar .custody-main-filters{grid-template-columns:minmax(0,1fr)}.custody-toolbar .custody-main-filters .custody-search{grid-column:auto}.custody-date-range{grid-template-columns:minmax(0,1fr)}.custody-date-range-label{margin-bottom:2px}.custody-date-separator{display:none}.custody-clear-filters{width:100%}}

/* Override the legacy toolbar layout without affecting other page toolbars. */
.custody-page .custody-toolbar{display:grid!important;grid-template-columns:minmax(0,1fr)!important;align-items:stretch!important;gap:16px!important;padding:18px!important}
.custody-page .custody-toolbar-actions{display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:10px!important;min-height:44px!important}
.custody-page .custody-toolbar .custody-main-filters{display:grid!important;grid-template-columns:minmax(250px,2fr) minmax(120px,.8fr) minmax(145px,1fr) minmax(150px,1fr)!important;gap:12px!important;align-items:center!important;width:100%!important}
.custody-page .custody-toolbar .custody-search{box-sizing:border-box!important;height:44px!important;min-width:0!important;padding-inline:13px!important}
.custody-page .custody-toolbar .custody-date-row{display:flex!important;align-items:end!important;justify-content:flex-start!important;gap:22px!important;width:100%!important;padding:0!important}
.custody-page .custody-toolbar .custody-date-range{display:grid!important;grid-template-columns:auto 210px 18px 210px!important;align-items:end!important;flex:none!important;gap:10px!important;width:auto!important;height:auto!important;margin:0!important;padding:0!important;border:0!important;background:transparent!important}
.custody-page .custody-toolbar .custody-date-range label{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:4px!important}
.custody-page .custody-toolbar .custody-date-range label span{font-size:11px!important}
.custody-page .custody-toolbar .custody-date-range input{height:44px!important;min-width:0!important;padding-inline:10px!important;border:1px solid #dce3ed!important;border-radius:7px!important;background:#fff!important}
@container (max-width:780px){.custody-page .custody-toolbar .custody-main-filters{grid-template-columns:repeat(2,minmax(0,1fr))!important}.custody-page .custody-toolbar .custody-main-filters .custody-search{grid-column:1/-1!important}.custody-page .custody-toolbar .custody-date-row{flex-wrap:wrap!important;gap:12px!important}.custody-page .custody-toolbar .custody-date-range{grid-template-columns:auto minmax(0,1fr) 18px minmax(0,1fr)!important;flex:1 0 100%!important}}
@container (max-width:510px){.custody-page .custody-toolbar{padding:14px!important}.custody-page .custody-toolbar-actions,.custody-page .custody-export-group{width:100%!important;flex-wrap:wrap!important}.custody-page .custody-toolbar .custody-main-filters{grid-template-columns:minmax(0,1fr)!important}.custody-page .custody-toolbar .custody-main-filters .custody-search{grid-column:auto!important}.custody-page .custody-toolbar .custody-date-range{grid-template-columns:minmax(0,1fr)!important}.custody-page .custody-toolbar .custody-clear-filters{width:100%!important}}

/* Visual-only control family polish — preserves the three-row toolbar layout. */
.custody-page .custody-toolbar{position:relative;border-color:#cbd6e5!important;background:linear-gradient(112deg,#faf9ff 0%,#ffffff 48%,#f7fbff 100%)!important;box-shadow:0 10px 24px rgba(28,42,72,.075),0 1px 2px rgba(28,42,72,.035)!important;overflow:visible!important}
.custody-page .custody-toolbar::before{content:"";position:absolute;inset-inline:0;top:0;height:3px;border-radius:10px 10px 0 0;background:linear-gradient(90deg,#6531ce 0%,#8145e9 48%,#55c8e9 100%);pointer-events:none}
.custody-page .custody-toolbar .custody-search,.custody-page .custody-toolbar .custody-main-filters select,.custody-page .custody-toolbar .custody-category-trigger,.custody-page .custody-toolbar .custody-date-range input{border-color:#bccbde!important;background-color:#fff!important;color:#31425f!important;box-shadow:0 1px 1px rgba(20,37,63,.035)!important}
.custody-page .custody-toolbar .custody-search,.custody-page .custody-toolbar .custody-main-filters select,.custody-page .custody-toolbar .custody-category-trigger{box-sizing:border-box!important;height:44px!important;border:1px solid #cbd6e5!important;border-radius:8px!important;font:600 13px plex!important}
.custody-page .custody-toolbar .custody-search #custodySearch{height:100%!important;min-width:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;color:inherit!important;outline:none!important;padding-inline:4px 10px!important}
.custody-page .custody-toolbar .custody-main-filters select,.custody-page .custody-toolbar .custody-category-trigger{-webkit-appearance:none;appearance:none;padding-inline:12px 38px!important;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23637793' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")!important;background-repeat:no-repeat!important;background-position:left 13px center!important;background-size:14px!important}
.custody-page .custody-toolbar .custody-category-trigger>span:last-child{display:none}
.custody-page .custody-toolbar .custody-search:hover,.custody-page .custody-toolbar .custody-main-filters select:hover,.custody-page .custody-toolbar .custody-category-trigger:hover,.custody-page .custody-toolbar .custody-date-range input:hover{border-color:#9fb4ce!important;background-color:#fefeff!important}
.custody-page .custody-toolbar .custody-search:focus-within,.custody-page .custody-toolbar .custody-main-filters select:focus,.custody-page .custody-toolbar .custody-category-trigger:focus-visible,.custody-page .custody-toolbar .custody-category-trigger[aria-expanded="true"],.custody-page .custody-toolbar .custody-date-range input:focus{border-color:#8b6ddd!important;box-shadow:0 0 0 3px rgba(102,65,215,.12)!important;outline:none}
.custody-page .custody-toolbar .custody-date-range{position:relative}
.custody-page .custody-toolbar .custody-date-range::before{content:"";position:absolute;inset:-7px -9px;z-index:-1;border:1px solid rgba(194,207,226,.5);border-radius:10px;background:rgba(247,249,255,.68);pointer-events:none}
.custody-page .custody-toolbar .custody-date-range-label,.custody-page .custody-toolbar .custody-date-range label>span{color:#526684!important;font-weight:800!important}
.custody-page .custody-toolbar .custody-date-range input,.custody-page .custody-toolbar .custody-clear-filters{border-radius:8px!important}
.custody-page .custody-toolbar .custody-clear-filters{border-color:#bdcadd!important;background:#f8faff!important;color:#526783!important;box-shadow:0 1px 1px rgba(20,37,63,.03)!important}
.custody-page .custody-toolbar .custody-clear-filters:not(:disabled):hover{border-color:#9fb4ce!important;background:#f2f5ff!important;color:#5731cf!important}
.custody-page .custody-toolbar .custody-clear-filters:disabled{border-color:#d4dde8!important;background:#f2f5f8!important;color:#8391a3!important;opacity:1!important}
.custody-page .custody-toolbar .custody-export-group .secondary-btn:not(.custody-brand-export){border-color:#b9c8dc!important;background:#f9fbff!important;color:#394d6e!important;box-shadow:0 1px 1px rgba(20,37,63,.035)!important}
.custody-page .custody-toolbar .custody-export-group .secondary-btn:not(.custody-brand-export):not(:disabled):hover{border-color:#9fb4ce!important;background:#f3f6ff!important;color:#5731cf!important}
.custody-page .custody-toolbar .custody-export-group .secondary-btn:not(.custody-brand-export):focus-visible{outline:none;border-color:#8b6ddd!important;box-shadow:0 0 0 3px rgba(102,65,215,.12)!important}
#addCustodyMovement.primary-btn>svg{stroke-width:3}
