/* SO by SMC v2026.09.15.17 - full mobile polish + quick action dock */
:root{--so-mobile-bar-h:74px}
html,body,#app,.app,.main,.content{max-width:100%;overflow-x:hidden}
img,video,canvas,svg{max-width:100%;height:auto}
input,select,textarea,button{max-width:100%}
.soQuickSheet{position:fixed;inset:0;z-index:9998;background:#0000;display:flex;align-items:flex-end;justify-content:center;transition:.16s ease}.soQuickSheet.open{background:#0008}.soQuickPanel{width:min(620px,100%);background:#fff;border-radius:22px 22px 0 0;padding:8px 12px calc(16px + env(safe-area-inset-bottom));transform:translateY(105%);transition:.16s ease;box-shadow:0 -15px 45px #0003}.soQuickSheet.open .soQuickPanel{transform:translateY(0)}.soQuickHandle{width:42px;height:4px;border-radius:99px;background:#ccc;margin:2px auto 8px}.soQuickHead{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:4px 2px 10px}.soQuickHead>div{display:grid}.soQuickHead b{font-size:17px}.soQuickHead small{font-size:11px;color:#777;margin-top:2px}.soQuickHead button{border:1px solid #ddd;background:#fff;border-radius:10px;width:40px;height:40px}.soQuickGrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.soQuickAction{border:1px solid #ddd!important;background:#fff!important;color:#171717!important;border-radius:14px!important;padding:12px!important;display:flex!important;align-items:center!important;gap:10px!important;text-align:left!important;min-height:74px!important}.soQuickAction .soQuickIcon{width:42px;height:42px;display:grid;place-items:center;border-radius:12px;background:#f3f3f0;font-size:21px;flex:0 0 auto}.soQuickAction>span:last-child{display:grid;gap:2px;min-width:0}.soQuickAction b{font-size:13px}.soQuickAction small{font-size:10px;color:#777;white-space:normal;line-height:1.25}.soPlusText{display:none}
@media(max-width:900px){
  body{padding:0 0 calc(var(--so-mobile-bar-h) + env(safe-area-inset-bottom))!important}
  .main{min-height:100dvh!important;padding:0 0 calc(var(--so-mobile-bar-h) + env(safe-area-inset-bottom))!important;margin:0!important;width:100%!important}
  .content{width:100%!important;max-width:100vw!important;padding:8px!important}
  .top{width:100%!important;min-height:64px!important;padding:7px 8px!important;gap:6px!important;position:sticky!important;top:0!important}.top>div:first-child{min-width:0!important}.top h1{font-size:18px!important;max-width:47vw!important}.top .sub{font-size:10px!important;max-width:47vw!important}.topActions{gap:5px!important}.topActions .primary{min-height:42px!important;padding:9px 11px!important}.topActions .secondary:last-child{min-height:42px!important;padding:9px 11px!important}
  .help{display:none!important}.toolbar{display:grid!important;grid-template-columns:1fr!important;gap:8px!important}.toolbar .tools{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important}.toolbar .tools button{width:100%!important;min-height:42px!important}
  .card,.kpi,.quickSection,.orderQuickLine{width:100%!important;max-width:100%!important;border-radius:13px!important;padding:10px!important}.kpis,.costGrid,.productProfitGrid,.productMeta,.mediaGrid{gap:6px!important}.kpis,.costGrid,.productProfitGrid,.productMeta{grid-template-columns:repeat(2,minmax(0,1fr))!important}.mediaGrid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .fairActionGrid,.customerActionGrid,.productActions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important}.fairActionGrid button,.customerActionGrid button,.productActions button{width:100%!important;min-width:0!important;min-height:44px!important}
  .visitRow,.sourceRow{display:grid!important;grid-template-columns:1fr!important;align-items:start!important}.visitRow .rowActions,.sourceRow .rowActions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;width:100%!important;gap:6px!important}.visitRow .rowActions button,.sourceRow .rowActions button{width:100%!important;min-height:40px!important}
  .tableWrap{max-width:100%!important;width:100%!important;overflow-x:auto!important;-webkit-overflow-scrolling:touch!important;overscroll-behavior-inline:contain!important}.tableWrap table{min-width:680px!important}.tableWrap th,.tableWrap td{font-size:11px!important;padding:8px!important}.tableWrap:focus{outline:2px solid #ccc;outline-offset:2px}
  .modal{padding:0!important;align-items:stretch!important}.modalCard,.wideModal{width:100%!important;max-width:100%!important;height:100dvh!important;max-height:100dvh!important;border-radius:0!important;padding:8px 8px calc(78px + env(safe-area-inset-bottom))!important;overflow-y:auto!important}.modalHead{position:sticky!important;top:-8px!important;z-index:80!important;background:#fff!important;padding:8px 0!important}.modalActions{position:fixed!important;left:0!important;right:0!important;bottom:0!important;z-index:90!important;background:#fff!important;border-top:1px solid #ddd!important;padding:8px 10px calc(8px + env(safe-area-inset-bottom))!important;display:grid!important;grid-template-columns:1fr 1fr!important;gap:7px!important}.modalActions button{width:100%!important;min-height:46px!important}
  .formGrid,.quickGrid,.colorGrid,.poLine{grid-template-columns:1fr!important;gap:8px!important}.formGrid .full,.quickGrid .span2,.poLine>*{grid-column:auto!important}.formGrid input,.formGrid select,.formGrid textarea,.quickGrid input,.quickGrid select,.quickGrid textarea{font-size:16px!important;width:100%!important;min-height:44px!important}.formGrid textarea,.quickGrid textarea{min-height:84px!important}
  .sizeMatrix{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:6px!important}.sizeMatrix input{font-size:16px!important;min-height:42px!important}.inlineScan{grid-template-columns:1fr!important}.inlineScan button{width:100%!important;min-height:44px!important}
  .productHero{grid-template-columns:1fr!important}.productHeroPhoto{min-height:150px!important}.productHeroPhoto img{max-height:280px!important;object-fit:contain!important}
  .mobileBar.soMobileBarV17,.mobileBar{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;position:fixed!important;left:0!important;right:0!important;bottom:0!important;height:calc(var(--so-mobile-bar-h) + env(safe-area-inset-bottom))!important;background:#fff!important;border-top:1px solid #d7d7d7!important;padding:0 4px env(safe-area-inset-bottom)!important;z-index:500!important;box-shadow:0 -6px 20px #0001!important}.mobileBar button{height:100%!important;min-width:0!important;padding:5px 2px!important;gap:2px!important;font-size:21px!important;background:#fff!important;color:#171717!important}.mobileBar button span{font-size:9px!important}.mobileBar .plus{width:58px!important;height:58px!important;min-height:58px!important;align-self:start!important;justify-self:center!important;margin:-14px auto 0!important;border-radius:50%!important;background:#171717!important;color:#fff!important;box-shadow:0 7px 20px #0004!important;border:5px solid #f4f4f1!important;display:flex!important;align-items:center!important;justify-content:center!important;flex-direction:column!important}.mobileBar .plus .soPlusGlyph{font-size:29px!important;line-height:1!important}.mobileBar .plus .soPlusText{display:block!important;color:#fff!important;font-size:8px!important;line-height:1!important;margin-top:-1px!important}.sidebar{height:100dvh!important;max-height:100dvh!important}.nav{padding-bottom:calc(140px + env(safe-area-inset-bottom))!important}
  .aiVisitorSticky{position:sticky!important;top:58px!important;z-index:70!important}.aiVisitorScanBtn{min-height:50px!important;width:100%!important}
}
@media(max-width:430px){
  .content{padding:7px!important}.top h1,.top .sub{max-width:44vw!important}.kpis,.costGrid,.productProfitGrid,.productMeta{grid-template-columns:1fr 1fr!important}.fairActionGrid,.customerActionGrid,.productActions{grid-template-columns:1fr!important}.toolbar .tools{grid-template-columns:1fr 1fr!important}.tableWrap table{min-width:640px!important}.soQuickGrid{grid-template-columns:1fr 1fr}.soQuickAction{min-height:70px!important;padding:10px!important}.soQuickAction .soQuickIcon{width:38px;height:38px}.sizeMatrix{grid-template-columns:repeat(3,minmax(0,1fr))!important}
}
@media(max-width:360px){.toolbar .tools,.soQuickGrid{grid-template-columns:1fr!important}.sizeMatrix{grid-template-columns:repeat(2,minmax(0,1fr))!important}.top h1,.top .sub{max-width:39vw!important}}
@media print{.mobileBar,.soQuickSheet{display:none!important}}
