/* Paylo 1.0.11 inventory UI — isolated, follows original Paylo theme variables */
.pstock-overlay{position:fixed;inset:0;display:none;z-index:100050;background:rgba(0,0,0,.58);align-items:center;justify-content:center;direction:rtl;color:var(--text);font:inherit}.pstock-overlay.open{display:flex}
.pstock-panel{display:flex;flex-direction:column;width:min(97vw,600px);height:min(92dvh,870px);background:var(--surface);border:1px solid var(--line);border-radius:18px;box-shadow:var(--shadow);overflow:hidden}.pstock-panel header{display:flex;justify-content:space-between;align-items:center;gap:8px;border-bottom:1px solid var(--line);padding:13px 16px}.pstock-panel header strong{font-size:16px}.pstock-panel header button{border:0;background:none;font:inherit;color:inherit;font-size:18px;min-width:32px;min-height:32px;cursor:pointer}
.pstock-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;padding:8px 10px;border-bottom:1px solid var(--line)}.pstock-tabs button{min-width:0;border:1px solid var(--line);border-radius:9px;padding:9px 3px;background:var(--surface-2);color:var(--text-2);font:inherit;font-size:11px;cursor:pointer}.pstock-tabs button.active{border-color:var(--brand);color:var(--brand);background:var(--brand-soft);font-weight:800}
.pstock-scroll{overflow-y:auto;min-height:0;flex:1;padding:12px 16px calc(22px + env(safe-area-inset-bottom));overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:var(--brand) transparent;-webkit-overflow-scrolling:touch}.pstock-help{font-size:12px;line-height:1.8;color:var(--text-2);margin:0 0 10px}.pstock-section[hidden]{display:none!important}.pstock-section label{font-size:12px;display:block;font-weight:750;margin:8px 0}.pstock-section input,.pstock-section select,.pstock-section textarea{box-sizing:border-box;width:100%;display:block;margin-top:5px;min-height:39px;padding:8px 10px;border:1px solid var(--line-2);background:var(--surface);color:var(--text);font:inherit;font-size:13px;border-radius:9px}.pstock-section textarea{resize:vertical;min-height:66px}.pstock-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.pstock-action{border:0;min-height:43px;border-radius:10px;background:var(--brand);color:#fff;padding:10px 14px;font:inherit;font-weight:800;cursor:pointer;margin:10px 0;width:100%}.pstock-overlay.busy .pstock-action{opacity:.65;pointer-events:none}.pstock-summary,.pstock-available{padding:10px 12px;border:1px solid var(--line);background:var(--surface-2);border-radius:10px;font-size:12px;line-height:1.6;margin:10px 0}.pstock-list{display:grid;gap:8px}.pstock-card{border:1px solid var(--line);border-radius:11px;padding:10px 12px;background:var(--surface-2);display:grid;gap:4px;font-size:12px;overflow-wrap:anywhere}.pstock-card strong{font-size:13px}.pstock-card span{color:var(--text-2);line-height:1.6}.pstock-card small{color:var(--muted)}.pstock-card button{border:1px solid var(--brand);background:var(--brand-soft);color:var(--brand);font:inherit;padding:8px 10px;border-radius:9px;justify-self:start;cursor:pointer}.pstock-warn{color:var(--orange)!important;font-weight:800}.pstock-muted{font-size:11px;color:var(--muted);padding:8px}
.pstock-picks{max-height:170px;overflow:auto;border-radius:10px;scrollbar-width:thin;scrollbar-color:var(--brand) transparent;display:grid;gap:3px}.pstock-picks:empty{display:none}.pstock-picks button{padding:8px;text-align:right;background:var(--surface-2);color:var(--text);border:1px solid var(--line);border-radius:8px;font:inherit;font-size:12px;cursor:pointer}.pstock-picks small{color:var(--muted);padding:7px}#pstockMessage{font-size:12px;line-height:1.8;min-height:24px;margin:12px 0;color:var(--green)}#pstockMessage[data-error=true]{color:var(--red)}
@media(max-width:420px){.pstock-panel{height:97dvh;width:100%;border-radius:15px 15px 0 0;align-self:flex-end}.pstock-scroll{padding:10px 12px calc(20px + env(safe-area-inset-bottom))}.pstock-tabs{gap:3px}.pstock-tabs button{font-size:10px;padding:9px 2px}}

/* 1.0.12: dedicated stock-cost editing panel (RTL, scrollable). */
.pstock-price-editor{margin:12px 0;border:1px solid var(--line);background:var(--surface-2);border-radius:12px;padding:12px}.pstock-price-editor[hidden]{display:none!important}.pstock-price-editor strong{color:var(--text);font-size:13px}.pstock-tabs{grid-template-columns:repeat(5,minmax(0,1fr))}.pstock-list .pstock-card button[data-price-item]{margin-top:4px}.pstock-available{overflow-wrap:anywhere}@media(max-width:430px){.pstock-tabs button{font-size:9.5px;padding:8px 1px}}

/* 1.0.14: stable scrolling/viewport for management and inbound/outbound forms. */
.pstock-panel{min-height:0;max-height:calc(100dvh - 12px)}
.pstock-tabs{display:flex;align-items:stretch;overflow-x:auto;overflow-y:hidden;flex-wrap:nowrap;scrollbar-width:thin;scrollbar-color:var(--brand) transparent;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}
.pstock-tabs button{flex:1 0 92px;white-space:normal;line-height:1.35;min-height:42px}
.pstock-scroll{overflow-x:hidden;scrollbar-gutter:stable;touch-action:pan-y}
.pstock-scroll::-webkit-scrollbar,.pstock-picks::-webkit-scrollbar{width:7px;height:5px}
.pstock-scroll::-webkit-scrollbar-thumb,.pstock-picks::-webkit-scrollbar-thumb{background:var(--brand);border-radius:8px}
.pstock-section{min-width:0}.pstock-grid>*{min-width:0}
.pstock-section input:focus-visible,.pstock-section textarea:focus-visible,.pstock-section select:focus-visible{outline:2px solid var(--brand);outline-offset:1px}
@media(max-width:430px){.pstock-panel{height:100dvh;max-height:100dvh;border-radius:0;align-self:stretch}.pstock-tabs button{flex:0 0 108px;font-size:11px;padding:10px 5px}.pstock-scroll{padding-bottom:calc(28px + env(safe-area-inset-bottom))}.pstock-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:350px){.pstock-grid{grid-template-columns:1fr}}
