.sp-table{width:100%;border-collapse:collapse}
.sp-table th,.sp-table td{border:1px solid #e5e5e5;padding:8px;vertical-align:top;text-align:left}
.sp-table thead th{background:#fafafa}
.sp-parts-list{margin:0;padding-left:18px}
.sp-orderbar{display:flex;gap:8px;align-items:center;margin:8px 0}
.sp-orderbar .sp-search{flex:1;max-width:420px}
.sp-stock-yes{color:green;font-weight:600}
.sp-stock-no{color:#999}
.sp-msg{margin-top:10px;color:#333}
.sp-modal{position:fixed;left:0;top:0;right:0;bottom:0;z-index:9999}
.sp-modal-backdrop{position:absolute;left:0;top:0;right:0;bottom:0;background:rgba(0,0,0,.5)}
.sp-modal-dialog{position:relative;max-width:600px;margin:6% auto;background:#fff;border-radius:8px;overflow:hidden;box-shadow:0 10px 40px rgba(0,0,0,.2)}
.sp-modal-head{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;border-bottom:1px solid #eee}
.sp-modal-body{padding:12px 16px}
.sp-row{margin-bottom:10px}
.sp-row label{display:block;font-weight:600;margin-bottom:4px}
.sp-modal-foot{display:flex;align-items:center;gap:10px;padding:12px 16px;border-top:1px solid #eee}

/* --- Modal height & scroll tweaks --- */
.sp-modal-dialog{max-height:80vh;display:flex;flex-direction:column;}
.sp-modal-body{overflow-y:auto;max-height:calc(80vh - 120px);} /* account for header+footer */
@media (max-height:600px){
  .sp-modal-dialog{margin:3% auto;}
}

.sp-pos-list{margin:0;padding-left:0;list-style:none}
.sp-pos-list li{line-height:1.4}


/* Center modals to viewport (works on account & product pages) */
.sp-modal, .sp-modal-single{
  position: fixed;
    top: 50%;
    left: 50%;
    right: 0;
    bottom: 0;
    z-index: 10000;
    height: fit-content;
}
.sp-modal-backdrop{
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, .5);
    z-index: 9;
    width: 100%;
    height: 100%;
}
.sp-modal .sp-modal-dialog, .sp-modal-single .sp-modal-dialog{
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: min(800px, 95vw);
  max-height: 80vh;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.sp-modal .sp-modal-body, .sp-modal-single .sp-modal-body{
  overflow-y: auto;
  max-height: calc(80vh - 120px);
}


.sp-kit-row{display:flex;align-items:center;gap:.5rem;margin:.35rem 0}.sp-kit-row .sp-qty{width:80px}

.sp-model-image{max-width:100%;height:auto;display:block}.sp-model-image-wrap{text-align:left}
