.stock-operations{display:grid;grid-template-columns:minmax(0,1fr);gap:22px;min-width:0;max-width:100%;color:var(--text);--stock-green:var(--result-good,#96dfbc);--stock-red:var(--result-bad,#ff9ea4);--stock-blue:#a8d1ff}.stock-operations>*{min-width:0}.stock-heading{display:flex;align-items:center;justify-content:space-between;gap:20px}.stock-heading h2{font-size:clamp(28px,3vw,39px);letter-spacing:-1.4px;font-weight:500;margin:9px 0 12px}.stock-heading p{font-size:13px;color:var(--muted);margin:0;line-height:1.7}.stock-heading>.section-link{font-size:12px;white-space:nowrap}.stock-notice{border:1px solid #7b613c;background:#40301e55;color:#efc39d;border-radius:14px;padding:14px 18px;font-size:12px;line-height:1.75;margin:0}.stock-status{font-size:13px;line-height:1.7;margin:0}.stock-status:empty{display:none}.stock-error{color:var(--stock-red,var(--result-bad,#ff9ea4))!important}.stock-positive{color:var(--stock-green,var(--result-good,#96dfbc))!important}.stock-negative{color:var(--stock-red,var(--result-bad,#ff9ea4))!important}.stock-count{color:var(--stock-blue,#a8d1ff)!important}
.stock-actions{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}.stock-actions>button{display:flex;align-items:center;gap:12px;border:1px solid #5d7c9d;background:linear-gradient(130deg,#193b60,#172b43);color:#f1f5ff;text-align:left;padding:19px 15px;border-radius:17px;cursor:pointer;transition:transform .2s,border-color .2s,box-shadow .2s;min-width:0}.stock-actions>button:nth-child(2){background:linear-gradient(130deg,#413362,#2c2645);border-color:#8b78b0}.stock-actions>button:nth-child(3){background:linear-gradient(130deg,#263f4e,#1d303c);border-color:#5b8397}.stock-actions>button:nth-child(4){background:linear-gradient(130deg,#50313d,#35252d);border-color:#a46a80}.stock-actions>button:nth-child(5){background:linear-gradient(130deg,#29453c,#1b302a);border-color:#618d79}.stock-actions svg{width:24px;height:24px;flex:none}.stock-actions strong{display:block;font-size:13px;font-weight:500;line-height:1.5}.stock-actions small{display:block;font-size:10px;color:#d1d3df;line-height:1.6;margin-top:4px}.stock-actions>button>span:last-child{margin-left:auto;align-self:flex-start;opacity:.6}.stock-actions>button:hover:not(:disabled){transform:translateY(-3px);box-shadow:0 8px 24px #0002;border-color:#c6b4e8}
body:has(.shell) .stock-ledger.card{background:var(--panel)!important;border-color:var(--line)!important;padding:24px;border-radius:22px;min-width:0;overflow:visible}.stock-ledger-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:23px}.stock-ledger-heading h3{font-size:20px;font-weight:500;margin:0 0 8px;letter-spacing:-.5px}.stock-ledger-heading p,.stock-ledger-count{font-size:11px;color:var(--muted);line-height:1.7;margin:0}.stock-backup{display:flex;gap:18px;font-size:12px;align-items:center}.stock-backup label{cursor:pointer}.stock-disabled{opacity:.45;cursor:default!important}.stock-filters{display:flex;gap:12px;align-items:end;flex-wrap:wrap;padding:17px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);margin-bottom:8px}.stock-filters>label:first-child{flex:1;min-width:220px}.stock-filters>label:nth-child(2){max-width:310px}.stock-operations label,.stock-plan-dialog label{display:grid;gap:8px;font-size:11px;color:var(--muted);line-height:1.5;min-width:0}.stock-operations :is(input,select),.stock-plan-dialog :is(input,select,textarea){font:inherit;font-size:13px;min-width:0;max-width:100%;box-sizing:border-box;background:var(--bg,#111315);color:var(--text);border:1px solid var(--line);border-radius:10px;padding:11px 12px;line-height:1.5}.stock-operations .table-wrap{min-width:0;max-width:100%;overflow-x:auto}.stock-operations table{width:100%;border-collapse:collapse;font-size:12px}.stock-operations :is(td,th){text-align:left;vertical-align:middle;padding:16px 12px;border-bottom:1px solid var(--line)}.stock-operations th{font-size:10px;letter-spacing:.5px;color:var(--muted);font-weight:500;text-transform:uppercase;white-space:nowrap}.stock-operations td strong{font-weight:500;display:block;max-width:240px;line-height:1.6}.stock-operations td small{display:block;line-height:1.6;color:var(--muted);font-size:10px;margin-top:5px}.stock-quantity{font-variant-numeric:tabular-nums;white-space:nowrap}.stock-draft{padding:5px 10px;border:1px solid #6d85a0;border-radius:20px;background:#264a6e33;color:#b5d3f6;font-size:10px;white-space:nowrap}.stock-ledger-count{margin-top:20px}.stock-empty{padding:22px 0}.stock-empty strong{font-size:14px;font-weight:500;max-width:none!important}.stock-empty p{font-size:12px;color:var(--muted);line-height:1.7}.stock-delete{display:block;margin-top:9px;font-size:10px!important;color:var(--muted)!important}.stock-delete-confirm{display:grid;gap:10px;min-width:140px;margin-top:12px;padding-top:12px;border-top:1px solid var(--line)}.stock-delete-confirm span{font-size:10px;color:var(--muted)}
.stock-plan-dialog{width:min(760px,94vw);max-width:94vw;max-height:90dvh;border:1px solid var(--line);border-radius:24px;background:var(--panel,#191d21);color:var(--text);padding:0;box-sizing:border-box;box-shadow:0 30px 100px #0008;overflow:auto;--stock-green:var(--result-good,#96dfbc);--stock-red:var(--result-bad,#ff9ea4);--stock-blue:#a8d1ff}.stock-plan-dialog::backdrop{background:#070a0dc4;backdrop-filter:blur(7px)}.stock-plan-dialog>header{position:sticky;top:0;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:20px 25px;background:var(--panel,#191d21);border-bottom:1px solid var(--line)}.stock-plan-dialog>header .overline{font-size:9px}.stock-plan-dialog h2{font-size:23px;font-weight:500;letter-spacing:-.6px;margin:8px 0 0}.stock-close{width:34px;height:34px;border:1px solid var(--line);border-radius:50%;font-size:22px;background:transparent;color:var(--text);cursor:pointer;flex:none}.stock-dialog-body{padding:24px}.stock-plan-dialog fieldset{padding:0;margin:0;border:0;min-width:0}.stock-form-section{margin-bottom:25px}.stock-form-section>.overline{display:block;margin-bottom:15px;color:var(--muted);font-size:9px}.stock-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}.stock-wide{grid-column:1/-1}.stock-fields label:first-child:last-child{grid-column:1/-1}.stock-plan-dialog select{width:100%}.stock-plan-dialog :is(input,textarea){width:100%}.stock-receipt-context{border:1px solid #756591;background:linear-gradient(120deg,#6d4f9922,#274d8022);border-radius:13px;padding:15px;line-height:1.7}.stock-receipt-context strong{font-size:13px;font-weight:500}.stock-receipt-context p{margin:7px 0;font-size:12px}.stock-receipt-context small{font-size:10px;color:var(--muted)}.stock-advanced{margin:0 0 24px;border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:17px 0}.stock-advanced summary{font-size:12px;color:var(--muted);cursor:pointer}.stock-advanced[open] summary{margin-bottom:18px}.stock-preview{border:1px solid #5b6b80;background:linear-gradient(130deg,#26446344,#4b365d22);border-radius:16px;padding:19px}.stock-preview-numbers{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}.stock-preview-numbers>div{display:grid;gap:10px}.stock-preview-numbers span{font-size:10px;color:var(--muted);line-height:1.6}.stock-preview-numbers strong{font-size:23px;font-weight:500;letter-spacing:-.5px}.stock-preview-numbers strong small{font-size:11px;letter-spacing:0}.stock-preview p{font-size:11px;color:var(--muted);line-height:1.8;margin:16px 0 0}.stock-preview>p:only-child{margin:0}.stock-form-footer{display:flex;gap:12px;flex-wrap:wrap;margin-top:20px}.stock-dialog-status{font-size:12px;line-height:1.7;margin:16px 0 0}.stock-dialog-status:empty{display:none}.stock-local-note{font-size:10px;line-height:1.8;color:var(--muted);margin:16px 0 0}.stock-operations :is(button,a,input,select):focus-visible,.stock-plan-dialog :is(button,input,select,textarea,summary):focus-visible{outline:2px solid #bd9ceb;outline-offset:3px}.stock-operations button:disabled,.stock-plan-dialog button:disabled{opacity:.45;cursor:default}.stock-plan-dialog fieldset:disabled{opacity:.7}.stock-operations [hidden],.stock-plan-dialog [hidden]{display:none!important}
html[data-theme=light] .stock-operations,html[data-theme=light] .stock-plan-dialog{--stock-green:#267147;--stock-red:#aa3843;--stock-blue:#225f98}html[data-theme=light] .stock-notice{color:#7d4c22;background:#fff0df;border-color:#cfad87}html[data-theme=light] .stock-draft{color:#315d8c;background:#e8f1fb;border-color:#a6bdd8}html[data-theme=light] .stock-preview{background:linear-gradient(130deg,#edf4ff,#f4effa);border-color:#b4bfd0}html[data-theme=light] .stock-receipt-context{background:#f4eefb;border-color:#bfb0d3}html[data-theme=light] body.auth-ready #content .stock-operations .section-link{color:#67527e!important}html[data-theme=light] body.auth-ready #content .stock-operations .section-link.stock-negative{color:#aa3843!important}
@media(max-width:1150px){.stock-actions{grid-template-columns:repeat(3,minmax(0,1fr))}.stock-actions>button{padding:18px}}@media(max-width:700px){.stock-heading{flex-direction:column;align-items:start}.stock-actions{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.stock-actions>button{padding:16px 13px;gap:9px}.stock-actions svg{width:20px;height:20px}.stock-actions small{font-size:9px}.stock-ledger-heading{align-items:start;flex-direction:column}.stock-filters{align-items:stretch}.stock-filters>label{flex:1;min-width:130px;max-width:none!important}.stock-filters>label:first-child{flex-basis:100%;min-width:0}.stock-filters>.button{width:100%}body:has(.shell) .stock-ledger.card{padding:18px}.stock-plan-dialog{width:96vw;max-width:96vw;max-height:94dvh;border-radius:18px}.stock-plan-dialog>header,.stock-dialog-body{padding:18px}.stock-fields{grid-template-columns:1fr}.stock-wide{grid-column:auto}.stock-preview-numbers{grid-template-columns:1fr;gap:18px}.stock-form-footer .button{width:100%}.stock-backup{gap:25px}.stock-notice{padding:13px 15px}.stock-heading h2{font-size:31px}}
@media(prefers-reduced-motion:reduce){.stock-actions>button{transition:none;transform:none!important}}
.stock-ledger td:last-child,.stock-ledger th:last-child{position:sticky;right:0;z-index:1;background:var(--panel,#191d21);min-width:78px}.stock-ledger td:last-child{box-shadow:-8px 0 12px -10px #0008}.stock-ledger td:last-child .section-link{white-space:nowrap}
.stock-search-results:empty{display:none}.stock-search-results{display:grid;gap:5px;max-height:240px;overflow:auto;border:1px solid var(--line);border-radius:10px;background:var(--bg);padding:6px}.stock-search-results button{padding:10px 12px;text-align:left;font:inherit;font-size:12px;border-radius:7px;white-space:normal}.stock-search-results button:hover,.stock-search-results button:focus-visible{background:#547cab33}.stock-current-values{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:16px 0}.stock-current-values>span{padding:13px;border:1px solid #5d749255;background:#24446424;border-radius:11px;font-size:11px;color:var(--muted)}.stock-current-values strong{display:block;font-size:22px;font-weight:500;color:var(--text);margin-top:9px}@media(max-width:550px){.stock-current-values{grid-template-columns:1fr}}
