/* Compact row controls; quantity editing lives in a native top-layer dialog. */
.weight-items{padding:0;min-width:0;background:transparent;border:0;margin-bottom:8px}
.weight-items>[data-quantity-fields][hidden]{display:none!important}
[data-quantity-open]{display:flex;justify-content:space-between;align-items:center;gap:12px;width:100%;min-height:46px;padding:9px 12px;border:1px solid #bddbd6;border-radius:10px;background:#f1f9f6;color:#176b62;text-align:left;font:inherit;font-weight:650;cursor:pointer}
[data-quantity-open] small{display:block;font-size:11px;font-weight:400;color:#607e7c;margin-top:3px}
[data-quantity-open]:hover{border-color:#249b8c;background:#e9f6f1}
.weight-items.has-items [data-quantity-open]{border-color:#249b8c}
.weight-history th[data-edit-heading],.weight-history td:has(>[data-edit-weight]){min-width:88px;width:88px;box-sizing:content-box;white-space:nowrap;overflow-wrap:normal;word-break:normal;text-align:center}
.weight-history button[data-edit-weight]{display:inline-flex;align-items:center;justify-content:center;min-width:70px;width:auto;min-height:40px;padding:9px 16px;white-space:nowrap;overflow-wrap:normal;word-break:keep-all;flex-shrink:0;line-height:1.2}
.weight-quantity-dialog{width:min(720px,calc(100vw - 24px));max-width:calc(100vw - 24px);max-height:calc(100dvh - 32px);padding:0;border:1px solid #c9dcdf;border-radius:18px;background:white;color:#233e48;box-shadow:0 24px 80px #122f4140;overflow:hidden;box-sizing:border-box}
.weight-quantity-dialog::backdrop{background:#122f4166;backdrop-filter:blur(3px)}
.weight-quantity-dialog form{display:flex;flex-direction:column;max-height:calc(100dvh - 34px);margin:0}
.weight-quantity-dialog header{display:flex;justify-content:space-between;align-items:start;gap:16px;padding:22px 24px 16px;border-bottom:1px solid #e0ecec;background:#f5faf9;flex-shrink:0}
.weight-quantity-dialog header small{font-size:10px;letter-spacing:1.2px;font-weight:700;color:#168377}
.weight-quantity-dialog h2{font-size:22px;margin:6px 0 8px}.weight-quantity-dialog p{font-size:13px;line-height:1.5;margin:0;color:#607a83}
.weight-quantity-dialog header button{width:34px;min-height:34px;padding:0;border:1px solid #d5e5e6;border-radius:50%;background:white;color:#476572;font-size:22px;cursor:pointer}
.weight-quantity-body{padding:20px 24px;overflow-y:auto;min-height:0;overscroll-behavior:contain}
.weight-quantity-dialog .weight-item-grid{min-width:0;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.weight-quantity-dialog label{display:grid;gap:6px;font-size:12px;font-weight:600;color:#476572}
.weight-quantity-dialog input{width:100%;min-width:0;box-sizing:border-box;border:1px solid #cadbdf;border-radius:8px;padding:10px 12px;min-height:44px;font:inherit;background:#fff;color:#233e48;font-variant-numeric:tabular-nums}
.weight-quantity-dialog input:focus-visible,[data-quantity-open]:focus-visible,.weight-quantity-dialog button:focus-visible{outline:2px solid #168c7c;outline-offset:2px}
.weight-quantity-dialog footer{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:16px 24px;border-top:1px solid #e0ecec;background:#f5faf9;flex-shrink:0}
.weight-quantity-dialog footer small{max-width:260px;font-size:11px;line-height:1.5;color:#607a83}.weight-quantity-dialog footer>div{display:flex;gap:10px;flex-shrink:0}
@media(max-width:600px){.weight-quantity-dialog header{padding:18px}.weight-quantity-body{padding:18px}.weight-quantity-dialog .weight-item-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.weight-quantity-dialog input{font-size:16px}.weight-quantity-dialog footer{padding:14px 18px;align-items:stretch;flex-direction:column;gap:10px}.weight-quantity-dialog footer small{max-width:none}.weight-quantity-dialog footer>div{justify-content:flex-end}.weight-quantity-dialog footer button{flex:1}}
