#stock-movement-dialog{width:680px;max-width:calc(100% - 24px);max-height:92dvh;border-radius:14px;overflow:hidden;padding:0}#stock-movement-dialog[open]{display:flex;flex-direction:column}#stock-movement-dialog .drawer-header{padding:18px 20px;align-items:center;border-bottom:1px solid var(--line);flex-shrink:0}#stock-movement-dialog h2{margin:0;font-size:23px}.movement-heading-actions{display:flex;gap:8px}.movement-heading-actions button{width:44px;height:44px}.movement-heading-actions #movement-help{border:1px solid var(--line);border-radius:50%}#movement-help-body{padding:8px 20px;background:#f4f7f1;font-size:14px;line-height:1.6;max-height:190px;overflow:auto}#movement-body{padding:20px;overflow:auto;min-height:0;overscroll-behavior:contain}#movement-body p{overflow-wrap:anywhere}#movement-footer{display:flex;gap:10px;flex-wrap:wrap;flex-shrink:0;padding:12px 20px;border-top:1px solid var(--line);background:white}#movement-footer>.button{flex:1;min-height:48px}#movement-error{width:100%;margin:0 0 8px;max-height:100px;overflow:auto}#movement-form{display:grid;gap:16px}#movement-form .field{margin:0}#movement-fields{display:grid;gap:16px}#stock-movement-dialog [hidden]{display:none!important}#stock-movement-dialog input,#stock-movement-dialog select,#stock-movement-dialog textarea{font-size:16px;min-height:48px;max-width:100%;min-width:0}#stock-movement-dialog textarea{min-height:85px}.movement-tools{text-align:right}.movement-tools button{min-height:40px}.movement-filters{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);gap:12px}#movement-result-count{font-size:13px;color:var(--muted);margin:8px 0}#movement-results{max-height:260px;overflow:auto;border:1px solid var(--line);border-radius:8px}#movement-results:empty{display:none}#movement-results>button{display:flex;gap:10px;align-items:center;width:100%;padding:10px;text-align:left;border-bottom:1px solid var(--line);min-height:64px}#movement-results>button[aria-selected=true],#movement-results>button:hover{background:#edf3eb}#movement-results>button>span:last-child{min-width:0}#movement-results strong{font-size:16px;display:block;overflow-wrap:anywhere}#movement-results small,.movement-selection small,#movement-selected small,.movement-history-row small{display:block;color:var(--muted);font-size:13px;line-height:1.5}.movement-selection,#movement-selected{display:flex;align-items:center;gap:12px;border:1px solid var(--line);border-radius:8px;padding:12px}.movement-selection>div,#movement-selected>div{flex:1;min-width:0;overflow-wrap:anywhere}#stock-movement-dialog .item-thumbnail,#stock-movement-dialog .item-initial{width:40px;height:40px;min-width:40px;flex-shrink:0}#movement-keep-item{min-height:44px}.movement-original,.movement-hint{font-size:14px;color:var(--muted);line-height:1.5;margin:0}#movement-form summary{min-height:44px;cursor:pointer;display:flex;align-items:center}.movement-balance{padding:16px;border:1px solid var(--line);border-radius:8px;background:#f4f7f1;display:grid;gap:8px}.movement-balance span{font-size:19px}.movement-balance small{color:var(--muted);font-size:14px;line-height:1.5}.movement-issues,.movement-warnings{padding:14px 14px 14px 32px;border-radius:8px;line-height:1.6;font-size:15px;overflow-wrap:anywhere}.movement-issues{background:#fff1e9}.movement-warnings{background:#fff7e5}.movement-history-row{display:grid;grid-template-columns:40px minmax(0,1fr) auto;gap:12px;align-items:center;padding:14px 0;border-bottom:1px solid var(--line)}.movement-history-row strong{font-size:16px;overflow-wrap:anywhere}.movement-history-row .button{font-size:14px;padding:8px 12px}.movement-history-row+button{margin-top:16px}@media(max-width:640px){#stock-movement-dialog{max-width:calc(100% - 16px);width:calc(100% - 16px);max-height:94dvh}#stock-movement-dialog .drawer-header{padding:12px 16px}#stock-movement-dialog h2{font-size:21px}#movement-body{padding:16px}#movement-footer{padding:10px 16px max(10px,env(safe-area-inset-bottom))}.movement-filters,#movement-form .field-grid{grid-template-columns:minmax(0,1fr)}.movement-history-row{grid-template-columns:32px minmax(0,1fr);gap:8px}.movement-history-row>.button{grid-column:2;justify-self:start;min-height:44px!important}.movement-history-row small{font-size:12px}#movement-results{max-height:220px}.movement-heading-actions{gap:2px}.movement-heading-actions button{width:40px;height:44px}.movement-selection,#movement-selected{gap:8px;padding:10px}}

.movement-fix-actions{display:flex;flex-wrap:wrap;gap:8px}.movement-fix-actions .button{min-height:44px}

/* Recent entries stay at two lines until the operator asks for details. */
.movement-history-row{display:block;padding:0;border-bottom:1px solid var(--line)}.movement-history-row>summary{display:flex;align-items:center;gap:10px;padding:12px 0;min-height:64px;cursor:pointer;list-style:none}.movement-history-row>summary::-webkit-details-marker{display:none}.movement-history-copy{display:block;min-width:0;flex:1}.movement-history-copy strong,.movement-history-copy small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:22px}.movement-history-chevron{display:grid;place-items:center;width:40px;height:44px;flex-shrink:0;font-size:22px;border:1px solid var(--line);border-radius:7px}.movement-history-row[open] .movement-history-chevron{transform:rotate(180deg)}.movement-history-extra{padding:0 0 14px 50px}.movement-history-extra p{margin:0 0 8px;font-size:14px;line-height:1.5}.movement-history-row[open] .movement-history-copy strong{white-space:normal}.movement-history-row .movement-history-extra .button{min-height:44px}@media(max-width:640px){.movement-history-row>summary{padding:8px 0;min-height:64px}.movement-history-row>summary .item-thumbnail,.movement-history-row>summary .item-initial{width:32px;height:32px;min-width:32px}.movement-history-copy strong{font-size:15px}.movement-history-copy small{font-size:12px}.movement-history-extra{padding-left:42px}.movement-history-chevron{width:36px}.movement-history-row:not([open])>summary{height:64px;box-sizing:border-box}}

#vendor-return-form{display:grid;gap:16px;margin-top:16px}#vendor-return-form .field{margin:0}#movement-history-view{width:100%}
