/* Morpheus PD Central V135.9.2 — isolated Stock page stability and form UX */
body.mpd-stock-command-active{overscroll-behavior-y:none}
body.mpd-stock-command-active #main{overflow-anchor:none;scroll-behavior:auto}
body.mpd-stock-command-active .mpd-stock-command{contain:layout style;isolation:isolate}
.mpd-stock-page-v13510{padding-top:0!important}
.mpd-stock-page-v13510,.mpd-stock-page-v13510 *{min-width:0}
.mpd-stock-page-v13510 .mpd-stock-hero{border-radius:24px;padding:22px;box-shadow:0 16px 40px rgba(15,23,42,.08)}
.mpd-stock-page-v13510 .mpd-stock-hero-actions .btn{min-height:44px;border-radius:14px;padding-inline:15px}
.mpd-stock-page-v13510 .mpd-stock-headline-strip article{min-height:92px;display:flex;flex-direction:column;justify-content:center}
.mpd-stock-page-v13510 [data-stock-stable-card]{transform:translateZ(0);backface-visibility:hidden}
.mpd-stock-page-v13510 .mpd-stock-filterbar{position:sticky;top:8px;z-index:12;box-shadow:0 10px 26px rgba(15,23,42,.06);backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px)}
.mpd-stock-page-v13510 .mpd-stock-filterbar select,.mpd-stock-page-v13510 .mpd-stock-search{min-height:44px}
.mpd-stock-page-v13510 .mpd-stock-tabs{position:relative;z-index:3;padding-block:4px 8px}
.mpd-stock-page-v13510 .mpd-stock-content{min-height:320px}
.mpd-stock-page-v13510 .mpd-stock-row-main,.mpd-stock-page-v13510 .mpd-stock-company-list>button,.mpd-stock-page-v13510 .mpd-stock-summary-card{touch-action:manipulation}
.mpd-stock-page-v13510 .mpd-stock-row-main:focus-visible,.mpd-stock-page-v13510 .mpd-stock-company-list>button:focus-visible,.mpd-stock-page-v13510 .mpd-stock-summary-card:focus-visible,.mpd-stock-page-v13510 .mpd-stock-tabs button:focus-visible{outline:3px solid color-mix(in srgb,var(--stk-accent,#2f7df6) 34%,transparent);outline-offset:2px}

#mpdStockModalHost.mpd-stock-modal-host-v13510{position:fixed;inset:0;z-index:1000005}
.mpd-stock-modal-host-v13510 .mpd-stock-modal-backdrop{position:fixed;inset:0;display:grid;place-items:center;padding:22px;background:rgba(5,12,24,.58);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);overflow:hidden}
.mpd-stock-modal-host-v13510 .mpd-stock-modal-v13510{width:min(820px,calc(100vw - 32px));max-height:min(860px,calc(100dvh - 34px));display:grid;grid-template-rows:auto minmax(0,1fr) auto;overflow:hidden;border:1px solid color-mix(in srgb,var(--stk-accent,#2f7df6) 18%,var(--stk-line,#dbe3ed));border-radius:26px;background:var(--stk-card,var(--card,#fff));color:var(--stk-text,var(--text,#122033));box-shadow:0 30px 90px rgba(2,8,23,.38)}
.mpd-stock-modal-host-v13510 .mpd-stock-modal-v13510>header{position:relative;display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:20px 22px 18px;border-bottom:1px solid var(--stk-line,var(--line,#dbe3ed));background:linear-gradient(145deg,color-mix(in srgb,var(--stk-card,var(--card,#fff)) 93%,var(--stk-accent,#2f7df6) 7%),var(--stk-card,var(--card,#fff)));z-index:2}
.mpd-stock-modal-host-v13510 .mpd-stock-modal-v13510>header h2{margin:5px 0 4px;font-size:clamp(23px,3vw,31px);line-height:1.02;letter-spacing:-.045em}
.mpd-stock-modal-host-v13510 .mpd-stock-modal-v13510>header p{margin:0;max-width:620px;color:var(--stk-muted,var(--muted,#66758a));font-size:13px;line-height:1.45}
.mpd-stock-modal-host-v13510 .mpd-stock-modal-close{flex:0 0 auto;width:42px;height:42px;display:grid;place-items:center;border:1px solid var(--stk-line,var(--line,#dbe3ed));border-radius:14px;background:var(--stk-panel,var(--panel,#f5f8fc));color:var(--stk-text,var(--text,#122033));font-size:26px;line-height:1;cursor:pointer}
.mpd-stock-modal-host-v13510 .mpd-stock-modal-close:hover{border-color:color-mix(in srgb,var(--stk-accent,#2f7df6) 38%,var(--stk-line,#dbe3ed));color:var(--stk-accent,#2f7df6)}
.mpd-stock-modal-host-v13510 .mpd-stock-modal-body{min-height:0;overflow:auto;padding:18px 20px 22px;overscroll-behavior:contain;scrollbar-gutter:stable}
.mpd-stock-modal-host-v13510 .mpd-stock-modal-v13510>footer{position:relative;display:flex;align-items:center;justify-content:flex-end;gap:10px;padding:14px 20px calc(14px + env(safe-area-inset-bottom));border-top:1px solid var(--stk-line,var(--line,#dbe3ed));background:color-mix(in srgb,var(--stk-card,var(--card,#fff)) 96%,var(--stk-panel,var(--panel,#f5f8fc)) 4%);z-index:2}
.mpd-stock-modal-host-v13510 .mpd-stock-modal-v13510>footer .btn{min-height:44px;padding-inline:16px;border-radius:14px;font-weight:900}

.mpd-stock-form-v13510{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important;align-items:start}
.mpd-stock-form-v13510>.full,.mpd-stock-form-v13510>label.full,.mpd-stock-form-v13510>.mpd-stock-form-section,.mpd-stock-form-v13510>.mpd-stock-product-context{grid-column:1/-1!important}
.mpd-stock-form-v13510 .mpd-stock-form-section{display:flex;align-items:end;justify-content:space-between;gap:14px;margin:8px 0 -2px;padding:0 2px 7px;border-bottom:1px solid var(--stk-line,var(--line,#dbe3ed))}
.mpd-stock-form-v13510 .mpd-stock-form-section:first-child{margin-top:0}
.mpd-stock-form-v13510 .mpd-stock-form-section span{color:var(--stk-text,var(--text,#122033));font-size:13px;font-weight:950;letter-spacing:.02em}
.mpd-stock-form-v13510 .mpd-stock-form-section small{max-width:430px;color:var(--stk-muted,var(--muted,#66758a));font-size:10.5px;line-height:1.35;text-align:right}
.mpd-stock-form-v13510>label{display:grid!important;align-content:start;gap:7px!important;min-height:100%;margin:0!important;padding:12px!important;border:1px solid var(--stk-line,var(--line,#dbe3ed));border-radius:16px;background:color-mix(in srgb,var(--stk-panel,var(--panel,#f5f8fc)) 66%,var(--stk-card,var(--card,#fff)) 34%);transition:border-color .16s ease,box-shadow .16s ease,background .16s ease}
.mpd-stock-form-v13510>label[hidden]{display:none!important}
.mpd-stock-form-v13510>label:focus-within{border-color:color-mix(in srgb,var(--stk-accent,#2f7df6) 55%,var(--stk-line,#dbe3ed));background:var(--stk-card,var(--card,#fff));box-shadow:0 0 0 3px color-mix(in srgb,var(--stk-accent,#2f7df6) 10%,transparent)}
.mpd-stock-form-v13510>label>span{display:block;color:var(--stk-text,var(--text,#122033));font-size:11px;font-weight:900;letter-spacing:.02em}
.mpd-stock-form-v13510>label>small{display:block;margin:0!important;color:var(--stk-muted,var(--muted,#66758a));font-size:10px;line-height:1.4}
.mpd-stock-form-v13510 input,.mpd-stock-form-v13510 select,.mpd-stock-form-v13510 textarea{width:100%!important;max-width:100%!important;margin:0!important;border:1px solid color-mix(in srgb,var(--stk-line,var(--line,#dbe3ed)) 92%,transparent)!important;border-radius:12px!important;background:var(--stk-card,var(--card,#fff))!important;color:var(--stk-text,var(--text,#122033))!important;box-shadow:none!important;outline:0!important;font:750 14px/1.3 system-ui,sans-serif!important}
.mpd-stock-form-v13510 input,.mpd-stock-form-v13510 select{min-height:48px!important;padding:0 12px!important}
.mpd-stock-form-v13510 textarea{min-height:92px!important;padding:11px 12px!important;resize:vertical}
.mpd-stock-form-v13510 input:focus,.mpd-stock-form-v13510 select:focus,.mpd-stock-form-v13510 textarea:focus{border-color:var(--stk-accent,#2f7df6)!important}
.mpd-stock-form-v13510 input:disabled{opacity:1!important;background:color-mix(in srgb,var(--stk-accent,#2f7df6) 7%,var(--stk-panel,var(--panel,#f5f8fc)))!important;color:var(--stk-accent,#2f7df6)!important;font-weight:950!important}
.mpd-stock-form-v13510 [data-stock-field="product_id"]{padding:14px!important;background:linear-gradient(145deg,color-mix(in srgb,var(--stk-accent,#2f7df6) 7%,var(--stk-card,var(--card,#fff))),var(--stk-card,var(--card,#fff)))}
.mpd-stock-form-v13510 [data-stock-field="quantity"] input{font-size:20px!important;font-weight:950!important;letter-spacing:-.02em}
.mpd-stock-form-v13510 [data-stock-field="unit_preview"] input{text-align:center}
.mpd-stock-product-context{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-top:-4px;padding:10px;border:1px solid color-mix(in srgb,var(--stk-accent,#2f7df6) 20%,var(--stk-line,var(--line,#dbe3ed)));border-radius:15px;background:color-mix(in srgb,var(--stk-accent,#2f7df6) 5%,var(--stk-card,var(--card,#fff)))}
.mpd-stock-product-context>span{grid-column:1/-1;padding:5px;color:var(--stk-muted,var(--muted,#66758a));font-size:11px;text-align:center}
.mpd-stock-product-context>div{min-width:0;padding:7px 8px;border-radius:11px;background:var(--stk-card,var(--card,#fff))}
.mpd-stock-product-context small,.mpd-stock-product-context b{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mpd-stock-product-context small{color:var(--stk-muted,var(--muted,#66758a));font-size:9px;font-weight:850;text-transform:uppercase;letter-spacing:.08em}
.mpd-stock-product-context b{margin-top:3px;color:var(--stk-text,var(--text,#122033));font-size:11px;text-transform:capitalize}
.mpd-stock-form-v13510 .mpd-stock-sharing-box{display:grid!important;gap:8px!important;margin:0!important;padding:12px!important;border:1px solid color-mix(in srgb,var(--stk-good,#16a36a) 30%,var(--stk-line,var(--line,#dbe3ed)))!important;border-radius:16px!important;background:color-mix(in srgb,var(--stk-good,#16a36a) 7%,var(--stk-card,var(--card,#fff)))!important}
.mpd-stock-form-v13510 .mpd-stock-sharing-box:empty{display:none!important}
.mpd-stock-form-v13510 .mpd-stock-sharing-box label{display:flex!important;align-items:center!important;gap:10px!important;margin:0!important;padding:4px!important;border:0!important;background:transparent!important;color:var(--stk-text,var(--text,#122033));font-size:12px;font-weight:800;cursor:pointer}
.mpd-stock-form-v13510 .mpd-stock-sharing-box input{flex:0 0 auto;width:20px!important;height:20px!important;min-height:20px!important;padding:0!important;accent-color:var(--stk-good,#16a36a)}
.mpd-stock-form-v13510 .mpd-stock-adjust-context,.mpd-stock-form-v13510 .mpd-stock-receipt-summary,.mpd-stock-form-v13510 .mpd-stock-receipt-explain{margin:0!important;border-radius:17px!important}
.mpd-stock-form-v13510 .mpd-stock-adjust-context{padding:14px!important;background:linear-gradient(145deg,color-mix(in srgb,var(--stk-accent,#2f7df6) 9%,var(--stk-card,var(--card,#fff))),var(--stk-panel,var(--panel,#f5f8fc)))!important}
.mpd-stock-form-v13510 .mpd-stock-adjust-context b{font-size:18px!important}

html[data-theme="dark"] .mpd-stock-modal-host-v13510 .mpd-stock-modal-backdrop{background:rgba(1,6,16,.72)}
html[data-theme="dark"] .mpd-stock-form-v13510>label{background:color-mix(in srgb,#13233a 80%,#0d1726 20%)}
html[data-theme="dark"] .mpd-stock-form-v13510 input,html[data-theme="dark"] .mpd-stock-form-v13510 select,html[data-theme="dark"] .mpd-stock-form-v13510 textarea,html[data-theme="dark"] .mpd-stock-product-context>div{background:#0d1929!important;color:#edf5ff!important;border-color:#2b405c!important}
html[data-theme="dark"] .mpd-stock-product-context{background:#112039;border-color:#2c4b72}

@media(max-width:900px){
  .mpd-stock-page-v13510 .mpd-stock-filterbar{top:4px}
  .mpd-stock-product-context{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:680px){
  body.mpd-stock-command-active #main{padding-left:8px!important;padding-right:8px!important}
  .mpd-stock-page-v13510 .mpd-stock-hero{padding:16px;border-radius:20px}
  .mpd-stock-page-v13510 .mpd-stock-hero h1{font-size:34px}
  .mpd-stock-page-v13510 .mpd-stock-filterbar{position:relative;top:auto;z-index:3;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none}
  .mpd-stock-modal-host-v13510 .mpd-stock-modal-backdrop{padding:0;place-items:stretch}
  .mpd-stock-modal-host-v13510 .mpd-stock-modal-v13510{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;border:0;border-radius:0;grid-template-rows:auto minmax(0,1fr) auto}
  .mpd-stock-modal-host-v13510 .mpd-stock-modal-v13510>header{padding:calc(14px + env(safe-area-inset-top)) 14px 13px}
  .mpd-stock-modal-host-v13510 .mpd-stock-modal-v13510>header h2{font-size:24px}
  .mpd-stock-modal-host-v13510 .mpd-stock-modal-v13510>header p{font-size:11px;line-height:1.35}
  .mpd-stock-modal-host-v13510 .mpd-stock-modal-close{width:40px;height:40px;border-radius:13px}
  .mpd-stock-modal-host-v13510 .mpd-stock-modal-body{padding:14px 12px 18px}
  .mpd-stock-modal-host-v13510 .mpd-stock-modal-v13510>footer{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:10px 12px calc(10px + env(safe-area-inset-bottom))}
  .mpd-stock-modal-host-v13510 .mpd-stock-modal-v13510>footer .btn{width:100%;min-width:0;justify-content:center;padding-inline:8px}
  .mpd-stock-modal-host-v13510 .mpd-stock-modal-v13510>footer .btn:only-child{grid-column:1/-1}
  .mpd-stock-form-v13510{grid-template-columns:1fr!important;gap:9px!important}
  .mpd-stock-form-v13510>.full,.mpd-stock-form-v13510>label.full,.mpd-stock-form-v13510>.mpd-stock-form-section,.mpd-stock-form-v13510>.mpd-stock-product-context{grid-column:auto!important}
  .mpd-stock-form-v13510 .mpd-stock-form-section{display:block;margin:7px 0 -1px;padding-bottom:6px}
  .mpd-stock-form-v13510 .mpd-stock-form-section small{display:block;margin-top:3px;text-align:left}
  .mpd-stock-form-v13510>label{padding:10px!important;border-radius:14px}
  .mpd-stock-form-v13510 input,.mpd-stock-form-v13510 select{min-height:50px!important;font-size:16px!important}
  .mpd-stock-form-v13510 textarea{font-size:16px!important}
  .mpd-stock-product-context{grid-template-columns:1fr 1fr;gap:6px;padding:8px}
}
@media(max-width:390px){
  .mpd-stock-product-context{grid-template-columns:1fr}
  .mpd-stock-modal-host-v13510 .mpd-stock-modal-v13510>footer{grid-template-columns:1fr}
}
@media(prefers-reduced-motion:reduce){.mpd-stock-form-v13510>label,.mpd-stock-modal-close{transition:none!important}}
