.goods-page{min-width:0}.goods-metrics{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.goods-metrics .card{padding:18px}.goods-metrics .metric{margin:5px 0 0;font-size:30px}.goods-updated{font-size:12px;margin:12px 0 20px}.goods-tabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:20px}.goods-tabs .btn{flex:1;white-space:normal}.goods-table-wrap{overflow-x:auto}.goods-table-wrap table{min-width:850px}.goods-sub{display:block;margin-top:5px;color:var(--muted)}.goods-table-wrap td:last-child .btn{margin:3px}.goods-status{white-space:normal}.goods-photo-button{padding:0;background:transparent;display:block;border-radius:8px}.goods-thumb{width:54px;height:54px;object-fit:cover;border-radius:8px;border:1px solid var(--border);display:block}.goods-preview{display:block;max-width:100%;max-height:240px;object-fit:contain;margin-top:12px;border-radius:10px}.goods-preview[hidden]{display:none}.goods-full-photo{display:block;width:100%;max-height:65vh;object-fit:contain}.goods-documents{display:grid;gap:10px}.goods-document{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px;border:1px solid var(--border);border-radius:12px;background:var(--bg)}.goods-modal-heading{display:flex;justify-content:space-between;align-items:start;gap:14px;margin-bottom:16px}.goods-modal-heading h2{margin:0}.goods-modal .list{max-height:40vh;overflow:auto}.goods-timeline{list-style:none;margin:22px 0;padding:0 0 0 20px;border-left:2px solid var(--border)}.goods-timeline li{position:relative;padding:0 0 24px}.goods-timeline li:before{content:'';position:absolute;width:10px;height:10px;background:var(--green);border-radius:50%;left:-26px;top:6px}.goods-timeline time{display:block;color:var(--muted);font-size:12px;margin:4px 0}.goods-timeline p{margin:4px 0}.goods-receive{margin-top:20px}.goods-receive label,#goodsSearch label{display:flex;flex-direction:column;gap:6px}.goods-shipment .sheet-header{display:flex;gap:18px;align-items:center}.goods-shipment .sheet-header img{width:110px;background:#fff;border-radius:8px;padding:6px}.goods-shipment .sheet-header h2{margin:0}.goods-shipment .sheet-header p{margin:4px 0}.goods-on_site,.goods-distributed{color:var(--green);border:1px solid currentColor}.goods-waiting{color:var(--orange);border:1px solid currentColor}
.goods-item-name{overflow-wrap:anywhere;min-width:120px}
.goods-owner-filters{display:flex;gap:8px;align-items:center}.goods-company-badge{display:inline-block;background:var(--bg,#eef4fb);color:var(--blue,#1764d9);font-size:10px;border-radius:6px;padding:4px 7px;margin:5px 0}.goods-owner-filters .btn{min-width:86px}@media(max-width:650px){#goodsSearch{flex-wrap:wrap}.goods-owner-filters{flex:1;min-width:0}.goods-owner-filters .btn{flex:1;min-height:44px}}
@media print{.goods-item-name{min-width:0}}
@media screen and (min-width:901px){.side:has([data-v="goods"]){overflow-y:auto}}
@media screen and (min-width:651px) and (max-width:900px){.side:has([data-v="goods"]) .nav{flex-wrap:wrap}.side:has([data-v="goods"]) .nav button{flex:1 1 90px;width:auto}}
@media(max-width:1000px){.goods-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.goods-tabs .btn{flex:1 1 180px}}
@media(max-width:600px){.goods-metrics{gap:8px}.goods-metrics .card{padding:12px}.goods-metrics .metric{font-size:26px}.goods-document{align-items:start;flex-direction:column}.goods-tabs .btn{font-size:12px;flex-basis:40%;padding:10px}.goods-page .toolbar>input{min-width:0}.goods-modal{padding:10px}.goods-shipment .sheet-header img{width:80px}}
@media print{.goods-metrics,.goods-updated,.goods-tabs,#goodsError{display:none!important}.goods-table-wrap{overflow:visible}.goods-table-wrap table{min-width:0}.goods-photo-button{display:block!important}.goods-shipment th:last-child,.goods-shipment td:last-child{display:none}.goods-shipment .sheet-header{margin-bottom:12px}.goods-table-wrap th:has(input),.goods-table-wrap td:has(input){display:none}.goods-page .panel{border:0}.goods-thumb{width:40px;height:40px}}
@media screen and (max-width:650px){
  /* Search and company filters need separate rows inside the padded toolbar. */
  #goodsSearch>label,.goods-receive>label{flex:1 1 100%;width:100%;min-width:0}
  #goodsSearch input,.goods-receive input{width:100%;min-width:0}
  #goodsSearch>.btn,.goods-receive>.btn{flex:1 1 100%}
  #goodsSearch .goods-owner-filters{flex:1 1 100%;width:100%;min-width:0;flex-wrap:wrap}
  #goodsSearch .goods-owner-filters .btn{flex:1 1 86px;min-width:0}
  .goods-page .btn,.goods-modal .btn{max-width:100%;min-height:44px;white-space:normal;overflow-wrap:anywhere}
  .goods-page .toolbar>h2{flex:1 1 100%;min-width:0;margin:0;overflow-wrap:anywhere}
  .goods-modal-heading{flex-wrap:wrap}
  .goods-modal-heading h2{flex:1 1 180px;min-width:0;overflow-wrap:anywhere}
  .goods-modal .form{grid-template-columns:minmax(0,1fr)}
  .goods-modal .form>*,.goods-document>div,.goods-shipment .sheet-header>div{min-width:0;overflow-wrap:anywhere}
  .goods-modal .form input:not([type=checkbox]),.goods-modal .form select{width:100%;min-width:0;max-width:100%}
  .goods-document,.goods-shipment .sheet-header{flex-wrap:wrap}
  .goods-table-wrap{max-width:100%;min-width:0}
}

.distribution-intro h3{margin:8px 0;font-size:22px;overflow-wrap:anywhere}.distribution-progress{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;padding:16px;border:1px solid var(--border);border-radius:12px;background:var(--bg);margin:18px 0}.distribution-people,.distribution-edit-rows{display:grid;gap:12px}.distribution-person{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:16px;border:1px solid var(--border);border-radius:12px}.distribution-person>div{flex:1;min-width:0;overflow-wrap:anywhere}.distribution-person small{display:block;margin-top:6px;color:var(--muted)}.distribution-signature{width:100%;height:100px;object-fit:contain;background:white;border-radius:8px}.distribution-footer{margin-top:20px}.distribution-edit-row{display:flex;align-items:end;gap:10px}.distribution-edit-row label{display:flex;flex-direction:column;gap:6px;flex:1;min-width:0}.distribution-edit-row input{width:100%}.distribution-body .btn{min-height:44px;white-space:normal}.distribution-body{min-width:0}@media(max-width:650px){.distribution-edit-row{flex-wrap:wrap}.distribution-footer .btn{flex:1}.distribution-person>.btn{width:100%}}

.goods-petit-saut{display:flex;align-items:center;gap:8px;min-height:44px;margin-top:8px;cursor:pointer;white-space:normal}.goods-petit-saut input{flex-shrink:0;width:20px;height:20px}.goods-petit-saut span{font-size:12px}

.goods-document-complete{border-color:#369b6955;background:linear-gradient(#369b690d,#369b690d),var(--bg);box-shadow:inset 3px 0 #369b69aa}
.goods-document-partial{border-color:#d5a32166;background:linear-gradient(#d5a32110,#d5a32110),var(--bg);box-shadow:inset 3px 0 #d5a321bb}
.goods-document-untouched{border-color:#cf555555;background:linear-gradient(#cf55550c,#cf55550c),var(--bg);box-shadow:inset 3px 0 #cf5555aa}
