/* Shared controls wrap before they collide, including 320px phones and laptop zoom. */
.dd17-group,.dd17-filter-row,.dd17-action-row{display:flex;flex-wrap:wrap;align-items:end;gap:.65rem;margin:.5rem 0;min-width:0}
.dd17-group label,.dd17-filter-row label{display:flex;flex-direction:column;gap:.25rem;min-width:135px;flex:1 1 135px}
.dd17-group label span{font-size:.75rem;font-weight:650;color:#595a50}.dd17-group{max-width:850px}.dd17-group .form-select{min-width:130px}
.dd17-feature-button{margin:0 .5rem .5rem 0}.dd17-scan{background:#fffbe6;border:1px solid #dfcc75;padding:1rem;border-radius:12px;margin:.75rem 0}.dd17-scan .form-control{min-height:44px}.dd17-scan-status{min-height:1.4em;margin-top:.4rem}
.dd17-camera{width:100%;max-height:240px;background:#111;border-radius:8px}
.dd17-internal{padding:1rem;border:1px solid #e5d06d;background:#fffceb;border-radius:12px;grid-column:1/-1}
.im-filter-fields>*,.royalty-filters>*,.dd-filter-row>*{min-width:0}.im-form>label,.im-form>div{min-width:0}
input[type=date],input[type=month]{min-width:145px;padding-right:.7rem;max-width:100%}
.dd-actual-single-holder,.dd-actual-multi-holder{width:100%;min-width:0}.dd-actual-summary{min-height:42px;white-space:normal}.dd-actual-menu{max-width:min(520px,calc(100vw - 24px));box-sizing:border-box}.dd-actual-option{min-height:42px}
.dd-date-presets,.dd-date-range,.date-range-control,.dd-date-toolbar{flex-wrap:wrap;gap:.4rem;max-width:100%}
.royalty-group-control,.group-by-compact{max-width:100%;flex-wrap:wrap}.filter-box .input-group{flex-wrap:nowrap}.filter-box .form-label{white-space:normal}
@media(max-width:1100px){.im-filter-fields{grid-template-columns:repeat(auto-fit,minmax(165px,1fr))!important}.royalty-filters .row{row-gap:.75rem}.dd17-group{flex:1 1 100%}.dd17-group label{flex:1 1 140px}}
@media(max-width:600px){.im-header{flex-direction:column;align-items:stretch}.im-wizard-footer{flex-wrap:wrap}.im-wizard-footer>*{flex:1 1 auto}.im-line{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important}.im-line>label:first-child{grid-column:1/-1}.modal-dialog{margin:.5rem!important}.dd17-filter-row>*,.dd17-action-row>button{flex:1 1 140px}.im-form{grid-template-columns:minmax(0,1fr)!important}.dd17-group label{flex:1 1 100%}.table-responsive{max-width:100%;overflow-x:auto}.dd-actual-menu{width:calc(100vw - 30px);max-height:65vh;overflow:auto}.royalty-group-heading{flex-wrap:wrap}}
/* One compact control; the composer uses removable, reorderable field chips. */
.dd17-group{display:inline-flex;flex:0 1 auto!important;max-width:100%;margin:0;align-self:end}
.dd17-group-trigger{display:flex;align-items:center;gap:9px;min-height:42px;max-width:100%;padding:9px 13px;border:1px solid #dedfd6;border-radius:12px;background:#fff;color:#242719;font-size:13px;font-weight:650;box-shadow:0 1px 2px #16190d06;transition:box-shadow .18s,border-color .18s}
.dd17-group-trigger:hover,.dd17-group-trigger[aria-expanded=true]{border-color:#c5b15b;box-shadow:0 0 0 3px #ead99038}.dd17-group-trigger.is-active{background:#fffbee;border-color:#e8d791}.dd17-group-summary{max-width:240px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;font-weight:500;color:#62634f}.dd17-group-count{display:grid;place-items:center;min-width:21px;height:21px;border-radius:7px;background:#222719;color:#fff;font-size:11px}.dd17-group-hint{font-size:12px;color:#7e8173;font-weight:400}.dd17-group-chevron{margin-left:auto;color:#929584}
.dd17-group-panel{position:fixed;z-index:1090;display:flex;flex-direction:column;max-height:calc(100dvh - 24px);border:1px solid #e2e4d9;border-radius:20px;background:#fff;box-shadow:0 24px 90px #22271426,0 3px 12px #22271412;color:#292e21;overflow:hidden;animation:dd17-reveal .16s ease-out;font-family:inherit;text-align:left}
.dd17-group-panel header{display:flex;align-items:center;gap:11px;padding:21px 22px 17px;background:linear-gradient(125deg,#fbfced,#fff 78%);border-bottom:1px solid #eef0e7}.dd17-group-panel h3{font-size:18px;letter-spacing:-.4px;margin:0 0 3px;font-weight:700}.dd17-group-panel header p{font-size:12px;color:#7a806c;margin:0}.dd17-group-emblem{display:grid;place-items:center;width:39px;height:39px;border-radius:12px;background:#e8f0d8;color:#4b5b32}.dd17-group-panel header>.dd17-icon-button{margin-left:auto;font-size:22px}
.dd17-group-body{padding:20px 22px;overflow:auto;overscroll-behavior:contain}.dd17-group-section-label{font-size:10px;letter-spacing:1.2px;font-weight:750;color:#8b907e;display:flex;justify-content:space-between}.dd17-group-section-label>span{letter-spacing:0}.dd17-group-chips{display:flex;flex-direction:column;gap:7px;margin:10px 0 20px;min-height:64px}.dd17-group-chip{display:flex;gap:7px;align-items:center;padding:7px 9px;background:linear-gradient(110deg,#f5f7ed,#fcfcf8);border:1px solid #e1e7d6;border-radius:11px;cursor:grab}.dd17-chip-order{display:grid;place-items:center;width:25px;height:25px;background:white;border:1px solid #e4e7da;border-radius:8px;font-size:11px;font-weight:750;color:#73805c}.dd17-chip-name{flex:1;font-size:13px;font-weight:650}.dd17-icon-button{display:grid;place-items:center;width:28px;height:28px;flex:0 0 28px;border:0;border-radius:7px;background:transparent;color:#727b62;line-height:1;font-size:15px}.dd17-icon-button:hover{background:#e4ead7;color:#303924}.dd17-icon-button:disabled{opacity:.25;cursor:default}.dd17-group-empty{padding:14px;border:1px dashed #dce1d1;border-radius:12px;color:#69725c;font-size:13px;background:#fafbf7}.dd17-group-empty small{color:#989e8d;font-size:11px}
.dd17-group-search{display:flex;gap:8px;align-items:center;margin-bottom:10px;border:1px solid #e8ebe0;border-radius:10px;padding:9px 11px;color:#9aA18e;background:#fff}.dd17-group-search input{width:100%;border:0;outline:none;padding:0;font-size:12px;color:#38412d;min-width:0;background:transparent}.dd17-group-search:focus-within{border-color:#b4c294;box-shadow:0 0 0 3px #e8efdd}.dd17-group-fields{display:grid;grid-template-columns:1fr 1fr;gap:7px;max-height:185px;overflow:auto;padding:2px}.dd17-field-choice{display:flex;align-items:center;justify-content:space-between;gap:5px;text-align:left;padding:10px 11px;border:1px solid #eceee4;border-radius:9px;background:white;color:#6f7663;font-size:12px;min-height:39px}.dd17-field-choice:hover{background:#f8faf3;border-color:#c3cfae}.dd17-field-choice.selected{background:#f0f5e6;border-color:#c5d3ae;color:#52663c}.dd17-field-choice:disabled{opacity:.45}.dd17-group-preview{margin-top:19px;padding:12px 13px;background:#f8f9f5;border-radius:11px}.dd17-group-preview>span{font-size:9px;letter-spacing:1px;font-weight:750;color:#a0a592}.dd17-group-preview>div{display:flex;flex-wrap:wrap;gap:6px;font-size:12px;color:#69745b;margin-top:5px}.dd17-group-preview b{margin-right:6px;color:#a6af98;font-weight:400}
.dd17-group-panel footer{display:flex;align-items:center;justify-content:space-between;padding:15px 22px;border-top:1px solid #edf0e6;background:#fff}.dd17-group-reset{background:none;border:0;color:#858c77;font-size:12px;padding:9px 0}.dd17-group-apply{display:flex;align-items:center;gap:24px;border:0;border-radius:10px;padding:12px 16px;background:#272f1f;color:#fff;font-size:12px;font-weight:650;box-shadow:0 4px 9px #242d1f15}.dd17-group-apply:hover{background:#415331}.dd17-group-apply span{color:#c5db9e}.dd17-group-panel button:focus-visible{outline:2px solid #829b58;outline-offset:2px}@keyframes dd17-reveal{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:none}}
@media(max-width:600px){.dd17-group-summary{max-width:160px}.dd17-group-hint{display:none}.dd17-group-panel{border-radius:20px}.dd17-icon-button{width:34px;height:34px;flex-basis:34px}.dd17-field-choice{min-height:44px}.dd17-group-panel footer{padding-bottom:max(15px,env(safe-area-inset-bottom))}}
@media(prefers-reduced-motion:reduce){.dd17-group-panel{animation:none}.dd17-group-trigger{transition:none}}
.dd17-location-holder{min-width:0;width:100%}.dd17-location-holder summary{min-height:42px;cursor:pointer}.dd17-location-panel{position:fixed;z-index:1080;max-height:65vh;overflow:auto;padding:14px;background:#fff;border:1px solid #e1e5d8;border-radius:16px;box-shadow:0 16px 50px #20271c25;text-align:left;color:#303629}.dd17-location-tabs{display:flex;gap:4px;margin-bottom:12px;padding:4px;border-radius:10px;background:#f1f4e9}.dd17-location-tabs button{flex:1;padding:8px 5px;border:0;border-radius:7px;background:none;font-size:12px;color:#68715b}.dd17-location-tabs [aria-selected=true]{background:#fff;box-shadow:0 1px 4px #2222;color:#28351e;font-weight:700}.dd17-location-actions{display:flex;justify-content:space-between;padding:10px 0}.dd17-location-actions button{border:0;background:none;font-size:12px;color:#52653d;padding:7px}.dd17-location-rows{margin:8px 0;max-height:40vh;overflow:auto}.dd17-location-row{display:flex!important;align-items:center;gap:12px;width:100%;padding:12px!important;border:0;border-radius:9px;background:#fff;text-align:left;cursor:pointer;font-size:13px;min-height:45px}.dd17-location-row:hover,.dd17-location-row.is-selected{background:#f3f6e9}.dd17-location-row>span{display:block;flex:1;min-width:0}.dd17-location-row b{font-weight:600}.dd17-location-row small{display:block;font-size:11px;color:#7d846f;margin-top:3px}.dd17-location-row input,.dd17-location-group input{width:16px;height:16px;accent-color:#586b3c;flex-shrink:0}.dd17-location-panel>small{font-size:10px;color:#8b927f}.dd17-location-group{display:flex;align-items:center;gap:10px;padding:11px 8px;background:#f7f8f2;border-radius:8px;font-size:12px}.dd17-location-group small{margin-left:auto;color:#89907b}.dd17-location-tabs button:focus-visible,.dd17-location-row:focus-visible{outline:2px solid #829b58;outline-offset:-2px}

/* Internal invoice routing: one sender, many recipients. */
.dd21-route-intro{display:flex;flex-wrap:wrap;gap:16px;align-items:center;justify-content:space-between;margin-bottom:20px}.dd21-route-intro p{flex:1 1 320px;margin:0}.dd21-route-tools{display:flex;flex-wrap:wrap;gap:10px;align-items:center}.dd21-route-tools h3{margin-right:auto}.dd21-route-form{display:grid;grid-template-columns:1fr 1fr;gap:18px}.dd21-route-card{padding:20px;border:1px solid #dedfd5;border-radius:16px;margin-bottom:18px;min-width:0;background:#fafbf7}.dd21-route-card h3{font-size:1.05rem;font-weight:700;margin-bottom:14px}.dd21-route-card select{margin-top:7px}.dd21-route-card .dd18-check{min-height:48px}.dd21-route-chips{display:flex;flex-wrap:wrap;gap:6px;margin:12px 0;max-height:155px;overflow:auto}.dd21-route-chips span{border-radius:20px;background:#eef0df;padding:5px 10px;font-size:.83rem}.dd21-import-table{max-height:340px;overflow:auto}.dd21-route-table th,.dd21-import-table th{white-space:normal}.dd21-route-table td{overflow-wrap:anywhere}.dd21-route-card .dd18-check input{flex:0 0 18px}#dd21RouteStatus{overflow-wrap:anywhere}
@media(max-width:700px){.dd21-route-form{grid-template-columns:1fr;gap:0}.dd21-route-card{padding:14px}.dd21-route-tools .btn{flex:1 1 auto}.dd21-route-table{min-width:620px}}
