:root{font-family:Inter,system-ui,-apple-system,sans-serif;color:#173047;background:#f0f5f7;--accent:#087d82;--line:#dbe6e9}*{box-sizing:border-box}body{margin:0}.hidden,[hidden]{display:none!important}a{color:#12676d;text-underline-offset:4px}button,input,select,textarea{font:inherit}button,a,input,select,textarea{touch-action:manipulation}button{cursor:pointer;border:1px solid #ccdce0;border-radius:10px;padding:10px 15px;background:#fff;color:#173047;font-weight:650;transition:background .16s,color .16s}button:hover:not(:disabled){background:#e6f4f3}button:active:not(:disabled){background:#cce9e7}button:disabled{opacity:.5;cursor:default}:focus-visible{outline:3px solid #e98e35;outline-offset:3px}.primary{background:var(--accent);color:white;border-color:var(--accent)}button.primary:hover{background:#065e63}.stock-top{background:#112d3b;color:#fff;min-height:76px;display:flex;align-items:center;gap:30px;padding:12px max(24px,calc((100% - 1400px)/2));}.stock-top>a{color:#d7e8ee}.stock-brand{display:flex;align-items:center;gap:10px;text-decoration:none;font-size:25px;font-weight:850;margin-right:auto}.stock-brand img{width:44px}.stock-brand small{display:block;font-size:10px;letter-spacing:.25em;color:#6bd4cc}.stock-top .auth-account-button{color:white}.stock-top .auth-account-copy small{color:#c0d6df}.stock-top .auth-menu{color:#173047}main{max-width:1448px;margin:auto;padding:32px 24px}.stock-hero{display:flex;justify-content:space-between;gap:30px;align-items:center;margin-bottom:24px}.eyebrow{font-size:10px;letter-spacing:.19em;font-weight:850;color:#52747e}h1{font-size:clamp(27px,3.1vw,45px);letter-spacing:-.04em;line-height:1.12;margin:12px 0}h1 em{font-style:normal;color:#087d82}p{line-height:1.5}.stock-hero p{color:#56707e;font-size:14px}.stock-context{background:#e4eeef;border:1px solid #cedfe1;border-radius:18px;padding:20px;min-width:280px;display:grid;gap:13px}.stock-context label{font-size:12px;font-weight:700;display:grid;gap:7px}.stock-context select{max-width:420px}.stock-context span{font-size:12px;color:#45646e}.stock-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin:24px 0}.stock-stat{background:white;border:1px solid var(--line);padding:20px;border-radius:16px;display:grid;gap:8px}.stock-stat b{font-size:32px;letter-spacing:-.05em;font-variant-numeric:tabular-nums}.stock-stat span{font-size:12px;color:#54717c}.stock-stat:first-child{background:#163e4c;color:#fff}.stock-stat:first-child span{color:#b7dedf}.stock-panel{background:#fff;border:1px solid var(--line);border-radius:20px;overflow:hidden;box-shadow:0 10px 40px #183b4d05}.stock-toolbar{padding:20px;display:flex;justify-content:space-between;gap:12px;align-items:center;border-bottom:1px solid var(--line)}.stock-tabs{display:flex;gap:6px}.stock-tabs button{border:0;background:#f0f5f6}.stock-tabs button[aria-pressed=true]{background:#d7efed;color:#075e61}.stock-search{padding:18px 20px;display:grid;gap:8px}.stock-search label{font-size:12px;font-weight:700;color:#486570}.stock-search>div{display:flex;gap:8px}.stock-search input{flex:1;min-width:100px}input,select,textarea{border:1px solid #c9dadf;border-radius:9px;background:white;padding:10px 12px;color:#173047;width:100%}.stock-table-wrap{overflow:auto}table{border-collapse:collapse;width:100%;font-size:13px}th{text-align:left;font-size:11px;text-transform:uppercase;letter-spacing:.05em;background:#f5f8f9;color:#56717d;padding:12px 20px;white-space:nowrap}td{padding:15px 20px;border-top:1px solid #edf2f4;vertical-align:middle}td small{display:block;color:#637b87;margin-top:5px;font-size:11px}td .stock-actions{display:flex;gap:6px;justify-content:flex-end}td button{font-size:11px;padding:7px 10px}td.stock-quantity{font-size:20px;font-weight:800;white-space:nowrap;font-variant-numeric:tabular-nums;color:#087278}.stock-quantity.is-zero{color:#7d8a92}.stock-type{display:inline-flex;padding:5px 9px;border-radius:7px;white-space:nowrap;font-size:11px;font-weight:750}.stock-type.receipt,.stock-type.return{background:#dff5ec;color:#126947}.stock-type.issue{background:#fff0dc;color:#885317}.stock-empty{text-align:center;padding:60px 20px;color:#5a7480}.stock-empty b{display:block;font-size:21px;margin-bottom:12px;color:#244958}.stock-pagination{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:18px 20px;border-top:1px solid var(--line);font-size:12px;color:#58727e}.stock-footnote,main>footer{font-size:11px;color:#68808b}#stockFeedback:not(:empty){padding:12px 16px;border-radius:10px;background:#e1eeef;margin:12px 0;color:#244d59}dialog{width:min(570px,calc(100% - 24px));border:1px solid #cbdde1;border-radius:20px;padding:0;color:#173047;max-height:92dvh}dialog::backdrop{background:#10273299;backdrop-filter:blur(4px)}dialog header,dialog footer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:18px 22px}dialog h2{font-size:20px;margin:0}dialog header{border-bottom:1px solid var(--line)}dialog footer{border-top:1px solid var(--line)}#stockFields{padding:20px 22px;display:grid;gap:16px}#stockFields label{font-size:12px;font-weight:700;display:grid;gap:7px}#stockFields small{font-weight:400;line-height:1.5;color:#58727d}#stockFormError{color:#a1273d;padding:0 22px;font-size:13px}.stock-item-context{background:#eaf4f3;padding:14px;border-radius:10px;line-height:1.5}.stock-item-context b{display:block}.stock-note{max-width:360px;overflow-wrap:anywhere}.stock-panel,dialog[open]{animation:stock-appear .18s ease-out}@keyframes stock-appear{from{opacity:0}to{opacity:1}}body[data-stock-paused=true] *,body[data-stock-paused=true] *::before{animation-play-state:paused!important}@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}@media(max-width:760px){main{padding:24px 12px}.stock-top{padding:12px 16px;gap:12px}.stock-top>a:not(.stock-brand){font-size:11px}.stock-top .auth-account-copy{display:none}.stock-hero{display:block}.stock-context{min-width:0;margin-top:20px}.stock-context select{max-width:100%}.stock-stats{grid-template-columns:repeat(2,1fr);gap:8px}.stock-stat{padding:15px}.stock-stat b{font-size:27px}.stock-toolbar{align-items:stretch;padding:14px;flex-wrap:wrap}.stock-search{padding:14px}.stock-search>div{flex-wrap:wrap}.stock-search input{flex-basis:100%}td,th{padding:12px}.stock-pagination{padding:14px}.stock-pagination button{padding:8px;font-size:11px}dialog header,dialog footer{padding:15px}#stockFields{padding:16px}.stock-note{min-width:180px}}
.stock-top .auth-account-button{background:#214552;border-color:#486774;color:#fff}.stock-top .auth-account-copy b{color:#fff}

/* App surface: one DOM for desktop tables and thumb-friendly mobile cards. */
.stock-top #authAccount{display:block;position:relative}.stock-top .auth-account-button{min-height:44px}
.stock-app-bar{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:8px 0 20px;padding:12px 16px;border:1px solid #cfe3df;background:#e4f2ee;border-radius:14px;font-size:12px;color:#245b50}
.stock-app-bar>div{display:flex;gap:8px;flex-wrap:wrap}.stock-app-bar button{font-size:12px;min-height:44px}
#stockConnection::before{content:"";display:inline-block;width:8px;height:8px;margin-right:8px;border-radius:50%;background:#13805c}
body[data-stock-offline=true] .stock-app-bar{background:#fff2dc;border-color:#edd5a6;color:#76511c}body[data-stock-offline=true] #stockConnection::before{background:#c28222}
body[data-stock-offline=true] .stock-item-context{display:none}
.stock-product{overflow-wrap:anywhere;max-width:550px}.stock-quantity small{display:inline;font-size:12px;font-weight:500}.stock-actions button{min-height:44px}
[data-stock-action=receipt]{border-color:#b9dcd4;color:#07695a;background:#edf8f4}[data-stock-action=issue]{border-color:#e8d5b4;background:#fff8ea;color:#805115}
#stockContent[aria-busy=true]{opacity:.6;transition:opacity .12s}#stockForm{display:flex;flex-direction:column;max-height:90dvh}
#stockForm header{flex:none}#stockFields{overflow:auto;overscroll-behavior:contain}#stockForm footer{flex:none;background:#fff;position:sticky;bottom:0}#stockFormError{flex:none;margin:0;padding-bottom:12px}#stockFormError:empty{display:none}
#stockFields input,#stockFields select,#stockFields textarea{font-size:16px;min-height:48px}#stockFields input[name=quantity]{font-size:28px;font-variant-numeric:tabular-nums;padding:12px 14px;background:#f5faf9;border-color:#83bdb5}
#stockFields label{font-size:13px}#stockSubmit{min-height:48px}#stockDialog[data-kind=issue] #stockSubmit{background:#8b5a16;border-color:#8b5a16}
.stock-install-copy{padding:4px 22px 22px;font-size:14px;line-height:1.6}.stock-install-copy ol{padding-left:20px}.stock-install-copy li{margin:14px 0}.stock-install-note{padding:14px;background:#eaf3f1;border-radius:10px;font-size:12px}
@media(display-mode:standalone){.stock-top>a:not(.stock-brand){font-size:12px}.stock-hero h1{font-size:32px}.stock-app-bar{margin-top:0}.stock-top{padding-top:max(12px,env(safe-area-inset-top))}}
@media(max-width:760px){
  main{padding:18px 12px calc(100px + env(safe-area-inset-bottom))}.stock-top{min-height:64px;padding:10px 14px}.stock-brand{font-size:21px}.stock-brand img{width:36px}
  .stock-top>a:not(.stock-brand){display:none}.stock-hero{margin-bottom:16px}.stock-hero .eyebrow{font-size:9px}.stock-hero h1{font-size:29px;margin:8px 0}.stock-hero h1 br{display:none}.stock-hero h1 em{display:none}.stock-hero p{font-size:12px;margin:10px 0;overflow-wrap:anywhere}
  .stock-context{padding:12px 14px;border-radius:14px;margin-top:12px;grid-template-columns:1fr auto;gap:10px;align-items:center}.stock-context label{grid-column:1 / -1}.stock-context select{font-size:16px;min-height:44px}.stock-context a,.stock-context span{font-size:11px}
  .stock-app-bar{display:block;font-size:11px;padding:10px 12px}.stock-app-bar>div{margin-top:10px}.stock-app-bar button{padding:9px 12px;font-size:11px}.stock-stats{gap:7px;margin:14px 0}.stock-stat{padding:12px 14px;gap:3px;border-radius:12px}.stock-stat b{font-size:25px}.stock-stat span{font-size:10px}
  .stock-panel{border:0;border-radius:14px;background:transparent;overflow:visible;box-shadow:none}.stock-toolbar{position:fixed;bottom:0;left:0;right:0;z-index:20;display:flex;flex-wrap:nowrap;padding:10px 12px calc(10px + env(safe-area-inset-bottom));border-top:1px solid #cbdde0;background:#fffffff5;box-shadow:0 -6px 30px #1730470b;gap:8px}.stock-tabs{flex:1;display:flex;gap:6px}.stock-tabs button{flex:1;min-height:48px;font-size:12px;padding:10px 8px}.stock-tabs button[aria-pressed=true]{background:#163e4c;color:#fff}#stockAdd{min-height:48px;font-size:12px;padding:10px 12px}
  .stock-search{background:#fff;border:1px solid var(--line);border-radius:14px;margin-bottom:12px;padding:12px}.stock-search input{font-size:16px;min-height:48px}.stock-search button{min-height:44px;flex:1}.stock-search>div{gap:8px}
  .stock-table-wrap{overflow:visible}.stock-table-wrap table,.stock-table-wrap tbody{display:block;width:100%}.stock-table-wrap thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
  .stock-table-wrap tr{display:flex;flex-wrap:wrap;gap:0 16px;background:#fff;border:1px solid #d4e3e6;border-radius:16px;margin-bottom:10px;padding:14px;box-shadow:0 3px 12px #17304703}
  .stock-table-wrap td{display:block;border:0;padding:6px 0;min-width:0;font-size:13px;overflow-wrap:anywhere}.stock-table-wrap .stock-product{flex:1 0 100%;max-width:100%;font-size:15px;padding-top:0}.stock-product small{font-size:11px}.stock-table-wrap [data-label]::before{content:attr(data-label);display:block;font-size:10px;font-weight:550;color:#637b87;margin-bottom:4px}.stock-table-wrap td.stock-quantity{margin-left:auto;font-size:27px;text-align:right;padding-top:2px}.stock-table-wrap td.stock-quantity small{font-size:13px}
  .stock-table-wrap .stock-row-actions{flex:1 0 100%;padding:12px 0 0}.stock-table-wrap .stock-row-actions:empty{display:none}.stock-actions{display:grid!important;grid-template-columns:1.4fr 1fr auto;gap:7px!important}.stock-actions button{font-size:11px;padding:8px}.stock-actions button:only-child{grid-column:1/-1}.stock-row-actions>button{min-height:44px;width:100%}
  .stock-movement-list td:first-child{flex:1 0 100%;display:grid;grid-template-columns:1fr auto;align-items:center;padding-top:0;margin-bottom:8px}.stock-movement-list td:first-child small:last-child{grid-column:1/-1}.stock-type{justify-self:start}.stock-movement-list .stock-product{font-size:14px}.stock-movement-list .stock-note{min-width:0;max-width:100%;flex:1 0 100%}.stock-movement-list td[data-label="Рух"]{font-size:21px;font-weight:750;color:#087278}
  .stock-pagination{padding:14px 0;font-size:11px;border:0}.stock-pagination button{min-height:44px;font-size:11px;padding:8px}.stock-footnote{line-height:1.6}.stock-empty{padding:35px 20px;background:#fff;border-radius:14px;border:1px dashed #bed4d9}.stock-empty b{font-size:19px}
  #stockDialog{width:100%;max-width:none;max-height:95dvh;margin:auto 0 0;border-radius:22px 22px 0 0;border-bottom:0}#stockForm{max-height:93dvh}#stockForm footer{padding:12px 16px calc(12px + env(safe-area-inset-bottom));gap:8px}#stockForm footer button{min-height:48px}#stockSubmit{flex:1;font-size:13px}#stockFields{padding:16px;gap:18px}dialog h2{font-size:18px}#stockFormError{padding:0 16px 12px;font-size:12px}
}
@media(max-width:359px){.stock-actions{grid-template-columns:1fr 1fr}.stock-actions button:last-child{grid-column:1/-1}.stock-tabs button,#stockAdd{font-size:10px}}
@media(max-width:900px){.stock-top .auth-account-copy{display:block;position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}}
