.custody-page{display:grid;gap:16px;min-width:0}.custody-page .page-head{margin-bottom:0}.custody-note{padding:12px 16px;background:#f0f5fb;border:1px solid #d5e1ee;border-radius:10px;color:#41556d;margin:0}.custody-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.custody-stats button{font:inherit;text-align:left;cursor:pointer}.custody-stats .active{outline:2px solid var(--blue,#2672c8)}.custody-filters{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.custody-page label,.custody-dialog label{display:grid;gap:6px;font-weight:600;min-width:0}.custody-page input,.custody-page select,.custody-dialog input,.custody-dialog select,.custody-dialog textarea{width:100%;min-width:0}.custody-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.custody-ticket{min-width:0;display:grid;gap:12px}.custody-ticket header{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.custody-ticket.is-overdue{border-left:4px solid #b4232c}.custody-ticket ul{margin:10px 0;padding-left:18px}.custody-ticket li{margin-bottom:6px;overflow-wrap:anywhere}.custody-ticket small{color:var(--muted,#64748b)}.custody-ticket-main{display:grid;grid-template-columns:minmax(0,1fr) 160px;gap:14px}.custody-page dl{margin:0}.custody-page dl div{display:grid;grid-template-columns:110px minmax(0,1fr);gap:8px;margin-bottom:8px}.custody-page dt{color:var(--muted,#64748b)}.custody-page dd{margin:0;overflow-wrap:anywhere}.custody-pager{justify-content:center}.custody-dialog{width:min(940px,calc(100vw - 24px));max-height:calc(100dvh - 24px);padding:0;border:0;border-radius:14px}.custody-dialog form{display:flex;flex-direction:column;max-height:calc(100dvh - 24px)}.custody-dialog .modal-body{overflow:auto}.custody-form-grid,.custody-detail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.custody-product-picker{display:grid;grid-template-columns:1fr 1fr auto;gap:10px;align-items:end}.custody-edit-line{margin:12px 0;padding:12px;border:1px solid var(--line,#d7dfeb);border-radius:10px;display:grid;grid-template-columns:1fr 100px 1fr auto;gap:10px;align-items:end}.custody-return-line{display:grid;grid-template-columns:1fr 120px 1fr;gap:12px;align-items:end;border-bottom:1px solid var(--line,#d7dfeb);padding:14px 0}.custody-detail-line{border-bottom:1px solid var(--line,#d7dfeb);padding:12px 0}.custody-detail-line small,.custody-history small{display:block;color:var(--muted,#64748b);margin-top:4px}.custody-text{white-space:pre-wrap;overflow-wrap:anywhere}.custody-history{padding-left:24px}.custody-history li{padding:10px 0;border-bottom:1px solid var(--line,#d7dfeb)}.custody-photos{display:flex;flex-wrap:wrap;gap:12px;margin-top:14px}.custody-photos img{object-fit:cover;border-radius:10px}.custody-dialog .modal-foot{flex-wrap:wrap}.custody-dialog fieldset{min-width:0}
@media(max-width:850px){.custody-page .btn{min-height:44px}.custody-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.custody-filters,.custody-form-grid,.custody-detail-grid,.custody-list,.custody-product-picker,.custody-edit-line,.custody-return-line,.custody-ticket-main{grid-template-columns:minmax(0,1fr)}.custody-ticket dl{display:grid;gap:6px}.custody-dialog .modal-body{padding:14px}.custody-dialog .modal-foot .btn{flex:1;white-space:normal}.custody-dialog .modal-head h2{font-size:20px}.custody-page .page-head{gap:12px;flex-wrap:wrap}.custody-ticket ul{padding-left:18px}}

.custody-filters>label,.custody-filters>.row-gap,.custody-filter-panel{grid-column:1/-1}.custody-filter-panel summary{cursor:pointer;padding:10px 0;font-weight:600}.custody-filter-fields{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}@media(max-width:850px){.custody-filter-fields{grid-template-columns:minmax(0,1fr)}}

.custody-dialog .modal-foot>.error{flex-basis:100%;margin:0;text-align:left;overflow-wrap:anywhere}.custody-dialog .modal-foot>.error:empty{display:none}

.custody-picker-wide{grid-column:1 / -1}.custody-picker{min-width:0}.custody-picker>label{display:grid;gap:6px}.custody-picker input[type=search]{width:100%;box-sizing:border-box}.custody-picker-results{max-height:220px;overflow:auto}.custody-picker table{width:100%;border-collapse:collapse}.custody-picker th,.custody-picker td{text-align:left;padding:8px;border-bottom:1px solid #e2e8f0;overflow-wrap:anywhere}.custody-picker th{position:sticky;top:0;background:#f4f7fb}.custody-picker td .btn{white-space:nowrap}.custody-picker p{font-size:12px;margin:6px 0}.custody-picker [hidden]{display:none!important}
@media(max-width:600px){.custody-picker th,.custody-picker td{padding:6px;font-size:12px}.custody-picker table{table-layout:fixed}}

.custody-picker-option{display:block;width:100%;min-height:40px;padding:6px 0;border:0;background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer;white-space:normal;overflow-wrap:anywhere}.custody-picker-option:hover,.custody-picker-option:focus-visible{color:var(--blue,#2672c8);text-decoration:underline}
