/* BW / V17: shared operating workspace responsive system.
  Restore links that legacy mobile rules hid; keep admin tools simple and usable. */
:root{--bw17-control:48px}
@media(max-width:1024px){
 .workspace{min-width:0}
 .main{min-width:0}
 .op-columns{grid-template-columns:1fr;gap:20px}
 .op-panel,.op-project-form{min-width:0}
 .board-scroll,.table-scroll{max-width:100%;overflow-x:auto;overscroll-behavior-x:contain}
 .board-scroll>*{min-width:600px}
 .op-project-form form{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
 .op-project-form .op-full,.op-project-form .op-primary{grid-column:1/-1}
}
@media(max-width:810px){
 html{scroll-padding-top:20px}
 body{overflow-x:clip}
 .sidebar{
  box-sizing:border-box;position:relative!important;inset:auto!important;display:flex!important;flex-direction:row;
  align-items:center;justify-content:flex-start;flex-wrap:wrap;gap:7px;
  width:100%!important;height:auto!important;min-height:0!important;
  padding:11px 16px 13px!important;background:#15181a;
 }
 .studio-brand{display:flex!important;align-items:center;gap:12px;width:100%;max-width:none;flex:0 0 100%;
  padding:0 0 9px!important;margin:0!important;border-bottom:1px solid #0f766e55!important}
 .bw12-studio-logo{width:103px;max-height:55px;object-fit:contain;flex-shrink:0}
 .studio-brand strong{font-size:9px;line-height:1.4}
 .studio-brand small{font-size:8px;line-height:1.45}
 .side-title,.side-muted,.side-bottom{display:none!important}
 .sidebar .side-link{
  display:inline-flex!important;align-items:center;justify-content:center;
  flex:1 1 0;min-width:0;min-height:43px;
  margin:0!important;padding:9px 7px!important;border-radius:2px;
  font:700 10px/1.3 var(--geo);text-align:center;white-space:normal;
 }
 .sidebar .side-link svg{display:none}
 .workspace{box-sizing:border-box;margin-left:0!important;width:100%!important;min-width:0}
 .topbar{box-sizing:border-box;display:flex;justify-content:space-between;gap:11px;
  min-height:48px;height:auto;padding:9px 16px;align-items:center;min-width:0}
 .topbar>span{font-size:8px;line-height:1.4;white-space:normal;min-width:0}
 .topbar>div{flex:0 0 auto;gap:8px}
 .topbar a{font-size:9px}
 .avatar{display:none}
 .main{padding:24px 16px 50px!important;min-width:0}
 .page-head{display:flex;align-items:flex-start;flex-wrap:wrap;gap:11px}
 .page-head h1{font-size:clamp(32px,7.5vw,47px)}
 .page-head p{max-width:100%;line-height:1.65}
 .refresh{min-height:43px}
 .stat-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 .stat{min-width:0;padding:16px}
 .stat strong{font-size:clamp(25px,6.5vw,34px)}
 .table-head{padding:16px}
 .actions{display:flex;flex-wrap:wrap;gap:9px;padding:12px 0}
 .actions input,.actions select{min-width:0;max-width:none;flex:1 1 145px;min-height:43px;font-size:16px}
 .table-scroll{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
 .detail-drawer{box-sizing:border-box;width:min(100%,540px);max-width:100vw}
 .drawer-content{padding:20px}
 .op-panel{padding:18px}
 .op-panel-head{flex-wrap:wrap;gap:10px}
 .op-project-form{padding:18px}
 .op-project-form form{grid-template-columns:minmax(0,1fr);gap:12px}
 .op-project-form .op-full,.op-project-form .op-primary{grid-column:1}
 .op-project-form :is(input,select,textarea),.op-panel :is(input,select,textarea){
  box-sizing:border-box;min-width:0;width:100%;font-size:16px!important;min-height:47px
 }
 .op-panel :is(button,a),.op-project-form button{min-height:44px}
 .op-columns{display:grid;grid-template-columns:minmax(0,1fr);gap:18px}
 .board-scroll{overflow-x:auto;max-width:100%;-webkit-overflow-scrolling:touch;padding-bottom:8px}
 .board-scroll>*{min-width:0}
 .project-board{display:flex;flex-direction:column;min-width:0!important;gap:14px}
 .board-col{min-width:0!important;width:100%;max-width:none}
 .board-toolbar{flex-wrap:wrap;gap:14px}
 .board-toolbar p{max-width:100%;font-size:12px}
 .estimate-card-footer{flex-wrap:wrap}
 .estimate-card-footer select{min-height:43px;max-width:100%}
 .estimate-preview{max-width:100%;overflow-x:auto}
 .line-item{display:grid;grid-template-columns:minmax(0,1fr) minmax(55px,.4fr);gap:8px}
 .line-item :is(input,select){font-size:16px!important;min-width:0;max-width:100%;box-sizing:border-box;min-height:43px;padding:8px}
 .line-item .item-description{grid-column:1/-1}
 .line-item .item-unit{grid-column:1}
 .line-item .item-qty{grid-column:2}
 .line-item .item-price{grid-column:1}
 .line-item .remove-item{grid-column:2;min-height:43px}
}
@media(max-width:360px){
 .sidebar{padding-inline:11px!important}
 .sidebar .side-link{font-size:9px;padding:8px 4px!important}
 .main{padding-inline:12px!important}
 .topbar{padding-inline:12px}
}
@media(prefers-reduced-motion:reduce){
 .sidebar .side-link,.board-col{transition:none!important}
}